summaryrefslogtreecommitdiff
path: root/net-analyzer/ntopng
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-analyzer/ntopng
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/ntopng')
-rw-r--r--net-analyzer/ntopng/Manifest14
-rw-r--r--net-analyzer/ntopng/files/ntopng-2.4-cxx.patch42
-rw-r--r--net-analyzer/ntopng/files/ntopng-2.4-dont-build-ndpi.patch16
-rw-r--r--net-analyzer/ntopng/files/ntopng-2.4-mysqltool.patch17
-rw-r--r--net-analyzer/ntopng/files/ntopng-3.0-gentoo.patch60
-rw-r--r--net-analyzer/ntopng/files/ntopng-3.0-mysqltool.patch17
-rw-r--r--net-analyzer/ntopng/files/ntopng.conf.d3
-rw-r--r--net-analyzer/ntopng/files/ntopng.init.d19
-rw-r--r--net-analyzer/ntopng/metadata.xml10
-rw-r--r--net-analyzer/ntopng/ntopng-2.4.ebuild86
-rw-r--r--net-analyzer/ntopng/ntopng-3.0-r1.ebuild72
11 files changed, 356 insertions, 0 deletions
diff --git a/net-analyzer/ntopng/Manifest b/net-analyzer/ntopng/Manifest
new file mode 100644
index 000000000000..cf8a02b9301c
--- /dev/null
+++ b/net-analyzer/ntopng/Manifest
@@ -0,0 +1,14 @@
+AUX ntopng-2.4-cxx.patch 809 SHA256 b5ec360c8435aea28bd3c56928369189c70bb114f2ebdd98372c1bfafb573017 SHA512 04345262208bc0a6043b83ae94a1fa83a08889f19e5d36e68cca5d11c93f12b026e6179c37aa27fb800a6f019b9eba58055920fcc555f2f9627dc8ee6c0e39ee WHIRLPOOL 03d261bb0ad98c6bc40b837fefbb7192edd04746aa2d8d74357203fd622d1ac85b3b6a1bb2f91d9a8e19d68e01467d27655cf97c883872070fe5f0c98f4af4e5
+AUX ntopng-2.4-dont-build-ndpi.patch 391 SHA256 2960b648635b7bdb2adc617ee5ba815e1cc4a049a0c5f4c08c978b26ee9f30e2 SHA512 5ed80974b17ff7e3bcf369fdc72a4b82b6490b38f5ddaafc9fc21e8d4307debdec0c0dd8ef5fe8b7a4c1945ce1236b2295a3ec578227573769e4c829e501a33c WHIRLPOOL 5f7ab7d613643f102a183c09000ee1ff29e8ed35bfbb59fad2b898426fae06e2338391f90355bfb7b4b227df53b40a4b23489f08f2f107b1084939d519948ee6
+AUX ntopng-2.4-mysqltool.patch 430 SHA256 afbcd4d6b88b0cf806ac05c93e232cc065f018a8c01a263796b80ff152b29eb6 SHA512 9ade5fb4e8a9f9b205327d482670b87fa249ab375be3414801e46ac34f1204605be4530326836b1ded48e9a63f38d0fecaf047cde09650e380495257a0e0832a WHIRLPOOL f2a8cfd5345124b3b2b0294f77d99160dc8e71abcbf22df1d8054d897aa9ca4efc483955850da0cda2e963930cd7f7aa388d2ea8bb08c9e8b6e4cc06dfe90e92
+AUX ntopng-3.0-gentoo.patch 1596 SHA256 6e2d5a9f0a320e3683a94b93bdd1e3e681dc9eb4cfdbc4c2b6f2f235ab29174f SHA512 fcab6670255d7c756694091d6b53a7880a74e8840fa8f77ec81b072dbe7c7a5ec5b4550892dc78c45304ee437a309fe8c79293f6205c570685b8f13178c1c306 WHIRLPOOL f70ce3194c543804c04fbaa6d6f2a16c359fe5face2deba9d5d9e9a0cd93a43118a48bd8069e09ad4f0a0b4213cd63bcfb67e635558f377a1304cbe7bdeb900d
+AUX ntopng-3.0-mysqltool.patch 430 SHA256 94e7825ca4e2cb4a115c1f06623537101af3a14aa78da4a263278d7aad18fa7e SHA512 82b06a14f471bd037743a7563a80d6460e63ff262252d0318e40ba25bf8da849bc0394a5fa4d54befd5df6bd4b645b86711708198f8971d54eb15e8f32c83cd5 WHIRLPOOL 0c0d6f5c903dd1d5fa28ab95ddbe5a3a34fc9b25eaa5a04e71b09f563443b1c84f76977f0dd0dd73c401fdd1b4a682c2cdf49a4addedd51c77a4c82fcbc0ed2e
+AUX ntopng.conf.d 117 SHA256 dcd657cfa0a4b5d9708e67fb6190448fe27a5e598f0b10564f2d812110a13b42 SHA512 bb66d11245ce099f9e09f97d830da60df910682242db0c5c7d17bcd800e84cf3bce6288fb75fc3a8f3e214a580dc0d076f7f69aa924d9ad3e4c8bff093252061 WHIRLPOOL 7dac08122c9b33db14914be6d3a26ce4eac33a41b2738112b470d22abdab1549c5515698f71102cfd0399717b6af9964808dbaf29928430b210dbff6b65e738f
+AUX ntopng.init.d 549 SHA256 79c3c6239f9832208ee0581a102d970cc7e81b7e0a4eee70a9b3c780faf6d0d1 SHA512 1fbcc46fe10dcef82a1310d74c4351c72752cdd2a9b9908705c8c645698430e456f1ba14b77fd7c1f374a237a508c2d33324de61f5f1f8255ed75a384e874d84 WHIRLPOOL c64db6141bca4af7cfa9cbc0eb79378fd6f6bc22229ed7f0465e500438418819feb20a6f59947b8df4750c2b5e55dd0a02bcb6ec875090e25dbf0196b4430bb1
+DIST ntopng-2.4.tar.gz 134074662 SHA256 f44e2faf3cb712d75106fc9c594139fbfd437edf4a7e6e9ed65134e1f47ad355 SHA512 515dd7889ae3aaf2482371bb2c55ab7300cf4207fe07f37029b7529bfb710379c19a54f58cf6df87e42454c0c99d15291af334adff676252301d9edd0acf3c7a WHIRLPOOL ba5d9fce207d1a89e5c8b35705b0aaeb66235153b91eaf7a84b1c50bcb4b897f992c81aa7fd316ad2d87458cdfdcd4d63de37d0a00375706a036f491ba448c7b
+DIST ntopng-3.0.tar.gz 23017655 SHA256 3780f1e71bc7aa404f40ea9b805d195943cdb5095d712f41669eae138d388ad5 SHA512 d5e310d5dba7fe696d38d9d8251ffa4077182200e41c3f0b6034e68cf6623220ec47ba9d9fd5d2392a7b65a6de770e330821169c7ec06b4952f68c3f5f738eb1 WHIRLPOOL 21351cd8e658826ac3bfe91e6817d4daef609f86655a2c645afcdc1eb3ec24ef3c92c99574363b2d15706abf9a7277489453fc8a2a4ff3ec625284a458ff643a
+EBUILD ntopng-2.4.ebuild 1721 SHA256 4fe1c83e57b985560231aaa5d9f07f053d953440405c2dbb0e252b8d2055b0c7 SHA512 3364607a3207a0997876898cfd17608c001d5576255877b4748de2eb8bb68dcdd995a1213684d5ec25389b68da9c8607b9674484178cfb3099f6e7e482df5f86 WHIRLPOOL c0ed171c119d69c88e55f378375f6ac4c3a20bd0c758bf4474e738796256e1e654dbe27bde4699d9d91b5fb8d929b17b4e4881ae4f5fb7d6fbf9b8fc0ad4c907
+EBUILD ntopng-3.0-r1.ebuild 1537 SHA256 ccc5a415043ee3334762f0bba9a44234d34174185055cd93200f425e5af117e6 SHA512 47805afc7765af88a4cbee85e6eb98a88f840fa74d6118c8ff0f16b04994816b9c73c6019c8f0c3bbc21868a4f087422d8d04492227903584baa15581eb690d2 WHIRLPOOL 3a7c10f4a33ac9cc0adc8bf243b20c9b4d8cb99b28a2f9b492358bed634ac0e431758f4e4b5f449deb8e6379071a5486a070fcb306006c581bfa22d6ce5d823d
+MISC ChangeLog 4542 SHA256 ac55c99e05e255cce42ffe4e34f3f4dad13c2217ef4416e999264e87d736c818 SHA512 6849ec217662e6b302b894705be7dd31e92f7f4d475349b61d76d70bda22de2326c269abdd491f2cbab4c83db75e110b93bad120d1f47f3f7893ac96f26c7d37 WHIRLPOOL f7a11ce9062774cbfc9a160884acc53b3acb64a3c0b3c176a250753d9679ca09029cda2001dd218af62c362728d7106a7e2142571d69e9948ce732f5f0486f62
+MISC ChangeLog-2015 704 SHA256 4d551cd9ba228aedaf0d446369f00e6dfbc071b193f3de227b651f1f53dadc9b SHA512 6647e69f3a81318691f0e1ff98e17695644f474f92d67c276d2b974f40ba883e1afb4238518d3b26f1abb4b9caca3f1e866dd4ae52b7dd9f76c3683cb63bd449 WHIRLPOOL 0f888695be79b08ea88efe0ccf536eb707d1abd915e4a8d559c7eaab244e6c7de595ad774773f8d97b7a9566f8919541020a32b65d29be0efefd95a5d9638bd2
+MISC metadata.xml 299 SHA256 e13031a67db640ff44b880c7cb49d7841c16001aa10e471eb6b9596f56c833c8 SHA512 5c8e5b8f97b306a059913e2adc9e02137502ec35da1a753a2b9af4d4c67c0af0f0266c14acdd488c89bb96da3cc0464512de05ce389055d35bc6a0feab7ac996 WHIRLPOOL 869e80f88a9932e20ad8656fd86c70bee0a61926bd54fb1bd2281a28f399082c276ab0c36e94916418cc5b56638338ef3a950985681a1af24a8163ed71649e46
diff --git a/net-analyzer/ntopng/files/ntopng-2.4-cxx.patch b/net-analyzer/ntopng/files/ntopng-2.4-cxx.patch
new file mode 100644
index 000000000000..6de1a43f9b8e
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng-2.4-cxx.patch
@@ -0,0 +1,42 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -341,14 +341,6 @@
+ GMAKE="make"
+ fi
+
+-GPP=`which clang++`
+-if test x$GPP = x
+-then
+- GPP="g++"
+-else
+- GPP="$GPP -O0"
+-fi
+-
+ GIT=`which git`
+ if test x$GIT = x
+ then
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -4,7 +4,6 @@
+ SHELL=/bin/sh
+ OS := $(shell uname -s)
+ PWD=@PWD@
+-GPP=@GPP@
+ INSTALL_DIR=$(DESTDIR)$(prefix)
+ MAN_DIR=$(DESTDIR)@MAN_DIR@
+
+@@ -126,12 +125,12 @@
+ $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
+
+ %.o: %.cpp $(HEADERS) Makefile
+- $(GPP) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
+
+ .PRECIOUS: $(TARGET) $(OBJECTS)
+
+ $(TARGET): $(OBJECTS) $(LIBRRDTOOL) Makefile
+- $(GPP) $(OBJECTS) -Wall $(LIBS) -o $@
++ $(CXX) $(OBJECTS) $(CXXFLAGS) $(CPPFLAGS) -Wall $(LIBS) -o $@
+
+ $(LUAJIT_LIB):
+ cd $(LUAJIT_HOME); @GMAKE@
diff --git a/net-analyzer/ntopng/files/ntopng-2.4-dont-build-ndpi.patch b/net-analyzer/ntopng/files/ntopng-2.4-dont-build-ndpi.patch
new file mode 100644
index 000000000000..ec628cd32242
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng-2.4-dont-build-ndpi.patch
@@ -0,0 +1,16 @@
+--- a/configure.ac.old
++++ b/configure.ac
+@@ -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-2.4-mysqltool.patch b/net-analyzer/ntopng/files/ntopng-2.4-mysqltool.patch
new file mode 100644
index 000000000000..a80e966b85de
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng-2.4-mysqltool.patch
@@ -0,0 +1,17 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -302,13 +302,7 @@
+ if test "x$ac_cv_prog_ac_ct_MARIADB" = "xmariadb_config"; then
+ MYSQLTOOL="mariadb_config"
+ else
+- PATH=$PATH:/usr/local/mysql/bin
+- AC_CHECK_TOOL(MYSQL, mysql_config)
+- if test "x$ac_cv_prog_ac_ct_MYSQL" = "xmysql_config"; then
+- MYSQLTOOL="mysql_config"
+- else
+- MYSQLTOOL=""
+- fi
++ MYSQLTOOL="mysql_config"
+ fi
+
+ if test -n "$MYSQLTOOL"; then
diff --git a/net-analyzer/ntopng/files/ntopng-3.0-gentoo.patch b/net-analyzer/ntopng/files/ntopng-3.0-gentoo.patch
new file mode 100644
index 000000000000..90d7aace545c
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng-3.0-gentoo.patch
@@ -0,0 +1,60 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,6 @@
+ # On CentOS 6 `git rev-list HEAD --count` does not work
+ #
+ #
+-REVISION=`git log --pretty=oneline | wc -l`
+
+ if test -d "/usr/local/include"; then
+ CFLAGS="${CFLAGS} -I/usr/local/include"
+@@ -48,33 +47,6 @@
+
+ SHORT_MACHINE=`uname -m | cut -b1-3`
+
+-GIT_RELEASE="@GIT_RELEASE@"
+-GIT_DATE="@GIT_DATE@"
+-GIT_BRANCH="@GIT_BRANCH@"
+-PRO_GIT_RELEASE="@PRO_GIT_RELEASE@"
+-PRO_GIT_DATE="@PRO_GIT_DATE@"
+-
+-AC_MSG_CHECKING(for nDPI)
+-NDPI_HOME=./nDPI
+-if test -d "$NDPI_HOME" ; then :
+- AC_MSG_RESULT(found in $NDPI_HOME)
+-else
+- NDPI_HOME=../nDPI
+- if test -d "$NDPI_HOME"; then :
+- AC_MSG_RESULT(found in $NDPI_HOME)
+- else
+- NDPI_HOME=$HOME/nDPI
+- if test -d "$NDPI_HOME"; then :
+- AC_MSG_RESULT(found in $NDPI_HOME)
+- else
+- AC_MSG_RESULT(not found)
+- echo "Please do cd ..; git clone https://github.com/ntop/nDPI.git; cd nDPI; ./autogen.sh; make; cd ../ntopng"
+- echo " and try again"
+- exit
+- fi
+- fi
+-fi
+-
+ if test -d "/usr/include/openssl"; then :
+ AC_DEFINE_UNQUOTED(NO_SSL_DL, 1, [has openssl])
+ SSL_INC="`pkg-config --cflags libssl` -I/usr/include/openssl"
+@@ -53,15 +53,6 @@
+ SSL_LIB="`pkg-config --libs libssl` -lssl -lcrypto"
+ 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)
+ PRO_MAKEFILE_INC=
+ PRO_INC=
diff --git a/net-analyzer/ntopng/files/ntopng-3.0-mysqltool.patch b/net-analyzer/ntopng/files/ntopng-3.0-mysqltool.patch
new file mode 100644
index 000000000000..4d2244b582b9
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng-3.0-mysqltool.patch
@@ -0,0 +1,17 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -335,13 +335,7 @@
+ if test "x$ac_cv_prog_ac_ct_MARIADB" = "xmariadb_config"; then
+ MYSQLTOOL="mariadb_config"
+ else
+- PATH=$PATH:/usr/local/mysql/bin
+- AC_CHECK_TOOL(MYSQL, mysql_config)
+- if test "x$ac_cv_prog_ac_ct_MYSQL" = "xmysql_config"; then
+- MYSQLTOOL="mysql_config"
+- else
+- MYSQLTOOL=""
+- fi
++ MYSQLTOOL="mysql_config"
+ fi
+
+ if test -n "$MYSQLTOOL"; then
diff --git a/net-analyzer/ntopng/files/ntopng.conf.d b/net-analyzer/ntopng/files/ntopng.conf.d
new file mode 100644
index 000000000000..b53f5d4ed777
--- /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 000000000000..02f911b05a88
--- /dev/null
+++ b/net-analyzer/ntopng/files/ntopng.init.d
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..334443b640d6
--- /dev/null
+++ b/net-analyzer/ntopng/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>slis@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ntop/ntopng</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 000000000000..844b5a810603
--- /dev/null
+++ b/net-analyzer/ntopng/ntopng-2.4.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit autotools eutils user toolchain-funcs
+
+DESCRIPTION="Network traffic analyzer with web interface"
+HOMEPAGE="http://www.ntop.org/"
+SRC_URI="mirror://sourceforge/ntop/${PN}/${P}-stable.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-db/sqlite:3
+ dev-python/pyzmq
+ dev-lang/luajit:2
+ dev-libs/json-c
+ dev-libs/geoip
+ dev-libs/glib:2
+ dev-libs/hiredis
+ dev-libs/libxml2
+ net-analyzer/rrdtool
+ net-libs/libpcap
+ net-misc/curl
+ virtual/libmysqlclient
+ !net-libs/nDPI"
+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}/${P}-dont-build-ndpi.patch"
+ epatch "${FILESDIR}/${P}-mysqltool.patch"
+ epatch "${FILESDIR}/${P}-cxx.patch"
+ sed -i 's/exit$/exit 1/g' "${S}/configure.ac" "${S}/nDPI/configure.ac"
+ eautoreconf
+
+ cd "${S}/nDPI"
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC CXX LD NM OBJDUMP PKG_CONFIG
+ 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'"
+}
diff --git a/net-analyzer/ntopng/ntopng-3.0-r1.ebuild b/net-analyzer/ntopng/ntopng-3.0-r1.ebuild
new file mode 100644
index 000000000000..3fe29fa78180
--- /dev/null
+++ b/net-analyzer/ntopng/ntopng-3.0-r1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools user toolchain-funcs
+
+DESCRIPTION="Network traffic analyzer with web interface"
+HOMEPAGE="http://www.ntop.org/"
+SRC_URI="https://github.com/ntop/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-db/sqlite:3
+ dev-python/pyzmq
+ dev-lang/luajit:2
+ dev-libs/json-c
+ dev-libs/geoip
+ dev-libs/glib:2
+ dev-libs/hiredis
+ dev-libs/libxml2
+ net-analyzer/rrdtool
+ net-libs/libpcap
+ net-libs/nDPI
+ net-misc/curl
+ virtual/libmysqlclient"
+RDEPEND="${DEPEND}
+ dev-db/redis"
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+ "${FILESDIR}"/${P}-mysqltool.patch
+)
+
+src_prepare() {
+ sed -e "s/@VERSION@/${PV}/g;s/@SHORT_VERSION@/${PV}/g" < "${S}/configure.seed" > "${S}/configure.ac" || die
+
+ default
+
+ eautoreconf
+}
+
+src_install() {
+ SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}"
+ dodir ${SHARE_NTOPNG_DIR}
+ insinto ${SHARE_NTOPNG_DIR}
+ doins -r httpdocs
+ doins -r scripts
+
+ dodir ${SHARE_NTOPNG_DIR}/third-party
+ insinto ${SHARE_NTOPNG_DIR}/third-party
+ doins -r third-party/i18n.lua-master
+ doins -r third-party/lua-resty-template-master
+
+ 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 credentials are user='admin' password='admin'"
+}