updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / ipp2p / PKGBUILD
blob9f31a9e69be5bcefa2f8953fa99b79cd776e459d
1 # Contributor: Paul Ezvan <paul@ezvan.fr>
3 _kernver=`uname -r`;
4 _iptablesver=`pacman -Q iptables | sed "s/iptables //" | sed "s/-[1-9]//"`;
6 pkgname=ipp2p
7 pkgver=0.8.2
8 pkgrel=6
9 pkgdesc="IPP2P is a netfilter P2P traffic matching module."
10 arch=('i686' 'x86_64')
11 url="http://www.ipp2p.org/"
12 license=('GPL')
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
24         makefile.diff)
25 md5sums=('9dd745830f302d70d0b728013c1d6a0c'
26          '44f13990132c20299c1994cd6f425140'
27          'cec8b0e26d4354024e2e8eceb4a06d09'
28          '0e336f36f6e66ea9ddb217fba8215bdd'
29          '6607a84dd1aad3eb85a5df2458a75191'
30          '4bcce76d2a996de9c62a3d8a183eea0e'
31          '7ec3d52a2f340f06746466d1ce59f8e9'
32          '1d807906e0632d9d7a429d1f4c219da0')
33 build() {
34   cd "$srcdir"
35   mv "iptables-$_iptablesver" "iptables"
36   cd "iptables"
37   ./configure
38   
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
47   make || 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: