updated on Thu Jan 5 13:17:10 UTC 2012
[aur-mirror.git] / bandwidthd / PKGBUILD
blobb04978f55ea3cf8d56fdd4abfebe68e6b007444b
1 # Contributor: p2k <Patrick.Schneider@uni-ulm.de>
2 pkgname=bandwidthd
3 pkgver=2.0.1
4 pkgrel=1
5 pkgdesc="Tracks usage of TCP/IP network subnets and builds html files with graphs to display utilization."
6 arch=('i686' 'x86_64')
7 url="http://bandwidthd.sourceforge.net/"
8 license=('GPL')
9 depends=('libpcap' 'libpng' 'gd')
10 optdepends=('postgresql' 'php')
11 backup=(/opt/bandwidthd/etc/bandwidthd.conf)
12 source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tgz bandwidthd)
13 md5sums=('aa79aad7bd489fd2cae1f7dc086ca8b6'
14          'cff9b0467a648ceffa6f54bf06612135')
16 build() {
17   cd "$srcdir/$pkgname-$pkgver"
19   ./configure --prefix=/opt
20   make || return 1
21   make DESTDIR="$pkgdir" install
22   
23   target="$pkgdir/opt/$pkgname"
25   cp README schema.postgresql "$target"
26   # Some compatibility patches
27   mkdir "$target/phphtdocs"
28   cd phphtdocs/
29   for f in *.php config.conf;do
30     sed -e 's/<?/<?php /g' -e 's/<?php =/<?php echo /g' < $f > "$target/phphtdocs/$f"
31   done
32   cp bd_pgsql_purge.sh legend.gif logo.gif "$target/phphtdocs"
33   cd ..
35   # Daemon wrapper
36   install -D "$srcdir/bandwidthd" "$pkgdir/etc/rc.d/bandwidthd"
39 # vim:set ts=2 sw=2 et: