1 # Contributor: Paul Ezvan <paul@ezvan.fr>
4 _iptablesver=`pacman -Q iptables | sed "s/iptables //" | sed "s/-[1-9]//"`;
9 pkgdesc="IPP2P is a netfilter P2P traffic matching module."
10 arch=('i686' 'x86_64')
11 url="http://www.ipp2p.org/"
13 depends=('iptables=1.4.5' 'kernel26>=2.6.28-1' 'kernel26<=2.6.32-1')
14 # Enable this with kernel26=2.6.32-1
15 #makedepends=('kernel26-headers')
16 install=$pkgname.install
17 source=(http://www.ipp2p.org/downloads/$pkgname-$pkgver.tar.gz
18 http://www.iptables.org/projects/iptables/files/iptables-$_iptablesver.tar.bz2
19 ipp2p-0.8.2-iptables-1.4.0.patch
20 ipp2p-0.8.2-iptables-1.4.1.patch
21 ipp2p-0.8.2-iptables-1.4.3.patch
22 ipp2p-0.8.2-kernel-2.6.22.patch
23 ipp2p-0.8.2-kernel-2.6.28.patch
25 md5sums=('9dd745830f302d70d0b728013c1d6a0c'
26 '44f13990132c20299c1994cd6f425140'
27 'cec8b0e26d4354024e2e8eceb4a06d09'
28 '0e336f36f6e66ea9ddb217fba8215bdd'
29 '6607a84dd1aad3eb85a5df2458a75191'
30 '4bcce76d2a996de9c62a3d8a183eea0e'
31 '7ec3d52a2f340f06746466d1ce59f8e9'
32 '1d807906e0632d9d7a429d1f4c219da0')
35 mv "iptables-$_iptablesver" "iptables"
39 cd "$srcdir/$pkgname-$pkgver"
41 patch -p0 -i ../makefile.diff || return 1
42 patch -p1 -i ../ipp2p-0.8.2-iptables-1.4.0.patch || return 1
43 patch -p1 -i ../ipp2p-0.8.2-iptables-1.4.1.patch || return 1
44 patch -p0 -i ../ipp2p-0.8.2-iptables-1.4.3.patch || return 1
45 patch -p1 -i ../ipp2p-0.8.2-kernel-2.6.22.patch || return 1
46 patch -p1 -i ../ipp2p-0.8.2-kernel-2.6.28.patch || return 1
48 install -m 755 -D libipt_ipp2p.so $startdir/pkg/usr/lib/iptables/libipt_ipp2p.so
49 install -m 644 -D ipt_ipp2p.ko $startdir/pkg/lib/modules/$_kernver/kernel/net/ipv4/netfilter/ipt_ipp2p.ko
53 # vim:set ts=2 sw=2 et: