# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: inherit eutils linux-mod git EGIT_REPO_URI="git://dev.medozas.de/xtables-addons" DESCRIPTION="Out of tree iptables modules" HOMEPAGE="http://jengelh.medozas.de/projects/xtables/" SRC_URI="" 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() { epatch "${FILESDIR}"/${PN}-xt_SYSRQ.patch EBUILD_ARCH="${ARCH}" unset ARCH ./autogen.sh econf --sbindir=/sbin \ --libexecdir=/$(get_libdir) \ --with-xtables=${ROOT}/usr/include/ \ --with-kbuild=${ROOT}/lib/modules/${KV_FULL}/build \ --with-ksource=${ROOT}/lib/modules/${KV_FULL}/source \ --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 }