aboutsummaryrefslogtreecommitdiffstats
path: root/testing/vnstat/APKBUILD
blob: 8a0c235fdd2a8faff24a3b83a0eaa252970bd4bd (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
37
38
39
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>

pkgname=vnstat
pkgver=1.11
pkgrel=2
pkgdesc='A console-based network traffic monitor'
url='http://humdi.net/vnstat/'
arch='all'
license='GPL'
install="$pkgname.pre-install"
makedepends='gd-dev'
subpackages="$pkgname-doc"
source="http://humdi.net/vnstat/$pkgname-$pkgver.tar.gz
        vnstatd.initd
        vnstatd.confd"

build() {
	cd "$srcdir"/$pkgname-$pkgver
	make all || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install || return 1

	install -D -m0755 "$srcdir"/vnstatd.initd \
		"$pkgdir"/etc/init.d/vnstatd || return 1 
	install -D -m0644 "$srcdir"/vnstatd.confd \
		"$pkgdir"/etc/conf.d/vnstatd || return 1

	install -D -m0644 examples/vnstat.cron \
		"$pkgdir"/usr/share/doc/vnstat/examples/vnstat.cron || return 1
	install -D -m0755 examples/vnstat.cgi \
		"$pkgdir"/usr/share/doc/vnstat/examples/vnstat.cgi || return 1
}

md5sums="a5a113f9176cd61fb954f2ba297f5fdb  vnstat-1.11.tar.gz
b439075575d307cd9373740fe59538f1  vnstatd.initd
810205e9cd5328b4279bd9ab1b804c36  vnstatd.confd"