summaryrefslogtreecommitdiffstats
path: root/main/pmacct/APKBUILD
blob: 075869081c88789f23b8e45104150f5f25076852 (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
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=pmacct
pkgver=0.14.1
pkgrel=0
pkgdesc="Measure, account, classify, aggregate and export IPv4 and IPv6 traffic"
url="http://www.pmacct.net/"
arch="all"
license="GPL"
depends=
makedepends="libpcap-dev libpq postgresql-dev zlib-dev"
install="$pkgname.post-install $pkgname.post-deinstall"
subpackages="$pkgname-doc"
source="http://www.pmacct.net/$pkgname-$pkgver.tar.gz
	pmacct.initd
	pmacct.confd
	pmacctd.conf
	sfacctd.conf
	nfacctd.conf
	uacctd.conf"

_builddir="$srcdir"/$pkgname-$pkgver

#prepare() {
#	cd "$_builddir"
#	apply patches here
#}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-pgsql \
		--enable-64bit \
		--enable-threads \
		--enable-ulog \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/pmacctd
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/pmacctd
	install -m644 -D "$srcdir"/pmacctd.conf "$pkgdir"/etc/pmacctd.conf
	install -m644 -D "$srcdir"/nfacctd.conf "$pkgdir"/etc/nfacctd.conf
	install -m644 -D "$srcdir"/sfacctd.conf "$pkgdir"/etc/sfacctd.conf
	install -m644 -D "$srcdir"/uacctd.conf "$pkgdir"/etc/uacctd.conf
	mkdir -p $pkgdir/usr/share/doc/pmacct/examples
	mkdir -p $pkgdir/usr/share/doc/pmacct/sql
	cp examples/* $pkgdir/usr/share/doc/pmacct/examples
	cp sql/README.* $pkgdir/usr/share/doc/pmacct
	cp sql/* $pkgdir/usr/share/doc/pmacct/sql
}

md5sums="a1a9805af114df913470933873bba594  pmacct-0.14.1.tar.gz
8ebf022a90bb795e6726fee4065bd386  pmacct.initd
394bf0687572261e90eecd70c33c8ede  pmacct.confd
ecb85e4f9bcb1f6ef0ee1426f979be2b  pmacctd.conf
7a549e51959946805a0c1d094213f08c  sfacctd.conf
a3b1c231911f9bab7bfa73dbbcb308eb  nfacctd.conf
7a549e51959946805a0c1d094213f08c  uacctd.conf"