Files
non-aur-packages/ntopng/PKGBUILD
2019-02-13 20:32:14 +01:00

58 lines
2.2 KiB
Bash

# Maintainer: Giovanni Harting <539@idlegandalf.com>
# Contributor: Barry Smith <brrtsm at gmmal dot com>
# Contributor: jrdemasi <jrdemasi@gmai.com>
# Contributor: Fernando Manfredi <contact at acidhub.click> Contributor: Evan Teitelman <teitelmanevan at gmail dot com>
# Contributor: Ari Mizrahi <codemunchies@gmail.com>
# Contributor: CRT <cirkit@kode.email>
validpgpkeys=('EFD9413B17293AFDFE6EA6F1402A088DEDF104CB')
pkgname=ntopng
pkgver=3.8
_ndpiver=2.6
pkgrel=1
pkgdesc='The next generation version of the original ntop, a network traffic probe that shows the network usage'
arch=('x86_64' 'i686')
url='http://www.ntop.org/'
license=('GPL3')
depends=('redis' 'geoip' 'glib2' 'curl' 'libmaxminddb' 'libmariadbclient' 'libpcap' 'sqlite' 'json-c')
makedepends=('automake' 'libtool' 'wget' 'libxml2')
source=("https://github.com/ntop/$pkgname/archive/$pkgver.tar.gz"
"https://github.com/ntop/nDPI/archive/$_ndpiver.tar.gz"
"$pkgname.service"
"ntopng"
"mongoose.patch")
sha512sums=('2236f9931fc606e4d0a6da379c480a48bacd441cf199a310ea690a03d74d08f369825ea02e3c13828a10f716a5531d4e6774876f253ab348a52bcf8bd8d5107f'
'5b82786741c3e160a7519f800a52802a39dad198a89fa61fbf45beffeab911c2c25bec4319c7f93011d0cacb6b734ded8637abc0ae3cbd7dd3686a6e2ebb78a2'
'6683760f787eea41d030736d4135f0ec0e48b9c2f2164c4e1a9e89acf80b140ce97b997f62b042861814dd823dee47af1f0456acd28ac7c37dab3695ef7267fb'
'86ab2590463652173f3d7861dfa7e6ba0818eb418c52bc1a7ade873bf5d3ef4ac12d5a35c2f22dea924d5b490eb20ae29bed2d402a82622935a6b3b9406386b7'
'3652880a2b1899950a8d534d57ffded396e4aa3238831993481d29a527a518ca1210c13c20330281d59c9b1c0287aed1a0312b152dc82e7f75aaaf284310a880')
build() {
# build nDPI
cd $srcdir/nDPI-$_ndpiver
./autogen.sh
./configure
make
export NDPI_HOME=$srcdir/nDPI-$_ndpiver
# build ntopng
cd $srcdir/$pkgname-$pkgver
patch -Np1 -i "${srcdir}/mongoose.patch"
./autogen.sh
./configure --prefix=/usr --datadir=/usr/share
make geoip
make
}
package() {
cd $srcdir/$pkgname-$pkgver
make install DESTDIR=$pkgdir
mv $pkgdir/usr/{man,share/}
install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm644 "$srcdir/$pkgname" "$pkgdir/etc/conf.d/$pkgname"
}