# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="1" MY_P=${P/_/} S="${WORKDIR}/${MY_P}" DESCRIPTION="A userspace logging daemon for netfilter/iptables related logging" HOMEPAGE="http://netfilter.org/projects/ulogd/index.html" SRC_URI="http://ftp.netfilter.org/pub/${PN}/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64" IUSE="mysql postgres sqlite3 pcap logrotate doc" RDEPEND="net-firewall/iptables >=net-libs/libnfnetlink-0.0.39 >=net-libs/libnetfilter_conntrack-0.0.95 >=net-libs/libnetfilter_log-0.0.15 mysql? ( virtual/mysql ) postgres? ( virtual/postgresql-server ) sqlite3? ( dev-db/sqlite:3 ) pcap? ( net-libs/libpcap ) logrotate? ( app-admin/logrotate )" DEPEND="${RDEPEND} sys-devel/autoconf:2.5 doc? ( app-text/sgmltools-lite app-text/texlive-core )" src_compile() { econf \ $(use_with mysql) \ $(use_with postgres pgsql) \ $(use_with sqlite3) \ $(use_with pcap) emake || die "emake failed" if use doc ; then # build extra documentation files (.ps, .txt, .html, .dvi) emake -f doc/Makefile || die "emake for docs failed" fi } src_install() { emake install || die "emake install failed" # doinitd "${FILESDIR}"/ulogd2 || die "doinitd failed" # insinto /etc # newins "${FILESDIRS}"/ulogd2.conf ulogd.conf dodoc AUTHORS README if use doc ; then dohtml doc/ulogd.html dodoc doc/ulogd.dvi dodoc doc/ulogd.txt dodoc doc/ulogd.ps fi use mysql && dodoc doc/mysql-ulogd2.sql use postgres && dodoc doc/pgsql-ulogd2.sql use sqlite3 && dodoc doc/sqlite3.table if use logrotate ; then # install logrotate config insinto /etc/logrotate.d newins ulogd.logrotate ulogd || die "install initscript failed" fi doman ulogd.8 || die }