Sophie

Sophie

distrib > Mandriva > current > i586 > by-pkgid > bedfb2d9e5ab7ea9c8321df80fa3c679 > files > 1

ntop-3.3.10-4mdv2010.1.src.rpm

diff -Naur ntop-3.3.10/configure.in ntop-3.3.10.oden/configure.in
--- ntop-3.3.10/configure.in	2009-09-09 13:00:30.000000000 +0200
+++ ntop-3.3.10.oden/configure.in	2009-09-09 13:00:48.000000000 +0200
@@ -1957,40 +1957,8 @@
     }'`
 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
-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"
+# use system geoip
+LIBS="${LIBS} -lGeoIP"
 
 dnl> NTOPCONFIGDEBUG_SETTINGS([precet])
 
@@ -2156,7 +2124,6 @@
 AC_SUBST(SO_VERSION_PATCH)
 AC_SUBST(RRD_LIB)
 AC_SUBST(RRD_INC)
-AC_SUBST(GEO_DIR)
 AC_SUBST(GETOPT_H)
 AC_SUBST(GETOPT_C)
 
diff -Naur ntop-3.3.10/globals-defines.h ntop-3.3.10.oden/globals-defines.h
--- ntop-3.3.10/globals-defines.h	2009-05-06 16:55:22.000000000 +0200
+++ ntop-3.3.10.oden/globals-defines.h	2009-09-09 13:02:43.000000000 +0200
@@ -2818,8 +2818,8 @@
 #define IP_TCP_PORT_SKYPE          54045
 
 /* GeoIP - http://www.maxmind.com */
-#define GEO_IP_FILE                "GeoLiteCity.dat"
-#define GEO_IP_ASN_FILE            "GeoIPASNum.dat"
+#define GEO_IP_FILE                "/usr/share/GeoIP/GeoLiteCity.dat"
+#define GEO_IP_ASN_FILE            "/usr/share/GeoIP/GeoIPASNum.dat"
 
 #define NULL_VALUE                 "(null)"
 
diff -Naur ntop-3.3.10/Makefile.am ntop-3.3.10.oden/Makefile.am
--- ntop-3.3.10/Makefile.am	2009-09-09 13:00:30.000000000 +0200
+++ ntop-3.3.10.oden/Makefile.am	2009-09-09 13:00:48.000000000 +0200
@@ -77,9 +77,7 @@
 NTOPDATA = ntop-cert.pem \
            $(ETTER_PASSIVE) \
            oui.txt.gz \
-           specialMAC.txt.gz \
-	   GeoIPASNum.dat \
-	   GeoLiteCity.dat
+           specialMAC.txt.gz
 
 NTOPHTML = html html/*.js html/*.html  html/*.gif html/*.jpg html/*.ico html/*.png \
            html/*.css html/*.dtd \
@@ -271,8 +269,6 @@
 
 install: install-recursive
 
-	cd @GEO_DIR@; make install
-
 	@mkdir -p $(DESTDIR)/$(CFG_DBFILE_DIR)
 
 	@echo ""