]> git.pld-linux.org Git - packages/ntop.git/commitdiff
- geoip and lua fixes from fc with my addons to get it building auto/th/ntop-3_3_10-3
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 6 Apr 2010 21:20:02 +0000 (21:20 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ntop-geoip.patch -> 1.1
    ntop-lua_wget.patch -> 1.1
    ntop.spec -> 1.85

ntop-geoip.patch [new file with mode: 0644]
ntop-lua_wget.patch [new file with mode: 0644]
ntop.spec

diff --git a/ntop-geoip.patch b/ntop-geoip.patch
new file mode 100644 (file)
index 0000000..57cca0d
--- /dev/null
@@ -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 ""
diff --git a/ntop-lua_wget.patch b/ntop-lua_wget.patch
new file mode 100644 (file)
index 0000000..274ebbb
--- /dev/null
@@ -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>
index 317b32705fe8f7a71a77d8bfc03cb6b47b67e7c3..8b2b57f2cf986e72a4f18905b14b18204bfc83e6 100644 (file)
--- a/ntop.spec
+++ b/ntop.spec
@@ -1,6 +1,6 @@
 # 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
@@ -9,7 +9,7 @@ Summary:        Network monitoring tool
 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
@@ -19,6 +19,8 @@ Source2:      %{name}.sysconfig
 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
@@ -34,7 +36,7 @@ BuildRequires:        libpng-devel
 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
@@ -50,6 +52,10 @@ Requires(pre):       /usr/bin/getgid
 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)
@@ -69,6 +75,8 @@ robi to popularna uniksowa komenda top.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 # taken from autogen.sh
 cp -f %{_aclocaldir}/libtool.m4 libtool.m4.in
@@ -96,11 +104,13 @@ rm -rf $RPM_BUILD_ROOT
 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
This page took 0.074207 seconds and 4 git commands to generate.