1 # Contributor: Vadym Abramchuk <abramm@gmail.com>
7 url="http://bitbucket.org/sysoleg/lisg/"
10 depends=('perl-net-radius' 'perl-net-ipaddress' 'iptables' 'iproute2')
11 makedepends=('mercurial' 'linux-headers')
15 backup=(usr/local/ISG/etc/config.pl)
18 source=(lisg.install lisg.rules)
20 md5sums=('9e5a55e4d1465e5ed53b65b9ecf9f986'
21 '29782e38a66f1fdaabdf2a61ed9da98f')
24 _hgroot="http://bitbucket.org/sysoleg"
29 msg "Connecting to Mercurial server...."
31 if [ -d $_hgrepo ] ; then
33 hg pull -u || return 1
34 msg "The local files are updated."
36 hg clone $_hgroot $_hgrepo || return 1
39 msg "Mercurial checkout done or server timeout"
41 msg "Getting iptables source"
43 iptver=`iptables -V | sed -n s/iptables.v//p`
44 wget http://www.iptables.org/projects/iptables/files/iptables-${iptver}.tar.bz2
45 tar xvfj iptables-${iptver}.tar.bz2
48 msg "Configuring iptables..."
50 ./configure > /dev/null
53 msg "Starting make..."
55 rm -rf "$srcdir/$_hgrepo-build"
56 cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
57 cd "$srcdir/$_hgrepo-build"
60 ./configure --ipt-src=${iptsrc}
62 # make DESTDIR="$pkgdir/" install || return 1
63 make kinstall INSTALL_MOD_PATH=$pkgdir/
64 install -D -m 644 libipt_ISG.so $pkgdir/usr/lib/iptables/libipt_ISG.so
65 mkdir -p $pkgdir/usr/local
66 cp -r $srcdir/$_hgrepo-build/ISG $pkgdir/usr/local/
67 install -D -m 755 $srcdir/$_hgrepo-build/ISG/contrib/rc.ISGd $pkgdir/etc/rc.d/lisg
68 install -D -m 644 $srcdir/lisg.rules $pkgdir/etc/iptables/lisg.rules