summaryrefslogtreecommitdiff
path: root/community-testing/vnstat
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-18 00:01:40 +0000
committerroot <root@rshg054.dnsready.net>2012-06-18 00:01:40 +0000
commit0838a7ed482f29ddf71cf05e7ec6cf7c2728ce34 (patch)
treec7eab7aecb6ae497d23cfa7074bffd060d5eb8fe /community-testing/vnstat
parent61f450a3578b7e51c337e1a687c0cef2bc07ff35 (diff)
Mon Jun 18 00:01:40 UTC 2012
Diffstat (limited to 'community-testing/vnstat')
-rw-r--r--community-testing/vnstat/PKGBUILD39
-rw-r--r--community-testing/vnstat/service9
2 files changed, 48 insertions, 0 deletions
diff --git a/community-testing/vnstat/PKGBUILD b/community-testing/vnstat/PKGBUILD
new file mode 100644
index 000000000..773763a24
--- /dev/null
+++ b/community-testing/vnstat/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 72564 2012-06-16 17:11:28Z dreisner $
+# 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=3
+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
+ http://humdi.net/vnstat/init.d/arch/vnstat
+ service)
+md5sums=('a5a113f9176cd61fb954f2ba297f5fdb'
+ 'e89a566dd7514ff0d2d3fc77b2d4ca7e'
+ 'fcc189e3dee616ff414dac72637c1a19')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ make all
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+
+ install -D -m0755 $srcdir/vnstat $pkgdir/etc/rc.d/vnstat
+ 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
+}
diff --git a/community-testing/vnstat/service b/community-testing/vnstat/service
new file mode 100644
index 000000000..f312351ea
--- /dev/null
+++ b/community-testing/vnstat/service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Network traffic monitor
+
+[Service]
+ExecStart=/usr/sbin/vnstatd -n
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target