| 26 %define V_api_pl 1.37 |
26 %define V_api_pl 1.37 |
| 27 |
27 |
| 28 # package information |
28 # package information |
| 29 Name: geoip |
29 Name: geoip |
| 30 Summary: Geographic IP Resolution |
30 Summary: Geographic IP Resolution |
| 31 URL: http://www.maxmind.com/app/geolitecity |
31 URL: http://www.maxmind.com/app/ip-location |
| 32 Vendor: MaxMind |
32 Vendor: MaxMind Incorporated |
| 33 Packager: OpenPKG Foundation e.V. |
33 Packager: OpenPKG Foundation e.V. |
| 34 Distribution: OpenPKG Community |
34 Distribution: OpenPKG Community |
| 35 Class: PLUS |
35 Class: PLUS |
| 36 Group: Mapping |
36 Group: Mapping |
| 37 License: GPL |
37 License: GPL |
| 38 Version: %{V_api_c} |
38 Version: %{V_api_c} |
| 39 Release: 20090307 |
39 Release: 20090408 |
| 40 |
40 |
| 41 # package options |
41 # package options |
| 42 %option with_perl no |
42 %option with_perl no |
| 43 |
43 |
| 44 # list of sources |
44 # list of sources |
| 45 Source0: http://geolite.maxmind.com/download/geoip/api/c/GeoIP-%{V_api_c}.tar.gz |
45 Source0: http://geolite.maxmind.com/download/geoip/api/c/GeoIP-%{V_api_c}.tar.gz |
| 46 Source1: http://www.cpan.org/modules/by-module/Geo/Geo-IP-%{V_api_pl}.tar.gz |
46 Source1: http://www.cpan.org/modules/by-module/Geo/Geo-IP-%{V_api_pl}.tar.gz |
| |
47 Source2: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz |
| 47 |
48 |
| 48 # build information |
49 # build information |
| 49 Prefix: %{l_prefix} |
50 Prefix: %{l_prefix} |
| 50 BuildRoot: %{l_buildroot} |
51 BuildRoot: %{l_buildroot} |
| 51 BuildPreReq: OpenPKG, openpkg >= 20040130, gcc |
52 BuildPreReq: OpenPKG, openpkg >= 20040130, zlib, gcc |
| 52 PreReq: OpenPKG, openpkg >= 20040130 |
53 PreReq: OpenPKG, openpkg >= 20040130, zlib |
| 53 BuildPreReq: zlib |
|
| 54 PreReq: zlib |
|
| 55 AutoReq: no |
54 AutoReq: no |
| 56 AutoReqProv: no |
55 AutoReqProv: no |
| 57 |
56 |
| 58 %description |
57 %description |
| 59 Geo-IP enables you to easily lookup countries by IP addresses, even |
58 GeoIP is a C library that enables the user to find the country |
| 60 when Reverse DNS entries don't exist. The Geo-IP database contains |
59 that any IP address or hostname originates from. It uses a file |
| 61 IP Network Blocks as keys and countries as values, covering every |
60 based database containing IP blocks as keys and countries as |
| 62 public IP address. |
61 values and claims to achieve over 99% accuracy. This database |
| |
62 should be more complete and accurate than using reverse DNS |
| |
63 lookups. |
| |
64 |
| |
65 This module can be used to automatically select the geographically |
| |
66 closest mirror, to analyze your web server logs to determine the |
| |
67 countries of your visitors, for credit card fraud detection, and |
| |
68 for software export controls. |
| 63 |
69 |
| 64 %track |
70 %track |
| 65 prog geoip = { |
71 prog geoip = { |
| 66 version = %{version} |
72 version = %{version} |
| 67 url = http://geolite.maxmind.com/download/geoip/api/c/ |
73 url = http://geolite.maxmind.com/download/geoip/api/c/ |
| 88 CC="%{l_cc}" \ |
95 CC="%{l_cc}" \ |
| 89 CFLAGS="%{l_cflags -O}" \ |
96 CFLAGS="%{l_cflags -O}" \ |
| 90 CPPFLAGS="%{l_cppflags}" \ |
97 CPPFLAGS="%{l_cppflags}" \ |
| 91 LDFLAGS="%{l_ldflags}" \ |
98 LDFLAGS="%{l_ldflags}" \ |
| 92 LIBS="-lz" \ |
99 LIBS="-lz" \ |
| |
100 GREP="grep" \ |
| 93 ./configure \ |
101 ./configure \ |
| 94 --cache-file=./config.cache \ |
102 --cache-file=./config.cache \ |
| 95 --prefix=%{l_prefix} \ |
103 --prefix=%{l_prefix} \ |
| 96 --sysconfdir=%{l_prefix}/etc/geoip \ |
104 --sysconfdir=%{l_prefix}/etc/geoip \ |
| 97 --mandir=$RPM_BUILD_ROOT%{l_prefix}/man \ |
105 --mandir=$RPM_BUILD_ROOT%{l_prefix}/man \ |
| 108 %install |
116 %install |
| 109 rm -rf $RPM_BUILD_ROOT |
117 rm -rf $RPM_BUILD_ROOT |
| 110 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix} \ |
118 %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix} \ |
| 111 $RPM_BUILD_ROOT%{l_prefix}/man \ |
119 $RPM_BUILD_ROOT%{l_prefix}/man \ |
| 112 $RPM_BUILD_ROOT%{l_prefix}/man/man1 |
120 $RPM_BUILD_ROOT%{l_prefix}/man/man1 |
| 113 %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" |
121 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
| |
122 %{l_shtool} install -c -m 644 \ |
| |
123 data/GeoLiteCity.dat $RPM_BUILD_ROOT%{l_prefix}/share/GeoIP |
| 114 %if "%{with_perl}" == "yes" |
124 %if "%{with_perl}" == "yes" |
| 115 %{l_prefix}/bin/perl-openpkg -d Geo-IP-%{V_api_pl} install |
125 %{l_prefix}/bin/perl-openpkg -d Geo-IP-%{V_api_pl} install |
| 116 %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup |
126 %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup |
| 117 %else |
127 %else |
| 118 >perl-openpkg-files |
128 >perl-openpkg-files |