1 # Contributor: Muhammad Qadri <maqadri at comcast dot net>
5 pkgdesc="A collection of three lightweight system daemons (two main daemons and one helper daemon) that run on Linux machines and analyze iptables log messages to detect port scans and other suspicious traffic"
7 url="http://cipherdyne.org/psad/"
10 depends=('perl-bit-vector' 'perl-date-calc' 'perl-iptables-chainmgr' 'perl-iptables-parse' 'perl-net-ipv4addr' 'perl-storable' 'perl-unix-syslog')
19 source=("http://cipherdyne.org/psad/download/$pkgname-$pkgver.tar.gz" "responses" "psad-init.archlinux" "psad.patch1")
21 md5sums=('c5e4a8d1bba6b5026ebada0084970e47'
22 '2425986f9eaa44d983128ebea6c8baf4'
23 'c0a978cd7a70525a2c901f4730be5547'
24 '9d72e2e5af8a06b7c85973b927fc12ae')
27 cd "$srcdir/$pkgname-$pkgver"
28 cp $startdir/psad-init.archlinux init-scripts/
29 if [ ! -e responses ]; then
30 ln $startdir/responses responses -s;
32 patch -p1 -i $srcdir/psad.patch1
34 #Create the dirs it will need to make the program
35 mkdir -p $pkgdir/etc/psad \
39 $pkgdir/usr/share/man/man8 \
40 $pkgdir/var/lib/psad \
41 $pkgdir/var/log/psad \
42 $pkgdir/var/run/psad \
46 sed -e "s|'/usr/sbin'|'$pkgdir/usr/sbin'|" \
47 -e "s|'/usr/bin'|'$pkgdir/usr/bin'|" \
48 -e "s|my \$mpath = \"/usr/share/man/man\$section\";|my \$mpath = \"$pkgdir/usr/share/man/man\$section\";|" \
50 sed -e "s|/var/log/psad|$pkgdir&|" \
51 -e "s|/var/run/psad|$pkgdir&|" \
52 -e "s|/var/lib/psad|$pkgdir&|" \
53 -e "s|/usr/lib/psad|$pkgdir&|" \
54 -e "s|/etc/psad|$pkgdir&|" \
55 -e "s|/usr/bin/whois_psad|$pkgdir&|" \
56 -e "s|/usr/sbin/fwcheck_psad|$pkgdir&|" \
57 -e "s|/usr/sbin/psadwatchd|$pkgdir&|" \
58 -e "s|/usr/sbin/kmsgsd|$pkgdir&|" \
59 -e "s|/usr/sbin/psad|$pkgdir&|" \
60 -e 's|root@localhost|new&|' \
63 #hope that things work
64 ./install.pl --init-dir "$pkgdir/etc/rc.d/" < responses
67 # vim:set ts=2 sw=2 et: