1.1 --- a/geoip/geoip.spec Thu Apr 09 13:28:35 2009 +0200 1.2 +++ b/geoip/geoip.spec Thu Apr 09 13:29:40 2009 +0200 1.3 @@ -28,15 +28,15 @@ 1.4 # package information 1.5 Name: geoip 1.6 Summary: Geographic IP Resolution 1.7 -URL: http://www.maxmind.com/app/geolitecity 1.8 -Vendor: MaxMind 1.9 +URL: http://www.maxmind.com/app/ip-location 1.10 +Vendor: MaxMind Incorporated 1.11 Packager: OpenPKG Foundation e.V. 1.12 Distribution: OpenPKG Community 1.13 Class: PLUS 1.14 Group: Mapping 1.15 License: GPL 1.16 Version: %{V_api_c} 1.17 -Release: 20090307 1.18 +Release: 20090408 1.19 1.20 # package options 1.21 %option with_perl no 1.22 @@ -44,22 +44,28 @@ 1.23 # list of sources 1.24 Source0: http://geolite.maxmind.com/download/geoip/api/c/GeoIP-%{V_api_c}.tar.gz 1.25 Source1: http://www.cpan.org/modules/by-module/Geo/Geo-IP-%{V_api_pl}.tar.gz 1.26 +Source2: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz 1.27 1.28 # build information 1.29 Prefix: %{l_prefix} 1.30 BuildRoot: %{l_buildroot} 1.31 -BuildPreReq: OpenPKG, openpkg >= 20040130, gcc 1.32 -PreReq: OpenPKG, openpkg >= 20040130 1.33 -BuildPreReq: zlib 1.34 -PreReq: zlib 1.35 +BuildPreReq: OpenPKG, openpkg >= 20040130, zlib, gcc 1.36 +PreReq: OpenPKG, openpkg >= 20040130, zlib 1.37 AutoReq: no 1.38 AutoReqProv: no 1.39 1.40 %description 1.41 - Geo-IP enables you to easily lookup countries by IP addresses, even 1.42 - when Reverse DNS entries don't exist. The Geo-IP database contains 1.43 - IP Network Blocks as keys and countries as values, covering every 1.44 - public IP address. 1.45 + GeoIP is a C library that enables the user to find the country 1.46 + that any IP address or hostname originates from. It uses a file 1.47 + based database containing IP blocks as keys and countries as 1.48 + values and claims to achieve over 99% accuracy. This database 1.49 + should be more complete and accurate than using reverse DNS 1.50 + lookups. 1.51 + 1.52 + This module can be used to automatically select the geographically 1.53 + closest mirror, to analyze your web server logs to determine the 1.54 + countries of your visitors, for credit card fraud detection, and 1.55 + for software export controls. 1.56 1.57 %track 1.58 prog geoip = { 1.59 @@ -75,6 +81,7 @@ 1.60 1.61 %prep 1.62 %setup -q -n GeoIP-%{V_api_c} 1.63 + ( cd data && %{l_gzip} -cd %{SOURCE2} >GeoLiteCity.dat) || exit $? 1.64 %if "%{with_perl}" == "yes" 1.65 %setup -q -T -D -a 1 -n GeoIP-%{V_api_c} 1.66 %endif 1.67 @@ -90,6 +97,7 @@ 1.68 CPPFLAGS="%{l_cppflags}" \ 1.69 LDFLAGS="%{l_ldflags}" \ 1.70 LIBS="-lz" \ 1.71 + GREP="grep" \ 1.72 ./configure \ 1.73 --cache-file=./config.cache \ 1.74 --prefix=%{l_prefix} \ 1.75 @@ -110,7 +118,9 @@ 1.76 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix} \ 1.77 $RPM_BUILD_ROOT%{l_prefix}/man \ 1.78 $RPM_BUILD_ROOT%{l_prefix}/man/man1 1.79 - %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" 1.80 + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 1.81 + %{l_shtool} install -c -m 644 \ 1.82 + data/GeoLiteCity.dat $RPM_BUILD_ROOT%{l_prefix}/share/GeoIP 1.83 %if "%{with_perl}" == "yes" 1.84 %{l_prefix}/bin/perl-openpkg -d Geo-IP-%{V_api_pl} install 1.85 %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup