1 |
commit: 53de44dea9dee40bfc7b872cb40ecfd84621874b |
2 |
Author: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 31 12:11:30 2016 +0000 |
4 |
Commit: Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 31 12:13:29 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/dev/jmbsvicetto.git/commit/?id=53de44de |
7 |
|
8 |
net-analyzer/ntopng: Add to my overlay and bump to release 2.4. |
9 |
|
10 |
Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org> |
11 |
|
12 |
net-analyzer/ntopng/Manifest | 1 + |
13 |
.../ntopng/files/ntopng-dont-build-ndpi.patch | 16 +++++ |
14 |
net-analyzer/ntopng/files/ntopng.conf.d | 3 + |
15 |
net-analyzer/ntopng/files/ntopng.init.d | 20 ++++++ |
16 |
net-analyzer/ntopng/metadata.xml | 11 +++ |
17 |
net-analyzer/ntopng/ntopng-2.4.ebuild | 80 ++++++++++++++++++++++ |
18 |
6 files changed, 131 insertions(+) |
19 |
|
20 |
diff --git a/net-analyzer/ntopng/Manifest b/net-analyzer/ntopng/Manifest |
21 |
new file mode 100644 |
22 |
index 0000000..78b1f14 |
23 |
--- /dev/null |
24 |
+++ b/net-analyzer/ntopng/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST ntopng-2.4-stable.tar.gz 134074662 SHA256 f44e2faf3cb712d75106fc9c594139fbfd437edf4a7e6e9ed65134e1f47ad355 SHA512 515dd7889ae3aaf2482371bb2c55ab7300cf4207fe07f37029b7529bfb710379c19a54f58cf6df87e42454c0c99d15291af334adff676252301d9edd0acf3c7a WHIRLPOOL ba5d9fce207d1a89e5c8b35705b0aaeb66235153b91eaf7a84b1c50bcb4b897f992c81aa7fd316ad2d87458cdfdcd4d63de37d0a00375706a036f491ba448c7b |
27 |
|
28 |
diff --git a/net-analyzer/ntopng/files/ntopng-dont-build-ndpi.patch b/net-analyzer/ntopng/files/ntopng-dont-build-ndpi.patch |
29 |
new file mode 100644 |
30 |
index 0000000..b189cba |
31 |
--- /dev/null |
32 |
+++ b/net-analyzer/ntopng/files/ntopng-dont-build-ndpi.patch |
33 |
@@ -0,0 +1,16 @@ |
34 |
+--- configure.ac.old 2016-04-25 21:29:36.452888380 +0200 |
35 |
++++ configure.ac 2016-04-25 21:30:04.679554971 +0200 |
36 |
+@@ -62,13 +62,6 @@ |
37 |
+ fi |
38 |
+ |
39 |
+ NDPI_LIB=$NDPI_HOME/src/lib/.libs/libndpi.a |
40 |
+-AC_MSG_CHECKING(for $NDPI_LIB) |
41 |
+-if test -f "$NDPI_LIB" ; then : |
42 |
+- AC_MSG_RESULT(found $NDPI_LIB) |
43 |
+-else |
44 |
+- AC_MSG_RESULT(not found $NDPI_LIB: compiling) |
45 |
+- cd $NDPI_HOME; ./autogen.sh; make; cd - |
46 |
+-fi |
47 |
+ |
48 |
+ AC_MSG_CHECKING(for ntopng professional edition) |
49 |
+ if test -d "pro"; then : |
50 |
|
51 |
diff --git a/net-analyzer/ntopng/files/ntopng.conf.d b/net-analyzer/ntopng/files/ntopng.conf.d |
52 |
new file mode 100644 |
53 |
index 0000000..b53f5d4 |
54 |
--- /dev/null |
55 |
+++ b/net-analyzer/ntopng/files/ntopng.conf.d |
56 |
@@ -0,0 +1,3 @@ |
57 |
+NTOPNG_OPTS="-i eth0" |
58 |
+NTOPNG_OPTS="${NTOPNG_OPTS} -m 192.168.0.0/16" |
59 |
+NTOPNG_OPTS="${NTOPNG_OPTS} -d /var/lib/ntopng" |
60 |
|
61 |
diff --git a/net-analyzer/ntopng/files/ntopng.init.d b/net-analyzer/ntopng/files/ntopng.init.d |
62 |
new file mode 100644 |
63 |
index 0000000..2764118 |
64 |
--- /dev/null |
65 |
+++ b/net-analyzer/ntopng/files/ntopng.init.d |
66 |
@@ -0,0 +1,20 @@ |
67 |
+#!/sbin/runscript |
68 |
+# Copyright 1999-2015 Gentoo Foundation |
69 |
+# Distributed under the terms of the GNU General Public License v2 |
70 |
+# $Id$ |
71 |
+ |
72 |
+depend() { |
73 |
+ need net redis |
74 |
+} |
75 |
+ |
76 |
+start() { |
77 |
+ ebegin "Starting ntopng" |
78 |
+ 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} |
79 |
+ eend $? |
80 |
+} |
81 |
+ |
82 |
+stop() { |
83 |
+ ebegin "Stopping ntopng" |
84 |
+ start-stop-daemon --stop --exec /usr/bin/ntopng --pidfile /var/run/ntopng.pid |
85 |
+ eend $? |
86 |
+} |
87 |
|
88 |
diff --git a/net-analyzer/ntopng/metadata.xml b/net-analyzer/ntopng/metadata.xml |
89 |
new file mode 100644 |
90 |
index 0000000..f808124 |
91 |
--- /dev/null |
92 |
+++ b/net-analyzer/ntopng/metadata.xml |
93 |
@@ -0,0 +1,11 @@ |
94 |
+<?xml version="1.0" encoding="UTF-8"?> |
95 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
96 |
+<pkgmetadata> |
97 |
+ <maintainer type="person"> |
98 |
+ <email>jmbsvicetto@g.o</email> |
99 |
+ <name>Jorge Manuel B. S. Vicetto</name> |
100 |
+ </maintainer> |
101 |
+ <upstream> |
102 |
+ <remote-id type="sourceforge">ntop</remote-id> |
103 |
+ </upstream> |
104 |
+</pkgmetadata> |
105 |
|
106 |
diff --git a/net-analyzer/ntopng/ntopng-2.4.ebuild b/net-analyzer/ntopng/ntopng-2.4.ebuild |
107 |
new file mode 100644 |
108 |
index 0000000..bca272d |
109 |
--- /dev/null |
110 |
+++ b/net-analyzer/ntopng/ntopng-2.4.ebuild |
111 |
@@ -0,0 +1,80 @@ |
112 |
+# Copyright 1999-2016 Gentoo Foundation |
113 |
+# Distributed under the terms of the GNU General Public License v2 |
114 |
+# $Id$ |
115 |
+ |
116 |
+EAPI=5 |
117 |
+inherit autotools eutils user |
118 |
+ |
119 |
+DESCRIPTION="Network traffic analyzer with web interface" |
120 |
+HOMEPAGE="http://www.ntop.org/" |
121 |
+SRC_URI="mirror://sourceforge/ntop/${PN}/${P}-stable.tar.gz" |
122 |
+LICENSE="GPL-3" |
123 |
+SLOT="0" |
124 |
+KEYWORDS="~amd64 ~x86" |
125 |
+IUSE="" |
126 |
+ |
127 |
+DEPEND=" |
128 |
+ dev-db/sqlite:3 |
129 |
+ dev-lang/luajit:2 |
130 |
+ dev-libs/geoip |
131 |
+ dev-libs/glib:2 |
132 |
+ dev-libs/libxml2 |
133 |
+ net-analyzer/rrdtool |
134 |
+ net-libs/libpcap |
135 |
+ dev-python/pyzmq |
136 |
+" |
137 |
+RDEPEND="${DEPEND} |
138 |
+ dev-db/redis |
139 |
+" |
140 |
+ |
141 |
+S="${WORKDIR}"/${P}-stable |
142 |
+ |
143 |
+src_prepare() { |
144 |
+ cat "${S}/configure.seed" | sed "s/@VERSION@/${PV}/g" | sed "s/@SHORT_VERSION@/${PV}/g" > "${S}/configure.ac" |
145 |
+ epatch "${FILESDIR}/${PN}-dont-build-ndpi.patch" |
146 |
+ eautoreconf |
147 |
+ |
148 |
+ cd "${S}/nDPI" |
149 |
+ eautoreconf |
150 |
+} |
151 |
+ |
152 |
+src_configure() { |
153 |
+ cd "${S}/nDPI" |
154 |
+ econf |
155 |
+ cd "${S}" |
156 |
+ econf |
157 |
+} |
158 |
+ |
159 |
+src_compile() { |
160 |
+ cd "${S}/nDPI" |
161 |
+ emake |
162 |
+ |
163 |
+ cd "${S}" |
164 |
+ emake |
165 |
+} |
166 |
+ |
167 |
+src_install() { |
168 |
+ SHARE_NTOPNG_DIR="${EPREFIX}/usr/share/${PN}" |
169 |
+ dodir ${SHARE_NTOPNG_DIR} |
170 |
+ insinto ${SHARE_NTOPNG_DIR} |
171 |
+ doins -r httpdocs |
172 |
+ doins -r scripts |
173 |
+ |
174 |
+ exeinto /usr/bin |
175 |
+ doexe ${PN} |
176 |
+ doman ${PN}.8 |
177 |
+ |
178 |
+ newinitd "${FILESDIR}/ntopng.init.d" ntopng |
179 |
+ newconfd "${FILESDIR}/ntopng.conf.d" ntopng |
180 |
+ |
181 |
+ dodir "/var/lib/ntopng" |
182 |
+ fowners ntopng "${EPREFIX}/var/lib/ntopng" |
183 |
+} |
184 |
+ |
185 |
+pkg_setup() { |
186 |
+ enewuser ntopng |
187 |
+} |
188 |
+ |
189 |
+pkg_postinst() { |
190 |
+ elog "ntopng default creadential are user='admin' password='admin'" |
191 |
+} |