aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ntopng/APKBUILD
blob: 9ee3ed1c0dda4593e4859e13ea4858ed7bfd78f8 (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
69
70
71
72
73
74
75
76
77
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=ntopng
pkgver=2.0
pkgrel=2
pkgdesc="ntop next-generation"
url="http://www.ntop.org"
arch="all"
license="GPL"
depends=
pkgusers="ntop"
pkggroups="ntop"
makedepends="autoconf automake curl-dev geoip-dev glib-dev hiredis-dev
	libpcap-dev libtool libxml2-dev lua-dev luajit-dev lua-redis openssl-dev
	paxmark rrdtool-dev sqlite-dev wget zeromq-dev zlib-dev
	linux-headers"
install="$pkgname.pre-install"
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/project/ntop/$pkgname/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	ntopng-update-geoip-db

	include-sys-types.h.patch
	"

_builddir="$srcdir"/$pkgname-$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"
	./autogen.sh
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var/lib \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make all || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" MAN_DIR="$pkgdir/usr/share" install || return 1

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -m755 -D "$srcdir"/ntopng-update-geoip-db \
	 "$pkgdir"/usr/bin/ntopng-update-geoip-db
	# ntop internal db dir
	install -d -o ntop -g ntop -m755 "$pkgdir"/var/lib/ntopng/geoip || return 1
	install -d -o ntop -g ntop -m755 "$pkgdir"/var/run/ntopng || return 1
	# need to disable PAX mprotect protection for luajit
	paxmark -m "$pkgdir"/usr/bin/$pkgname || return 1
}

md5sums="f8a20b91372d5daf17ecc6225759010e  ntopng-2.0.tar.gz
5136fbdd47fcaa104ad3b5475587d46a  ntopng.initd
6739b2c52d83c79a57c847191a64e69a  ntopng.confd
a222808fb21e06dbd7e226f137686c3f  ntopng-update-geoip-db
86dd28e89f09c5d9675d016cb3f880bd  include-sys-types.h.patch"
sha256sums="3cbfd6de1bc44d65f7c7f0de282d122d11f493f1261ba137c3b5b202e08e0251  ntopng-2.0.tar.gz
a38f34572efd8b006ee1b6c381f6f0f20e8c28a2e3ede7fcff3e7f6f6da86487  ntopng.initd
4dd1379f68be1daf7bafe0520ba6a508b550f0b0606ef63eb2bc69b8fbf4dbc9  ntopng.confd
904c7bb855e19b40d2caee076cbd855f96226b9ef681ac440c442094e25acfeb  ntopng-update-geoip-db
fdb8e063a6596b7d851b429d1d25e3f994882a9233b73e8044836d9b9110bf7f  include-sys-types.h.patch"
sha512sums="2208623cdc843b8e4ec285930d1ea74ac50c576888fce20f6fc4363e747e0dbef7f1808e7b77ae9b7f5316bca55a3e003a9926785c847bbea2c321d7f7e56d13  ntopng-2.0.tar.gz
b7924953953470971e67e463260514c30a4a3038ecbb642aec1ad66d12b5af76bdda56c99de675a1fbb106664fa0e3779a4f35fdeedc94d65af486053b7650e1  ntopng.initd
bbe7a15e0aec59f12264f39bf33abb67a12b76adac3a6554fcf1e21849aea06fce1e0c0d9831836bd46105a5cc4b3eb780866934d8711386e1cb1218dbdbbe8b  ntopng.confd
de509706c36e895159b4e57b5fe53f1fa8f32167416aad5fa391ac107f0e7e1a06fa5ce6d92816ef7cb13bf98bb74cb99fa482d03f77a6beb38eafe1d53d2deb  ntopng-update-geoip-db
1f7c7001adafc6bb2e4bfa5e39421fba0da6df57872af1041616dc58b3cdae817a6f2cf7648d009e47a302c981ab1407987a5f2e37527dc23623343bab34275a  include-sys-types.h.patch"