updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / pgl-nogui / PKGBUILD
bloba2f8d3253d98ec9738c359eff00bfa031f822199
1 # Maintainer: Pierre Buard <pierre.buard+aur gmail com>
2 pkgname=pgl-nogui
3 pkgver=2.0.4
4 pkgrel=2
5 pkgdesc='A privacy oriented firewall application.'
6 url='http://phoenixlabs.org/'
7 arch=('i686' 'x86_64')
8 depends=('start-stop-daemon' 'libnfnetlink' 'libnetfilter_queue' 'iptables' 'wget')
9 optdepends=('dbus-core'
10             'zlib: to directly load gz compressed blocklists'
11             'p7zip: for blocklists packed as .7z'
12             'unzip: for blocklists packed as .zip'
13             'networkmanager: to run a white-listing script when detecting new network interfaces')
14 license=('GPL')
15 conflicts=('blockcontrol' 'moblock')
16 backup=('etc/pgl/allow.p2p'
17         'etc/pgl/blocklists.list'
18         'etc/pgl/pglcmd.conf')
19 source=(http://downloads.sourceforge.net/project/peerguardian/PeerGuardian%20Linux/$pkgver/pgl_no-GUI-$pkgver.tar.gz
20         if-up)
21 md5sums=('2086dc9e233e7c99be5152385e14698a'
22          '0982999de0a78aff23006c7aa83f3fd9')
24 build() {
25     # Adapt paths to Arch Linux
26     sed -i 's|/sbin/start-stop-daemon|/usr/bin/start-stop-daemon|g' $srcdir/pgl-$pkgver/pglcmd/pglcmd.lib
27     find $srcdir/pgl-$pkgver -type f -exec sed -i 's|/etc/init.d|/etc/rc.d|g' {} \;
29     cd $srcdir/pgl-$pkgver/
30     make PREFIX=/usr sysconfdir=/etc localstatedir=/var
33 package() {
34     cd $srcdir/pgl-$pkgver/
35     make PREFIX=/usr sysconfdir=/etc localstatedir=/var DESTDIR=$pkgdir install
37     # Man
38     gzip $srcdir/pgl-$pkgver/docs/pgld.1
39     install -Dm644 $srcdir/pgl-$pkgver/docs/pgld.1.gz $pkgdir/usr/share/man/man1/pgld.1.gz
40     ln -s /usr/share/man/man1/pgld.1.gz $pkgdir/usr/share/man/man1/pglcmd.wd.1.gz
41     # Texts
42     install -d $pkgdir/usr/share/doc/pgl/
43     install -Dm644 $srcdir/pgl-$pkgver/docs/{AUTHORS,BUGS,README,README.blocklists,THANKS,TODO} $pkgdir/usr/share/doc/pgl/
44     install -Dm644 $srcdir/pgl-$pkgver/debian/copyright $pkgdir/usr/share/licenses/pgl/LICENSE
45     # Scripts
46     install -Dm755 $srcdir/pgl-$pkgver/docs/iptables-custom-* $pkgdir/usr/lib/pgl/
47     install -Dm755 $srcdir/if-up $pkgdir/etc/NetworkManager/dispatcher.d/pgl
48     rm -r $pkgdir/etc/network/