commit: 53de44dea9dee40bfc7b872cb40ecfd84621874b
Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo
<DOT> org>
AuthorDate: Sun Jul 31 12:11:30 2016 +0000
Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Sun Jul 31 12:13:29 2016 +0000
URL: https://gitweb.gentoo.org/dev/jmbsvicetto.git/commit/?id=53de44de
net-analyzer/ntopng: Add to my overlay and bump to release 2.4.
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT>
gentoo.org>
net-analyzer/ntopng/Manifest | 1 +
.../ntopng/files/ntopng-dont-build-ndpi.patch | 16 +++++
net-analyzer/ntopng/files/ntopng.conf.d | 3 +
net-analyzer/ntopng/files/ntopng.init.d | 20 ++++++
net-analyzer/ntopng/metadata.xml | 11 +++
net-analyzer/ntopng/ntopng-2.4.ebuild | 80 ++++++++++++++++++++++
6 files changed, 131 insertions(+)
diff --git a/net-analyzer/ntopng/Manifest b/net-analyzer/ntopng/Manifest
new file mode 100644
index 0000000..78b1f14
--- /dev/null
+++ b/net-analyzer/ntopng/Manifest
@@ -0,0 +1 @@
+DIST ntopng-2.4-stable.tar.gz 134074662 SHA256
f44e2faf3cb712d75106fc9c594139fbfd437edf4a7e6e9ed65134e1f47ad355 SHA512
515dd7889ae3aaf2482371bb2c55ab7300cf4207fe07f37029b7529bfb710379c19a54f58cf6df87e42454c0c99d15291af334adff676252301d9edd0acf3c7a
WHIRLPOOL
ba5d9fce207d1a89e5c8b35705b0aaeb66235153b91eaf7a84b1c50bcb4b897f992c81aa7fd316ad2d87458cdfdcd4d63de37d0a00375706a036f491ba448c7b
diff --git a/net-analyzer/ntopng/files/ntopng-dont-build-ndpi.patch
b/net-analyzer/ntopng/files/ntopng-dont-build-ndpi.patch
new file mode 100644
index 0000000..b189cba
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng-dont-build-ndpi.patch
@@ -0,0 +1,16 @@
+--- configure.ac.old 2016-04-25 21:29:36.452888380 +0200
++++ configure.ac 2016-04-25 21:30:04.679554971 +0200
+@@ -62,13 +62,6 @@
+ fi
+
+ NDPI_LIB=$NDPI_HOME/src/lib/.libs/libndpi.a
+-AC_MSG_CHECKING(for $NDPI_LIB)
+-if test -f "$NDPI_LIB" ; then :
+- AC_MSG_RESULT(found $NDPI_LIB)
+-else
+- AC_MSG_RESULT(not found $NDPI_LIB: compiling)
+- cd $NDPI_HOME; ./autogen.sh; make; cd -
+-fi
+
+ AC_MSG_CHECKING(for ntopng professional edition)
+ if test -d "pro"; then :
diff --git a/net-analyzer/ntopng/files/ntopng.conf.d
b/net-analyzer/ntopng/files/ntopng.conf.d
new file mode 100644
index 0000000..b53f5d4
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng.conf.d
@@ -0,0 +1,3 @@
+NTOPNG_OPTS="-i eth0"
+NTOPNG_OPTS="${NTOPNG_OPTS} -m 192.168.0.0/16"
+NTOPNG_OPTS="${NTOPNG_OPTS} -d /var/lib/ntopng"
diff --git a/net-analyzer/ntopng/files/ntopng.init.d
b/net-analyzer/ntopng/files/ntopng.init.d
new file mode 100644
index 0000000..2764118
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng.init.d
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net redis
+}
+
+start() {
+ ebegin "Starting ntopng"
+ start-stop-daemon --start --exec /usr/bin/ntopng --pidfile
/var/run/ntopng.pid --make-pidfile --background -e
LUA_PATH='/usr/share/ntopng/scripts/lua/modules/?.lua' -- --user ntopng
${NTOPNG_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ntopng"
+ start-stop-daemon --stop --exec /usr/bin/ntopng --pidfile
/var/run/ntopng.pid
+ eend $?
+}
diff --git a/net-analyzer/ntopng/metadata.xml b/net-analyzer/ntopng/metadata.xml
new file mode 100644
index 0000000..f808124
--- /dev/null
+++ b/net-analyzer/ntopng/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>[email protected]</email>
+ <name>Jorge Manuel B. S. Vicetto</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">ntop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/ntopng/ntopng-2.4.ebuild
b/net-analyzer/ntopng/ntopng-2.4.ebuild
new file mode 100644
index 0000000..bca272d
--- /dev/null
+++ b/net-analyzer/ntopng/ntopng-2.4.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils user
+
+DESCRIPTION="Network traffic analyzer with web interface"
+HOMEPAGE="http://www.ntop.org/"
+SRC_URI="mirror://sourceforge/ntop/${PN}/${P}-stable.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ dev-db/sqlite:3
+ dev-lang/luajit:2
+ dev-libs/geoip
+ dev-libs/glib:2
+ dev-libs/libxml2
+ net-analyzer/rrdtool
+ net-libs/libpcap
+ dev-python/pyzmq
+"
+RDEPEND="${DEPEND}
+ dev-db/redis
+"
+
+S="${WORKDIR}"/${P}-stable
+
+src_prepare() {
+ cat "${S}/configure.seed" | sed "s/@VERSION@/${PV}/g" | sed
"s/@SHORT_VERSION@/${PV}/g" > "${S}/configure.ac"
+ epatch "${FILESDIR}/${PN}-dont-build-ndpi.patch"
+ eautoreconf
+
+ cd "${S}/nDPI"
+ eautoreconf
+}
+
+src_configure() {
+ cd "${S}/nDPI"
+ econf
+ cd "${S}"
+ econf
+}
+
+src_compile() {
+ cd "${S}/nDPI"
+ emake
+
+ cd "${S}"
+ emake
+}
+
+src_install() {
+ SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
+ dodir ${SHARE_NTOPNG_DIR}
+ insinto ${SHARE_NTOPNG_DIR}
+ doins -r httpdocs
+ doins -r scripts
+
+ exeinto /usr/bin
+ doexe ${PN}
+ doman ${PN}.8
+
+ newinitd "${FILESDIR}/ntopng.init.d" ntopng
+ newconfd "${FILESDIR}/ntopng.conf.d" ntopng
+
+ dodir "/var/lib/ntopng"
+ fowners ntopng "${EPREFIX}/var/lib/ntopng"
+}
+
+pkg_setup() {
+ enewuser ntopng
+}
+
+pkg_postinst() {
+ elog "ntopng default creadential are user='admin' password='admin'"
+}