# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ ipt=`best_version net-firewall/iptables | cut -d '/' -f 2` DESCRIPTION="Iptables module for matching P2P traffic" HOMEPAGE="http://www.sourceforge.net/projects/iptables-p2p" SRC_URI="http://www.iptables.org/files/${ipt}.tar.bz2 mirror://sourceforge/iptables-p2p/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND=">=net-firewall/iptables-1.2.9" RDEPEND="$DEPEND virtual/linux-sources sys-apps/coreutils" S=${WORKDIR}/${P} src_compile() { # We need iptables headers from iptables tarball. cp -R ${WORKDIR}/iptables-1.2.9/include/* ${S}/common/ emake || die } src_install() { exeinto /lib/iptables/ doexe iptables/libipt_p2p.so insinto /lib/modules/`uname -r`/kernel/net/ipv4/netfilter doins kernel/ipt_p2p.*o dodoc COPYING FAQ AUTHORS NEWS TODO ${FILESDIR}/README.gentoo docinto examples dodoc examples/* } pkg_postinst() { einfo "Note: you have to insmod ipt_p2p.o (or .ko) before trying to use it in iptables." einfo "E. g.: # insmod /lib/modules/`uname -r`/kernel/net/ipv4/netfilter/ipt_p2p.o" einfo "Look into /usr/share/doc/${PF}/examples for example scripts." }