inherit linux-mod eutils DESCRIPTION="Out of tree iptables modules" HOMEPAGE="http://jengelh.medozas.de/projects/xtables/" SRC_URI="http://dev.medozas.de/files/xtables/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="" RDEPEND="virtual/modutils >net-firewall/iptables-1.4.1 >virtual/linux-sources-2.6.17" DEPEND="${RDEPEND} virtual/linux-sources" pkg_setup() { CONFIG_CHECK="NETFILTER" NETFILTER_ERROR="Your kernel does not support netfilter" CONFIG_CHECK="NF_CONNTRACK" NETFILTER_ERROR="You need NF_CONNTRACK compiled in or as a module" CONFIG_CHECK="NF_CONNTRACK_MARK" NETFILTER_ERROR="You need NF_CONNTRACK_MARK compiled in or as a module" linux-mod_pkg_setup } src_compile() { EBUILD_ARCH="${ARCH}" unset ARCH econf --sbindir=/sbin \ --libexecdir=/$(get_libdir) \ --with-xtables=/usr/include/ \ --enable-shared --with-pic || die "configure failed" ARCH="${EBUILD_ARCH}" emake CFLAGS="${CFLAGS}" CC="$(tc-getCC)" || die "emake failed" } # FIXME: For some reason install wants to write to /lib/modules/$KERNEL/modules.dep.tmp src_install() { emake DESTDIR="${D}" install || die "emake failed" dodoc README } #FIXME: We don't uninstall kernel modules after installing them? pkg_postrm() { rm -r /lib/modules/$(uname -r)/extra }