aboutsummaryrefslogtreecommitdiffstats
path: root/community/vnstat/APKBUILD
blob: 71feb241d1c9a3a170af0bab40fa16b9080497b7 (plain) (blame)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=vnstat
pkgver=2.7
pkgrel=0
pkgdesc="Console-based network traffic monitor"
url="https://humdi.net/vnstat"
arch="all"
license="GPL-2.0-or-later"
install="$pkgname.pre-install"
options="!check" # make check is usesless
makedepends="sqlite-dev gd-dev"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://humdi.net/vnstat/vnstat-$pkgver.tar.gz
	vnstatd.initd
	vnstatd.confd
	"

prepare() {
	default_prepare

	update_config_guess
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

package() {
	make DESTDIR="$pkgdir" install

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

	install -D -m0755 examples/vnstat.cgi \
		"$pkgdir"/usr/share/doc/vnstat/examples/vnstat.cgi
}

check() {
	make check
}

sha512sums="
3d1674ddb5269d29d4d758551dc3e58fb1858a7dd790914c7d74047443b25d242c91f8ab20bdede9c1b061d6b682d73f3d6c1a8aa656a9676bc33c0ed9b1b2d4  vnstat-2.7.tar.gz
f419af7075ba423fd2a28f27c520c9833a0ad994f471df5ab56b8175d02bf7d885718d2781a5538e32d19256e4518b06629a87670380db8a5cc780b76b4f0465  vnstatd.initd
bde20cffcfe6e2f7f7924ad7e7b4c7c2fdd6b92bacb7ec7c670413354c3b5a0bb07321444c4bd8ff07b55cb861bf6442a7065eee856f74658be1f25a451c8109  vnstatd.confd
"