# Contributor: Leonardo Arena # Maintainer: Natanael Copa pkgname=nfdump pkgver=1.6.14 pkgrel=1 pkgdesc="The nfdump tools collect and process netflow data on the command line." url="http://nfdump.sourceforge.net/" arch="all" license="BSD" depends="" depends_dev="" makedepends="bison bzip2-dev flex $depends_dev rrdtool-dev" install="" subpackages="$pkgname-doc $pkgname-dbg nfprofile sfcapd" source="$pkgname-$pkgver.tar.gz::https://github.com/phaag/nfdump/archive/v$pkgver.tar.gz fix-64bit-fts-compat.patch fix-shared-libs.patch fix-security-issues-in-netflow_v9-and-ipfix.patch nfcapd.confd nfcapd.initd sfcapd.confd sfcapd.initd " _builddir="$srcdir"/$pkgname-$pkgver prepare() { local i 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" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --enable-nfprofile \ --enable-sflow \ --enable-shared \ || return 1 make -j1 || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 install -D -m755 "$srcdir"/nfcapd.initd \ "$pkgdir"/etc/init.d/nfcapd install -D -m644 "$srcdir"/nfcapd.confd \ "$pkgdir"/etc/conf.d/nfcapd } 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 } 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 } md5sums="41fd9c3669455cdc05dd3917e13cc2f2 nfdump-1.6.14.tar.gz e7f9467142159da5ebbb4aa858aae142 fix-64bit-fts-compat.patch be3bba5d4889960a5e5f8ab44b39f360 fix-shared-libs.patch 6b3ce61436a209a2f46e46c80d8ae223 fix-security-issues-in-netflow_v9-and-ipfix.patch 541c45b9ac0e85ac955dd58919972b18 nfcapd.confd a82001153dbdfa6c4125064fcc7cd090 nfcapd.initd 443ef11c9b458c12d0efea627742732c sfcapd.confd 1ac7c20be80b87fc725310747125e081 sfcapd.initd" sha256sums="7bf1b17cdcf81c399c6aaf87e0a8cbe12d81a9e33831629eb3a792878d5f80b1 nfdump-1.6.14.tar.gz 8ffd9160bb5cb639cec08ac68be5cbd33ef918e41630d02c18a75e03881cb5a9 fix-64bit-fts-compat.patch abaa5461a96be24fae7b959aadc2d804ed5382382e92c260a9f0dc4acf14b8dd fix-shared-libs.patch 39d1f37abee626863ad589439235d4e182eb9faf90bcbd0a75582aacee63a185 fix-security-issues-in-netflow_v9-and-ipfix.patch 7cb26698b26f5cd6c9c6cb2b49bb7be3cc0faffe851c5ac5c78e0a41984a276f nfcapd.confd 33c3b5c42655410661f1019e3b8bccb8b875400861a945a7dd784f80520f8a97 nfcapd.initd 4559669b23534a7bec9cc9d342e7abd55316393ccb4dc57e9b335ac27bdf920c sfcapd.confd 4fd63dee5323ce4116fffffa7573bb6a0f781d36867204e7d3670c182a078c56 sfcapd.initd" sha512sums="c5e5540526dfce3798728930576e4c7930c3ff80893a94d7f9e65c7c577d1e78bdc47a99c47cee837327ad202197afc378d2408b1b9b847044d0110146055ffe nfdump-1.6.14.tar.gz 71a838d493658a3a8479bc9eca70a857fd8629937d4954d21c1d5453d6cc122c089f72e3e109425c902439ee8cfaa273b4089ac347d1fe926473ce6062b7c49a fix-64bit-fts-compat.patch 29c2da71f139da273de221a5c4a07ceb6603060840dea9a34934316fe9a627b170540d1e3d9ed03b0d7ccf431171cb713ccd99aa82cdd3f8df9cf787a390e5d3 fix-shared-libs.patch ee3b82f1283f3dceb36cf60abcee7f5a8fb6c8fe257e2233c3fbb9a34b3c5608dfa101fd473c8b839356a9d1c294a37b9e65657ff1b2d5c015015ff90b2d2c97 fix-security-issues-in-netflow_v9-and-ipfix.patch fcb467f819f2b73ac0e13de6de4d6c94cafd3866a7a56685d5d4a048fa975135299655e896ff8370c8c5061d03ab38644623f8be455c08dfe5f630f152820148 nfcapd.confd 97e432e884dd1cc8f27c2d7398bb0320164d46dea06c64ad72fa385d190998b3d62356634962f42652daf6e31f237baa2f3f3efad47c3fc38cc6bea799db61cc nfcapd.initd abe594a95a9320bec1d6ee6af6b75cd4d176526d4b10d07aa7ed79fc292b51c341339ba8e1e468df9ec2aae138b1dd66e3a291921938217835ac33819da9d153 sfcapd.confd 7a65c80186a8708a27e90a7239d1b44ee919c3bbf8cd1ca07ef5d35a623d0dce5eac516b65ba7a98c5fcfab5bad6c15e1f03af38a06eb6280afd1c1f0f52cee4 sfcapd.initd"