summaryrefslogtreecommitdiff
path: root/community/vnstat/PKGBUILD
blob: 7cc05f52d2293b343be5545073a13249f393235d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# $Id: PKGBUILD 93779 2013-07-10 07:27:19Z bpiotrowski $
# Maintainer:  Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer:  Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Thorsten Töpper <atsutane-tu@freethoughts.de>

pkgname=vnstat
pkgver=1.11
pkgrel=7
pkgdesc="A console-based network traffic monitor"
arch=('i686' 'x86_64')
url="http://humdi.net/vnstat/"
license=('GPL')
depends=('bash')
makedepends=('gd')
optdepends=('gd: image output')
backup=(etc/vnstat.conf)
source=(http://humdi.net/vnstat/$pkgname-$pkgver.tar.gz
	service)
md5sums=('a5a113f9176cd61fb954f2ba297f5fdb'
         'df452896729db4a569005f1ebf6b57f4')

build() {
  cd $srcdir/$pkgname-$pkgver
  make all SBIN=/usr/bin
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make DESTDIR=$pkgdir install SBIN=$pkgdir/usr/bin

  install -Dm644 $srcdir/service $pkgdir/usr/lib/systemd/system/vnstat.service

  install -D -m0644 examples/vnstat.cron $pkgdir/usr/share/doc/vnstat/examples/vnstat.cron
  install -D -m0755 examples/vnstat.cgi $pkgdir/usr/share/doc/vnstat/examples/vnstat.cgi
  sed -i 's#root##' $pkgdir/usr/share/doc/vnstat/examples/vnstat.cron
}