summaryrefslogtreecommitdiff
path: root/net-analyzer/ntopng/files
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/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-analyzer/ntopng/files')
-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
7 files changed, 174 insertions, 0 deletions
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 $?
+}