packages: ntop/ntop.spec, ntop/ntop-geoip.patch (NEW), ntop/ntop-lua_wget.p...
glen
glen at pld-linux.org
Tue Apr 6 23:20:07 CEST 2010
Author: glen Date: Tue Apr 6 21:20:07 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- geoip and lua fixes from fc with my addons to get it building
---- Files affected:
packages/ntop:
ntop.spec (1.84 -> 1.85) , ntop-geoip.patch (NONE -> 1.1) (NEW), ntop-lua_wget.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/ntop/ntop.spec
diff -u packages/ntop/ntop.spec:1.84 packages/ntop/ntop.spec:1.85
--- packages/ntop/ntop.spec:1.84 Tue Apr 6 22:58:17 2010
+++ packages/ntop/ntop.spec Tue Apr 6 23:20:02 2010
@@ -1,7 +1,7 @@
# $Revision$, $Date$
# TODO
-# - see geoip patch from fc
-# - use system lua
+# - see if it uses system files for ettercap and geoip files we did not package
+# - see if /etc/ntop/oui.txt.gz can be externalized (whatever it is)
#
# Conditional build:
%bcond_with mysql # with mysql support
@@ -10,7 +10,7 @@
Summary(pl.UTF-8): Narzędzie do monitorowania sieci
Name: ntop
Version: 3.3.10
-Release: 2
+Release: 3
License: GPL
Group: Networking
Source0: http://downloads.sourceforge.net/ntop/%{name}-%{version}.tar.gz
@@ -20,6 +20,8 @@
Patch0: %{name}-conf.patch
Patch1: %{name}-config.patch
Patch2: %{name}-am.patch
+Patch3: %{name}-lua_wget.patch
+Patch4: %{name}-geoip.patch
URL: http://www.ntop.org/
BuildRequires: GeoIP-devel
BuildRequires: autoconf
@@ -35,7 +37,7 @@
BuildRequires: libtiff-devel
BuildRequires: libtool
BuildRequires: libwrap-devel
-BuildRequires: lua-devel
+BuildRequires: lua51-devel
BuildRequires: ncurses-devel >= 5.2
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: readline-devel >= 4.2
@@ -51,6 +53,10 @@
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
Requires: rc-scripts
+# maybe is optional, needs checking
+Suggests: GeoIP-db-City
+Suggests: GeoIP-db-IPASNum
+Suggests: ettercap
Provides: group(ntop)
Provides: user(ntop)
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -70,6 +76,8 @@
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
+%patch4 -p1
# taken from autogen.sh
cp -f %{_aclocaldir}/libtool.m4 libtool.m4.in
@@ -97,11 +105,13 @@
install -d $RPM_BUILD_ROOT{%{_localstatedir}/ntop/rrd,/etc/{rc.d/init.d,sysconfig},%{_sbindir}}
%{__make} install \
+ GEOIP_FILES= \
+ ETTER_PASSIVE= \
DESTDIR=$RPM_BUILD_ROOT
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
-install packages/RedHat/ntop.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/ntop.conf
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ntop
+cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ntop
+cp -a packages/RedHat/ntop.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/ntop.conf
# no -devel
rm -f $RPM_BUILD_ROOT%{_libdir}{,/ntop/plugins}/*.la
@@ -154,6 +164,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.85 2010/04/06 21:20:02 glen
+- geoip and lua fixes from fc with my addons to get it building
+
Revision 1.84 2010/04/06 20:58:17 glen
- shitty build system (prog is shit as well, consuming all ram when run): two todos
================================================================
Index: packages/ntop/ntop-geoip.patch
diff -u /dev/null packages/ntop/ntop-geoip.patch:1.1
--- /dev/null Tue Apr 6 23:20:07 2010
+++ packages/ntop/ntop-geoip.patch Tue Apr 6 23:20:02 2010
@@ -0,0 +1,88 @@
+--- ntop-3.3.10.org/configure.in 2009-08-05 19:30:31.141160363 +0530
++++ ntop-3.3.10/configure.in 2009-08-05 19:34:11.076160092 +0530
+@@ -1962,40 +1962,23 @@
+ }'`
+ fi
+
+-dnl> GeoIP (http://www.maxmind.com/)
+-if test -f "GeoIP.tar.gz"; then
+- echo "GeoIP already present on this machine"
+-else
+- wget http://www.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
+-fi
+-tar xvfz GeoIP.tar.gz
+-GEO_DIR=`find $PWD -type d -name "GeoIP-*"`
+-cd $GEO_DIR; ./configure --prefix=${prefix}; make; cd ..
+-# OSX Fix
+-GEO_DYLIB="$GEO_DIR/libGeoIP/.libs/libGeoIP.dylib"
+-if test -f $GEO_DYLIB; then
+- ln -s $GEO_DYLIB .
+-fi
+-
+-if test -f "GeoLiteCity.dat"; then
+- echo "GeoLiteCity.dat already present"
+-else
+- wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
+- gunzip GeoLiteCity.dat.gz
+-fi
+-
+-if test -f "GeoIPASNum.dat"; then
+- echo "GeoIPASNum.dat already present"
+-else
+- wget http://www.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
+- gunzip GeoIPASNum.dat.gz
++#
++#GeoIP
++#
++AC_CHECK_HEADERS(
++ [GeoIP.h],
++ [geoip_header="yes"],
++ [AC_MSG_FAILURE([GeoIP header file is missing])]
++)
++if test "$geoip_header" = "yes"; then
++ AC_CHECK_LIB(GeoIP, GeoIP_open,
++ [geoip_libs="yes"],
++ [AC_MSG_FAILURE([GeoIP library is missing])]
++ )
++fi
++if test "$geoip_libs" = "yes"; then
++ LDFLAGS="${LDFLAGS} -lGeoIP"
+ fi
+-
+-
+-GEO_DIR=`find $PWD -type d -name "GeoIP-*"`
+-GEO_IP="$GEO_DIR/libGeoIP/"
+-CFLAGS="$CFLAGS -I$GEO_IP"
+-LDFLAGS="-L$GEO_IP.libs/ -lGeoIP $LDFLAGS"
+
+ dnl> NTOPCONFIGDEBUG_SETTINGS([precet])
+
+--- ntop-3.3.10/Makefile.am 2009-08-05 19:34:51.918165468 +0530
++++ ntop-3.3.10/Makefile.am 2010-04-07 00:12:39.762063904 +0300
+@@ -73,12 +73,15 @@
+ ETTER_PASSIVE_DOWNLOAD_FROM = "http://ettercap.cvs.sourceforge.net/ettercap/ettercap_ng/share"
+ ETTER_PASSIVE_DOWNLOAD_PARMS = "rev=HEAD"
+
++GEOIP_FILES = \
++ GeoIPASNum.dat \
++ GeoLiteCity.dat
++
+ NTOPDATA = ntop-cert.pem \
+ $(ETTER_PASSIVE) \
+ oui.txt.gz \
+ specialMAC.txt.gz \
+- GeoIPASNum.dat \
+- GeoLiteCity.dat
++ $(GEOIP_FILES)
+
+ NTOPHTML = html html/*.js html/*.html html/*.gif html/*.jpg html/*.ico html/*.png \
+ html/*.css html/*.dtd \
+@@ -270,8 +273,6 @@
+
+ install: install-recursive
+
+- cd @GEO_DIR@; make install
+-
+ @mkdir -p $(DESTDIR)/$(CFG_DBFILE_DIR)
+
+ @echo ""
================================================================
Index: packages/ntop/ntop-lua_wget.patch
diff -u /dev/null packages/ntop/ntop-lua_wget.patch:1.1
--- /dev/null Tue Apr 6 23:20:07 2010
+++ packages/ntop/ntop-lua_wget.patch Tue Apr 6 23:20:02 2010
@@ -0,0 +1,30 @@
+--- ntop-3.3.10.org/configure.in 2009-08-05 20:23:00.296160799 +0530
++++ ntop-3.3.10/configure.in 2009-08-05 20:34:16.656165445 +0530
+@@ -1644,25 +1644,8 @@
+ fi
+ fi
+
+-dnl>
+-dnl> Lua - http://www.lua.org
+-dnl>
+-LUA_VERSION=lua-5.1.4
+-if test -f "$LUA_VERSION.tar.gz"; then
+- echo "Lua already present on this machine"
+-else
+- wget http://www.lua.org/ftp/$LUA_VERSION.tar.gz
+-fi
+-
+-tar xvfz $LUA_VERSION.tar.gz
+-cat $LUA_VERSION/src/Makefile | sed -e s,'MYCFLAGS=-DLUA_USE_POSIX',' MYCFLAGS="-fPIC -DLUA_USE_POSIX"',g > /tmp/lua.temp
+-cat /tmp/lua.temp > $LUA_VERSION/src/Makefile
+-#rm -f /tmp/lua.temp
+-cd $LUA_VERSION; make posix; cd ..
+-
+-LUA_LIB_DIR=$PWD/$LUA_VERSION"/src"
+-LIBS="-L${LUA_LIB_DIR} -llua ${LIBS} "
+-INCS="${INCS} -I${LUA_LIB_DIR}"
++LIBS="-llua51 ${LIBS} "
++INCS="${INCS} -I/usr/include/lua51"
+ AC_DEFINE_UNQUOTED(HAVE_LUA, 1, [LUA is supported])
+
+ dnl>
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ntop/ntop.spec?r1=1.84&r2=1.85&f=u
More information about the pld-cvs-commit
mailing list