]>
Commit | Line | Data |
---|---|---|
2b240ee7 | 1 | Summary: GeoLite Country - Country database for GeoIP |
8321cd19 | 2 | Summary(pl.UTF-8): GeoLite Country - baza danych krajów dla GeoIP |
2b240ee7 PG |
3 | Name: GeoIP-db-Country |
4 | # Updated every month: | |
3e260ffb | 5 | Version: 2014.04.02 |
fdeba21a | 6 | Release: 1 |
0031add8 | 7 | License: CC 3.0 BY-SA |
2b240ee7 | 8 | Group: Applications/Databases |
5e7bac1a | 9 | Source0: http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz?/GeoIP-%{version}.dat.gz |
3e260ffb | 10 | # Source0-md5: 21892ec744c80126581a64b9b3eca56b |
5e7bac1a | 11 | Source1: http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz?/GeoIPv6-%{version}.dat.gz |
3e260ffb | 12 | # Source1-md5: 9c114cc1f5246fd0c7ce2ca745b732ff |
0031add8 | 13 | URL: http://dev.maxmind.com/geoip/legacy/geolite/ |
9aac1969 | 14 | Requires: GeoIP-libs >= 1.4.5-2 |
8321cd19 | 15 | BuildArch: noarch |
2b240ee7 PG |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
18 | %description | |
8321cd19 JB |
19 | GeoLite Country is similar to the GeoIP Country database, but is not |
20 | as accurate. Should you require greater accuracy, GeoIP Country is a | |
21 | drop-in replacement for GeoLite Country. | |
22 | ||
23 | License disclaimer: this product includes GeoLite data created by | |
24 | MaxMind, available from <http://www.maxmind.com/>. | |
25 | ||
26 | %description -l pl.UTF-8 | |
8321cd19 JB |
27 | GeoLite Country jest podobna do bazy danych GeoIP Country, ale nie |
28 | jest tak dokładna. Jeśli wymagana jest większa dokładność, GeoIP | |
29 | Country jest zamiennikiem GeoLite Country. | |
2b240ee7 | 30 | |
8321cd19 JB |
31 | Informacja licencyjna: ten produkt zawiera dane GeoLite stworzone |
32 | przez MaxWind, dostępne z <http://www.maxwind.com/>. | |
2b240ee7 PG |
33 | |
34 | %prep | |
7a5cca84 | 35 | %setup -qcT |
081d65d3 | 36 | cp -p %{SOURCE0} . |
5e7bac1a | 37 | cp -p %{SOURCE1} . |
2b240ee7 | 38 | |
e615bf03 ER |
39 | gzip -d GeoIP-%{version}.dat.gz GeoIPv6-%{version}.dat.gz |
40 | dt4=$(TZ=GMT stat -c '%y' GeoIP-%{version}.dat | awk '{print $1}' | tr - .) | |
41 | dt5=$(TZ=GMT stat -c '%y' GeoIP-%{version}.dat | awk '{print $1}' | tr - .) | |
42 | if [ "$(echo $dt4 | tr -d .)" -gt "$(echo $dt6 | tr -d .)" ]; then | |
43 | ver=$dt4 | |
44 | else | |
45 | ver=$dt6 | |
46 | fi | |
7a5cca84 ER |
47 | if [ "$ver" != %{version} ]; then |
48 | exit 1 | |
49 | fi | |
50 | ||
2b240ee7 PG |
51 | %install |
52 | rm -rf $RPM_BUILD_ROOT | |
53 | install -d $RPM_BUILD_ROOT%{_datadir}/GeoIP | |
5e7bac1a AM |
54 | cp -p GeoIP-%{version}.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoIP.dat |
55 | cp -p GeoIPv6-%{version}.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoIPv6.dat | |
2b240ee7 PG |
56 | |
57 | %clean | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %files | |
61 | %defattr(644,root,root,755) | |
2b240ee7 | 62 | %{_datadir}/GeoIP/*.dat |