diff options
author | Morten Linderud | 2021-01-20 22:08:03 +0100 |
---|---|---|
committer | Morten Linderud | 2021-01-20 22:08:03 +0100 |
commit | 5ea255f12a8a2b18be34e8ac84e936fd0c9c1a3d (patch) | |
tree | ff195f18e61e8c19f09ce4404134f3ba480ff466 | |
download | aur-5ea255f12a8a2b18be34e8ac84e936fd0c9c1a3d.tar.gz |
import from community
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | PKGBUILD | 53 | ||||
-rw-r--r-- | ntop-rrdtool-1.6.0.patch | 29 | ||||
-rw-r--r-- | ntop.install | 8 | ||||
-rw-r--r-- | ntop.service | 14 |
5 files changed, 135 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..aede11dca4ec --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,31 @@ +pkgbase = ntop + pkgdesc = A network traffic probe that shows the network usage. + pkgver = 5.0.1 + pkgrel = 12 + url = https://www.ntop.org/ + install = ntop.install + arch = x86_64 + license = GPL + makedepends = subversion + makedepends = wget + makedepends = ca-certificates + depends = libevent + depends = libpcap + depends = gd + depends = glibc + depends = libxml2 + depends = openssl + depends = rrdtool + depends = pcre + depends = geoip + depends = lua + depends = python2 + options = !makeflags + source = https://sourceforge.net/projects/ntop/files/ntop/Stable/ntop-5.0.1.tar.gz + source = ntop.service + source = ntop-rrdtool-1.6.0.patch + sha512sums = f52c40e6c00c8d2f46b68078c5f9aef8ed78670f92a0a81f66f2f44c71d41bc4c001b4550f19b71c546f7c07cbbed15e0aa1ee13873ac63a11678bf2b8483f2a + sha512sums = 890213e2f7ba03854a8dc11148da4f906e21d44c76f8aac185aeab2c91f64f0a94e82f9ed8c8b43324a4a3501795f6195535ecca7d14dbbca8b612c1526277a7 + sha512sums = 3532acc6e54a1abdefeba42b3adb68cba1a0d1d2d6422e5b33fb9823b48481bb83696f097e65288c5811a6dd65ce20bff6d285d152776156b0690610d4026245 + +pkgname = ntop diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bca8480e8e1f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Lukas Fleischer <lfleischer@archlinux.org> +# Contributor: Douglas Soares de Andrade <douglas@archlinux.org> + +pkgname=ntop +pkgver=5.0.1 +pkgrel=12 +pkgdesc='A network traffic probe that shows the network usage.' +arch=('x86_64') +url='https://www.ntop.org/' +license=('GPL') +depends=('libevent' 'libpcap' 'gd' 'glibc' 'libxml2' 'openssl' 'rrdtool' 'pcre' 'geoip' 'lua' 'python2') +makedepends=('subversion' 'wget' 'ca-certificates') +options=('!makeflags') +install='ntop.install' +source=("https://sourceforge.net/projects/${pkgname}/files/${pkgname}/Stable/${pkgname}-${pkgver}.tar.gz" + 'ntop.service' ntop-rrdtool-1.6.0.patch) +sha512sums=('f52c40e6c00c8d2f46b68078c5f9aef8ed78670f92a0a81f66f2f44c71d41bc4c001b4550f19b71c546f7c07cbbed15e0aa1ee13873ac63a11678bf2b8483f2a' + '890213e2f7ba03854a8dc11148da4f906e21d44c76f8aac185aeab2c91f64f0a94e82f9ed8c8b43324a4a3501795f6195535ecca7d14dbbca8b612c1526277a7' + '3532acc6e54a1abdefeba42b3adb68cba1a0d1d2d6422e5b33fb9823b48481bb83696f097e65288c5811a6dd65ce20bff6d285d152776156b0690610d4026245') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + + # Python2 fix + find . -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@' + sed -i 's/python-config/python2-config/' configure.in + + # Fix build with rrdtool 1.6 (Fedora) + patch -p1 -i ../ntop-rrdtool-1.6.0.patch +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + ./autogen.sh --prefix=/usr --sysconfdir=/usr/share --localstatedir=/var/lib --disable-snmp + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make DESTDIR="${pkgdir}" install-recursive + + install -dm0755 -o nobody -g nobody "${pkgdir}/var/lib/ntop" + install -dm0755 -o nobody -g nobody "${pkgdir}/var/lib/ntop/rrd" + + for _f in "${pkgdir}/usr/lib/ntop/plugins/"*.so; do + _plug="$(basename ${_f})" + ln -sf "../../lib${_plug}" "${_f}" + done + + install -Dm0644 "${srcdir}/ntop.service" "${pkgdir}/usr/lib/systemd/system/ntop.service" +} diff --git a/ntop-rrdtool-1.6.0.patch b/ntop-rrdtool-1.6.0.patch new file mode 100644 index 000000000000..51439390f179 --- /dev/null +++ b/ntop-rrdtool-1.6.0.patch @@ -0,0 +1,29 @@ +diff -up ntop-5.0.1/configure.in.rrdtool ntop-5.0.1/configure.in +--- ntop-5.0.1/configure.in.rrdtool 2016-10-16 20:32:46.194496951 +0200 ++++ ntop-5.0.1/configure.in 2016-10-16 20:32:57.392486940 +0200 +@@ -893,19 +893,19 @@ else + fi + fi + +-RRD_LIB="-L${RRD_HOME}/lib -lrrd_th" ++RRD_LIB="-L${RRD_HOME}/lib -lrrd" + +-if test -f "$RRD_HOME/lib/librrd_th.so"; then ++if test -f "$RRD_HOME/lib/librrd.so"; then + AC_MSG_RESULT(checking for rrdtool... yes) + else +- if test -f "$RRD_HOME/lib/librrd_th.dylib"; then # OSX ++ if test -f "$RRD_HOME/lib/librrd.dylib"; then # OSX + AC_MSG_RESULT(checking for rrdtool... yes) + else +- if test -f "$RRD_HOME/lib/librrd_th.a"; then ++ if test -f "$RRD_HOME/lib/librrd.a"; then + AC_MSG_RESULT(checking for rrdtool... yes) + else +- AC_CHECK_LIB([rrd_th], [main]) +- if test ".${ac_cv_lib_rrd_th_main}" != ".yes"; then ++ AC_CHECK_LIB([rrd], [main]) ++ if test ".${ac_cv_lib_rrd_main}" != ".yes"; then + AC_MSG_ERROR(Unable to find RRD at $RRD_HOME: please use --with-rrd-home=DIR); + AC_MSG_ERROR(RRD source can be downloaded from http://www.rrdtool.org/); + else diff --git a/ntop.install b/ntop.install new file mode 100644 index 000000000000..8d8063751ffc --- /dev/null +++ b/ntop.install @@ -0,0 +1,8 @@ +post_install() { + /bin/cat <<EOF +==> Before running the daemon script for the first time, you need to run + ntop as the root user to set an administrator password. +==> If you attempt to run ntop as a daemon without setting a password, a + FATAL ERROR message is generated and ntop stops. +EOF +} diff --git a/ntop.service b/ntop.service new file mode 100644 index 000000000000..c18a2c83a60e --- /dev/null +++ b/ntop.service @@ -0,0 +1,14 @@ +[Unit] +Description=A network traffic probe similar to the UNIX top command +Requires=network.target +ConditionPathExists=/var/lib/ntop/ntop_pw.db +After=syslog.target network.target + +[Service] +Environment=LANG=C +ExecStart=/usr/bin/ntop -i eth0 -w 3000 +Type=simple +StandardError=syslog + +[Install] +WantedBy=multi-user.target |