summaryrefslogtreecommitdiffstats
path: root/testing/vnstat/APKBUILD
blob: 12d72f4074a50075671c5e0f62a4a7a1a9a0e398 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>

pkgname=vnstat
pkgver=1.12
pkgrel=0
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
	fix-includes.patch
        vnstatd.initd
        vnstatd.confd"

_builddir="$srcdir"/vnstat-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	make all || return 1
}

package() {
	cd "$_builddir"
	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 -m0755 examples/vnstat.cgi \
		"$pkgdir"/usr/share/doc/vnstat/examples/vnstat.cgi || return 1
}

md5sums="a154b2196771e06a8accd1c24374009c  vnstat-1.12.tar.gz
466648e8d4cb367a0c2eab6871d77fc5  fix-includes.patch
b439075575d307cd9373740fe59538f1  vnstatd.initd
810205e9cd5328b4279bd9ab1b804c36  vnstatd.confd"
sha256sums="af1050d9c1b22d4b9742fe0d1818de9eb1037b8e7f9ba67b962e108d8527be69  vnstat-1.12.tar.gz
5fd0d235ed43f841f0a36ce2f32d231e28a5714b6c6ba9b19f4c709214f7769d  fix-includes.patch
93971b912eef59e5174dc4142c5fecf283dcd15164adedddcf89915a020b8cb8  vnstatd.initd
2cd5b91f86bc26aca85166a50de89faaccbf1ea8f219efb48b50b7ed0f3fe377  vnstatd.confd"
sha512sums="0d6b5f362bbcbb4a104f82b8e350f5d8b071e974a3fdfb100333c3d8e5a096a71a97360543d2594fd3f2108df8bb03ffffc4c52d396f28723005a5d1bf605eb1  vnstat-1.12.tar.gz
67ab0a08380d598a31b4e7b0ed7be382792514b096e0b79fd886a00a7cb3b32aa048ea27ca19d1967eadbdac0fc39f23ed86f9dfeb3968afdd5e3d7d2186d923  fix-includes.patch
37093824da831d935351e75c082caae561833227bba5afd4baec45b2a878dec29a824c3278a954b77eb7feccbad0a80d63d7d2c2a58d6d6eef27a8843831251f  vnstatd.initd
d645817913d5b52e928561b3d6a0e869d8ae5db81b97af91c1ebfc6a8cd2df666c1653e6dc5f91c0a890033a89692f77eaf081c1cae5590446c69a70ea263946  vnstatd.confd"