]> git.pld-linux.org Git - packages/ntop.git/blob - ntop-geoip.patch
- two more patches from fc
[packages/ntop.git] / ntop-geoip.patch
1 --- ntop-3.3.10.org/configure.in        2009-08-05 19:30:31.141160363 +0530
2 +++ ntop-3.3.10/configure.in    2009-08-05 19:34:11.076160092 +0530
3 @@ -1962,40 +1962,23 @@
4      }'`
5  fi
6  
7 -dnl> GeoIP (http://www.maxmind.com/)
8 -if test -f "GeoIP.tar.gz"; then
9 -   echo "GeoIP already present on this machine"
10 -else
11 -   wget http://www.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
12 -fi
13 -tar xvfz GeoIP.tar.gz
14 -GEO_DIR=`find $PWD -type d -name "GeoIP-*"`
15 -cd $GEO_DIR; ./configure --prefix=${prefix}; make; cd ..
16 -# OSX Fix
17 -GEO_DYLIB="$GEO_DIR/libGeoIP/.libs/libGeoIP.dylib"
18 -if test -f $GEO_DYLIB; then
19 -   ln -s $GEO_DYLIB .
20 -fi
21 -
22 -if test -f "GeoLiteCity.dat"; then
23 -   echo "GeoLiteCity.dat already present"
24 -else
25 -   wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
26 -   gunzip GeoLiteCity.dat.gz
27 -fi
28 -
29 -if test -f "GeoIPASNum.dat"; then
30 -   echo "GeoIPASNum.dat already present"
31 -else
32 -   wget http://www.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
33 -   gunzip GeoIPASNum.dat.gz
34 +#
35 +#GeoIP
36 +#
37 +AC_CHECK_HEADERS(
38 +    [GeoIP.h],
39 +    [geoip_header="yes"],
40 +    [AC_MSG_FAILURE([GeoIP header file is missing])]
41 +)
42 +if test "$geoip_header" = "yes"; then
43 +    AC_CHECK_LIB(GeoIP, GeoIP_open,
44 +        [geoip_libs="yes"],
45 +       [AC_MSG_FAILURE([GeoIP library is missing])]
46 +    )
47 +fi
48 +if test "$geoip_libs" = "yes"; then
49 +    LDFLAGS="${LDFLAGS} -lGeoIP"
50  fi
51 -
52 -
53 -GEO_DIR=`find $PWD -type d -name "GeoIP-*"`
54 -GEO_IP="$GEO_DIR/libGeoIP/"
55 -CFLAGS="$CFLAGS -I$GEO_IP"
56 -LDFLAGS="-L$GEO_IP.libs/ -lGeoIP $LDFLAGS"
57  
58  dnl> NTOPCONFIGDEBUG_SETTINGS([precet])
59  
60 --- ntop-3.3.10/Makefile.am     2009-08-05 19:34:51.918165468 +0530
61 +++ ntop-3.3.10/Makefile.am     2010-04-07 00:12:39.762063904 +0300
62 @@ -73,12 +73,15 @@
63  ETTER_PASSIVE_DOWNLOAD_FROM = "http://ettercap.cvs.sourceforge.net/ettercap/ettercap_ng/share"
64  ETTER_PASSIVE_DOWNLOAD_PARMS = "rev=HEAD"
65  
66 +GEOIP_FILES = \
67 +       GeoIPASNum.dat \
68 +       GeoLiteCity.dat
69 +
70  NTOPDATA = ntop-cert.pem \
71             $(ETTER_PASSIVE) \
72             oui.txt.gz \
73             specialMAC.txt.gz \
74 -          GeoIPASNum.dat \
75 -          GeoLiteCity.dat
76 +                  $(GEOIP_FILES)
77  
78  NTOPHTML = html html/*.js html/*.html  html/*.gif html/*.jpg html/*.ico html/*.png \
79             html/*.css html/*.dtd \
80 @@ -270,8 +273,6 @@
81  
82  install: install-recursive
83  
84 -       cd @GEO_DIR@; make install
85 -
86         @mkdir -p $(DESTDIR)/$(CFG_DBFILE_DIR)
87  
88         @echo ""
This page took 0.509626 seconds and 3 git commands to generate.