APKBUILD 2.34 KB
Newer Older
1
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Andrew Manison's avatar
Andrew Manison committed
3
pkgname=nfdump
prspkt's avatar
prspkt committed
4 5
pkgver=1.6.17
pkgrel=0
Andrew Manison's avatar
Andrew Manison committed
6 7 8
pkgdesc="The nfdump tools collect and process netflow data on the command line."
url="http://nfdump.sourceforge.net/"
arch="all"
9
license="BSD"
Andrew Manison's avatar
Andrew Manison committed
10 11
depends=""
depends_dev=""
prspkt's avatar
prspkt committed
12
makedepends="autoconf automake libtool bison bzip2-dev flex $depends_dev rrdtool-dev"
Andrew Manison's avatar
Andrew Manison committed
13
install=""
14
subpackages="$pkgname-doc $pkgname-dbg nfprofile sfcapd"
15
source="$pkgname-$pkgver.tar.gz::https://github.com/phaag/nfdump/archive/v$pkgver.tar.gz
16
	nfcapd.confd
17 18 19 20
	nfcapd.initd
	sfcapd.confd
	sfcapd.initd
	"
Andrew Manison's avatar
Andrew Manison committed
21 22 23

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
prspkt's avatar
prspkt committed
24 25
	default_prepare
	./autogen.sh
Andrew Manison's avatar
Andrew Manison committed
26 27 28 29
}

build() {
	cd "$_builddir"
30 31 32 33
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
34
		--enable-nfprofile \
35
		--enable-sflow \
36
		--enable-shared \
37
		|| return 1
38
	make -j1 || return 1
Andrew Manison's avatar
Andrew Manison committed
39 40 41 42 43
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
44 45 46 47 48
	install -D -m755 "$srcdir"/nfcapd.initd \
		"$pkgdir"/etc/init.d/nfcapd

	install -D -m644 "$srcdir"/nfcapd.confd \
		"$pkgdir"/etc/conf.d/nfcapd
Andrew Manison's avatar
Andrew Manison committed
49 50
}

51 52 53 54 55 56 57 58
nfprofile() {
	pkgdesc="Create views of the data with NFdump filters"
	depends="nfdump"
	cd "$_builddir"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/nfprofile "$subpkgdir"/usr/bin || return 1
}

59 60 61 62 63 64 65 66 67 68 69
sfcapd() {
	pkgdesc="sFlow collector"
	cd "$_builddir"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/sfcapd "$subpkgdir"/usr/bin || return 1
	install -D -m644 "$srcdir"/sfcapd.confd \
                "$subpkgdir"/etc/conf.d/sfcapd
	install -D -m755 "$srcdir"/sfcapd.initd \
                "$subpkgdir"/etc/init.d/sfcapd
}

prspkt's avatar
prspkt committed
70
sha512sums="dd015665c49d40e0bc4395d6041b32d7a53c7e71db77347f08082806c0a13633cd0100f1fb2c63898c565754a00dd389d4235a148715cd157f4ec865246fa97b  nfdump-1.6.17.tar.gz
71
fcb467f819f2b73ac0e13de6de4d6c94cafd3866a7a56685d5d4a048fa975135299655e896ff8370c8c5061d03ab38644623f8be455c08dfe5f630f152820148  nfcapd.confd
72 73 74
97e432e884dd1cc8f27c2d7398bb0320164d46dea06c64ad72fa385d190998b3d62356634962f42652daf6e31f237baa2f3f3efad47c3fc38cc6bea799db61cc  nfcapd.initd
abe594a95a9320bec1d6ee6af6b75cd4d176526d4b10d07aa7ed79fc292b51c341339ba8e1e468df9ec2aae138b1dd66e3a291921938217835ac33819da9d153  sfcapd.confd
7a65c80186a8708a27e90a7239d1b44ee919c3bbf8cd1ca07ef5d35a623d0dce5eac516b65ba7a98c5fcfab5bad6c15e1f03af38a06eb6280afd1c1f0f52cee4  sfcapd.initd"