updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / fwsnort / PKGBUILD
bloba4eee2b601601cdd642d1996bb9e21475e858848
1 # Maintainer: Colin Shea <colin@evaryont.me>
2 pkgname=fwsnort
3 pkgver=1.5
4 pkgrel=11
5 pkgdesc="application layer IDS/IPS by translating snort rules into iptables"
6 arch=('any')
7 url="http://www.cipherdyne.org/fwsnort/"
8 license=('GPL')
9 depends=('perl' 'perl-net-ipv4addr' 'perl-iptables-parse' 'iptables')
10 makedepends=('wget')
11 source=(http://www.cipherdyne.org/$pkgname/download/$pkgname-$pkgver.tar.bz2
12         'install_pl.patch')
13 md5sums=('7436472defb3a4cef827ff7bc1d3dbf1'
14          'a975c832b25c84d675adf55d797a16e2')
16 build() {
17   cd "$srcdir/$pkgname-$pkgver"
19   mkdir -p $pkgdir/var/log/fwsnort \
20            $pkgdir/usr/lib/fwsnort \
21            $pkgdir/usr/share/man/man8 \
22            $pkgdir/usr/sbin \
23            $pkgdir/etc/fwsnort/snort_rules \
24            $pkgdir/etc/fwsnort/archive \
25            $pkgdir/etc/fwsnort/snort_rules_queue
27   patch -p0 -i $srcdir/install_pl.patch
28   sed -e "/mpath.*man8/s|/usr|$pkgdir&|"    \
29       -e "/^my\\ \\\$sbin/s|/usr|$pkgdir&|" \
30       -i  install.pl
32   cp fwsnort.conf fwsnort.conf.bak
34   sed -e "s|/var/log/fwsnort|$pkgdir&|" \
35       -e "s|/usr/lib/fwsnort|$pkgdir&|" \
36       -e "s|/etc/fwsnort|$pkgdir&|" \
37         ./fwsnort.conf -i
38   # -S skips installing the perl modules, which we did with packages
39   echo y | ./install.pl -S
40   mv -f fwsnort.conf.bak $pkgdir/etc/fwsnort/fwsnort.conf
41   chmod 755 $pkgdir/usr/sbin/fwsnort
44 # vim:set ts=2 sw=2 et: