aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-03-27 12:28:41 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-04-04 02:25:50 +0000
commit11ca8e0568d4571d7221c76be98d73965ae97246 (patch)
tree6a43dadeb4d15fde89cd9334a328b75709262027 /unmaintained
parent14e662ce80100ddc693b5e65eb917ca4fc2d3eec (diff)
downloadaports-11ca8e0568d4571d7221c76be98d73965ae97246.tar.bz2
aports-11ca8e0568d4571d7221c76be98d73965ae97246.tar.xz
unmaintained/ntop: move from main
it is no longer maintained in favour of ntopng
Diffstat (limited to 'unmaintained')
-rw-r--r--unmaintained/ntop/APKBUILD57
-rw-r--r--unmaintained/ntop/automake.patch19
-rw-r--r--unmaintained/ntop/include-sys-types.h.patch20
-rw-r--r--unmaintained/ntop/ntop-rrdtool-1.6.0.patch29
-rw-r--r--unmaintained/ntop/ntop-update-geoip-db21
-rw-r--r--unmaintained/ntop/ntop.confd9
-rw-r--r--unmaintained/ntop/ntop.initd30
-rwxr-xr-xunmaintained/ntop/ntop.pre-install6
-rw-r--r--unmaintained/ntop/reorder_make_deps11
9 files changed, 202 insertions, 0 deletions
diff --git a/unmaintained/ntop/APKBUILD b/unmaintained/ntop/APKBUILD
new file mode 100644
index 0000000000..083ad8b730
--- /dev/null
+++ b/unmaintained/ntop/APKBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=ntop
+pkgver=5.0.1
+pkgrel=15
+pkgdesc="Network traffic probe"
+url="https://www.ntop.org/"
+arch="all"
+license="GPL-3.0-only"
+pkgusers="ntop"
+pkggroups="ntop"
+makedepends="autoconf automake freetype-dev gdbm-dev geoip-dev
+ libart-lgpl-dev libevent-dev libpcap-dev libpng-dev libtool libxml2-dev
+ lua-dev openssl-dev python2-dev rrdtool-dev subversion wget zlib-dev
+ linux-headers"
+install="$pkgname.pre-install"
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://sourceforge.net/projects/ntop/files/ntop/Stable/ntop-$pkgver.tar.gz
+ include-sys-types.h.patch
+ automake.patch
+ reorder_make_deps
+ ntop-rrdtool-1.6.0.patch
+ ntop.initd
+ ntop.confd
+ ntop-update-geoip-db"
+
+build() {
+ update_config_guess
+ update_config_sub
+ ./autogen.sh --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var/lib \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --disable-snmp
+ patch -p1 < "$srcdir"/reorder_make_deps
+ make
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+ 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"/ntop-update-geoip-db \
+ "$pkgdir"/usr/bin/ntop-update-geoip-db
+ # ntop internal db dir
+ install -d -o ntop -g ntop -m755 "$pkgdir"/var/lib/ntop
+ chown -R ntop.ntop "$pkgdir"/usr/share/ntop
+}
+
+sha512sums="f52c40e6c00c8d2f46b68078c5f9aef8ed78670f92a0a81f66f2f44c71d41bc4c001b4550f19b71c546f7c07cbbed15e0aa1ee13873ac63a11678bf2b8483f2a ntop-5.0.1.tar.gz
+b67705152cd8723ba3e1c340ca55267134dddae04dd281fae262d07ce273a78d24bf40c297fe61ea7f70deb9cb7d59445e8a3ce360ed7810497e63052e1a9214 include-sys-types.h.patch
+ce284679f9ecf589139b6cfdba95a76df5205f5292a5ff88b7cdeb39fe01b4fef27fb097a6a594017aa015a2474fea6c5729917423398a911e1732329ec1504a automake.patch
+ab1fb14317721a18d044145ddb552f827ec02c042ae591af6e7a738c28defcce53767493f01dcc31a6f4bfeb0d8032ceeca330a425a6c6e4efde0b22f8e1be9e reorder_make_deps
+3532acc6e54a1abdefeba42b3adb68cba1a0d1d2d6422e5b33fb9823b48481bb83696f097e65288c5811a6dd65ce20bff6d285d152776156b0690610d4026245 ntop-rrdtool-1.6.0.patch
+22b61d88e1fc30106d07ee87701ff46b7f63f1ee2aa7bb5666d9cb5cb6251c583f793c80a5d799ac27fcb63650e7ecacb37e7992feb8aa8cbc2d326b36b05a8f ntop.initd
+8693050cab03eeb29b59e0a7b173c7791625e8cd6bc33eaa5d74a50ab3ecf435577d7918626cfe3963a0d23d4522a737737b2b9fd8335df29784858a6191813d ntop.confd
+7b5ae8dbd7d5d084c7278af1deb64a903b106663c3195df70acead3e8d7e14fbd996e69d5132c0ddac9147b3e70892c91695d834ab7b22fec2569efcd52df5f6 ntop-update-geoip-db"
diff --git a/unmaintained/ntop/automake.patch b/unmaintained/ntop/automake.patch
new file mode 100644
index 0000000000..db68ccee2b
--- /dev/null
+++ b/unmaintained/ntop/automake.patch
@@ -0,0 +1,19 @@
+--- ./configure.in.orig 2012-12-31 21:13:54.969154614 +0000
++++ ./configure.in 2012-12-31 21:14:11.542636354 +0000
+@@ -56,7 +56,7 @@
+ dnl> generate the config header
+ dnl>
+ umask 002
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADER(config.h)
+
+ HAS_ERROR=
+ HAS_WARNING=
+@@ -324,7 +324,6 @@
+ echo
+ echo "Checking C compiler program and features..."
+ echo
+-AM_PROG_CC_STDC
+ if test ".${ac_cv_prog_cc_stdc}" = ".no"; then
+ echo
+ echo "*******************************************************************"
diff --git a/unmaintained/ntop/include-sys-types.h.patch b/unmaintained/ntop/include-sys-types.h.patch
new file mode 100644
index 0000000000..dfb0e7378c
--- /dev/null
+++ b/unmaintained/ntop/include-sys-types.h.patch
@@ -0,0 +1,20 @@
+--- a/nDPI/src/include/ipq_api.h.orig
++++ b/nDPI/src/include/ipq_api.h
+@@ -24,6 +24,7 @@
+ #ifndef __IPOQUE_API_INCLUDE_FILE__
+ #define __IPOQUE_API_INCLUDE_FILE__
+
++#include <sys/types.h>
+
+ #if defined(HAVE_NTOP) && defined(WIN32)
+ #include <winsock2.h>
+--- a/nDPI/src/lib/ipq_main.c.orig
++++ b/nDPI/src/lib/ipq_main.c
+@@ -21,6 +21,7 @@
+ */
+
+
++#include <sys/types.h>
+ #include "ipq_main.h"
+ #include "ipq_protocols.h"
+ #include "ipq_utils.h"
diff --git a/unmaintained/ntop/ntop-rrdtool-1.6.0.patch b/unmaintained/ntop/ntop-rrdtool-1.6.0.patch
new file mode 100644
index 0000000000..51439390f1
--- /dev/null
+++ b/unmaintained/ntop/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/unmaintained/ntop/ntop-update-geoip-db b/unmaintained/ntop/ntop-update-geoip-db
new file mode 100644
index 0000000000..2bf3faaf68
--- /dev/null
+++ b/unmaintained/ntop/ntop-update-geoip-db
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+BASE_URL=http://geolite.maxmind.com/download/geoip/database
+
+echo "Updating NTOP GeoIP databases..."
+
+cd /var/lib/ntop || exit
+
+for u in asnum/GeoIPASNum.dat.gz GeoLiteCity.dat.gz ; do
+ FILE_GZ=${u#*/}
+ FILE=${FILE_GZ%.gz}
+ wget -nv -O ${FILE_GZ} ${BASE_URL}/${u} &&
+ gunzip < ${FILE_GZ} > .${FILE} &&
+ mv -f .${FILE} ${FILE} &&
+ rm -f ${FILE_GZ} ||
+ exit
+done
+
+/etc/init.d/ntop --quiet status && /etc/init.d/ntop restart
+
+echo "NTOP GeoIP databases were successfully updated"
diff --git a/unmaintained/ntop/ntop.confd b/unmaintained/ntop/ntop.confd
new file mode 100644
index 0000000000..352a26fa9b
--- /dev/null
+++ b/unmaintained/ntop/ntop.confd
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/ntop
+
+# Set preferred options here
+#NTOP_OPTS="--http-server 3000 --https-server 0 --interface eth0"
+
+# suggestions from bug #136983 (use it in case you experience ntop hangs)
+#NTOP_OPTS="u ntop -P /var/lib/ntop --disable-schedyield --http-server 3000 --https-server 3001"
+
+NTOP_OPTS="-u ntop -P /var/lib/ntop"
diff --git a/unmaintained/ntop/ntop.initd b/unmaintained/ntop/ntop.initd
new file mode 100644
index 0000000000..ec9afd576f
--- /dev/null
+++ b/unmaintained/ntop/ntop.initd
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /var/lib/ntop/ntop_pw.db ]; then
+ eerror "You need to set a password first by running"
+ eerror "ntop --set-admin-password"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ntop"
+ export LC_ALL=C # apparently doesn't work with some locales (#191576 and #205382)
+ export GDFONTPATH=/usr/share/fonts/corefonts # apparently the only font that works (#231705)
+ start-stop-daemon --start --exec /usr/bin/ntop -- -d -L ${NTOP_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ntop"
+ start-stop-daemon --stop --retry 30 --pidfile /var/run/ntop.pid
+ eend $?
+}
diff --git a/unmaintained/ntop/ntop.pre-install b/unmaintained/ntop/ntop.pre-install
new file mode 100755
index 0000000000..0fea81baa7
--- /dev/null
+++ b/unmaintained/ntop/ntop.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S ntop 2>/dev/null
+adduser -S -D -H -h /var/lib/ntop -s /sbin/nologin -G ntop -g ntop ntop 2>/dev/null
+
+exit 0
diff --git a/unmaintained/ntop/reorder_make_deps b/unmaintained/ntop/reorder_make_deps
new file mode 100644
index 0000000000..3a104272ee
--- /dev/null
+++ b/unmaintained/ntop/reorder_make_deps
@@ -0,0 +1,11 @@
+--- a/plugins/Makefile
++++ b/plugins/Makefile
+@@ -793,7 +793,7 @@
+ done
+ check-am: all-am
+ check: check-recursive
+-all-am: Makefile $(PROGRAMS) $(LTLIBRARIES)
++all-am: Makefile $(LTLIBRARIES) $(PROGRAMS)
+ installdirs: installdirs-recursive
+ installdirs-am:
+ for dir in "$(DESTDIR)$(libdir)"; do \