# HG changeset patch # User Michael Schloh von Bennewitz # Date 1239276580 -7200 # Node ID b9de35d46e4e7721193bcd1ba83332b7f5d62028 # Parent 7b468483efb4533c622465b396197161b547964f Clean up packaging, correct description, and include city database. diff -r 7b468483efb4 -r b9de35d46e4e geoip/geoip.spec --- a/geoip/geoip.spec Thu Apr 09 13:28:35 2009 +0200 +++ b/geoip/geoip.spec Thu Apr 09 13:29:40 2009 +0200 @@ -28,15 +28,15 @@ # package information Name: geoip Summary: Geographic IP Resolution -URL: http://www.maxmind.com/app/geolitecity -Vendor: MaxMind +URL: http://www.maxmind.com/app/ip-location +Vendor: MaxMind Incorporated Packager: OpenPKG Foundation e.V. Distribution: OpenPKG Community Class: PLUS Group: Mapping License: GPL Version: %{V_api_c} -Release: 20090307 +Release: 20090408 # package options %option with_perl no @@ -44,22 +44,28 @@ # list of sources Source0: http://geolite.maxmind.com/download/geoip/api/c/GeoIP-%{V_api_c}.tar.gz Source1: http://www.cpan.org/modules/by-module/Geo/Geo-IP-%{V_api_pl}.tar.gz +Source2: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20040130, gcc -PreReq: OpenPKG, openpkg >= 20040130 -BuildPreReq: zlib -PreReq: zlib +BuildPreReq: OpenPKG, openpkg >= 20040130, zlib, gcc +PreReq: OpenPKG, openpkg >= 20040130, zlib AutoReq: no AutoReqProv: no %description - Geo-IP enables you to easily lookup countries by IP addresses, even - when Reverse DNS entries don't exist. The Geo-IP database contains - IP Network Blocks as keys and countries as values, covering every - public IP address. + GeoIP is a C library that enables the user to find the country + that any IP address or hostname originates from. It uses a file + based database containing IP blocks as keys and countries as + values and claims to achieve over 99% accuracy. This database + should be more complete and accurate than using reverse DNS + lookups. + + This module can be used to automatically select the geographically + closest mirror, to analyze your web server logs to determine the + countries of your visitors, for credit card fraud detection, and + for software export controls. %track prog geoip = { @@ -75,6 +81,7 @@ %prep %setup -q -n GeoIP-%{V_api_c} + ( cd data && %{l_gzip} -cd %{SOURCE2} >GeoLiteCity.dat) || exit $? %if "%{with_perl}" == "yes" %setup -q -T -D -a 1 -n GeoIP-%{V_api_c} %endif @@ -90,6 +97,7 @@ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags}" \ LIBS="-lz" \ + GREP="grep" \ ./configure \ --cache-file=./config.cache \ --prefix=%{l_prefix} \ @@ -110,7 +118,9 @@ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix} \ $RPM_BUILD_ROOT%{l_prefix}/man \ $RPM_BUILD_ROOT%{l_prefix}/man/man1 - %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + %{l_shtool} install -c -m 644 \ + data/GeoLiteCity.dat $RPM_BUILD_ROOT%{l_prefix}/share/GeoIP %if "%{with_perl}" == "yes" %{l_prefix}/bin/perl-openpkg -d Geo-IP-%{V_api_pl} install %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup