]> git.pld-linux.org Git - packages/GeoIP-db-Country.git/blobdiff - GeoIP-db-Country.spec
updated to 2015.11.03
[packages/GeoIP-db-Country.git] / GeoIP-db-Country.spec
index 1e914edb4483317800cf1e288bcf750eaf0f926c..949bc490b0958bb97e63fa2d4f02d93daa4b25f2 100644 (file)
@@ -2,26 +2,20 @@ Summary:      GeoLite Country - Country database for GeoIP
 Summary(pl.UTF-8):     GeoLite Country - baza danych krajów dla GeoIP
 Name:          GeoIP-db-Country
 # Updated every month:
 Summary(pl.UTF-8):     GeoLite Country - baza danych krajów dla GeoIP
 Name:          GeoIP-db-Country
 # Updated every month:
-Version:       2009.08.01
+Version:       2015.11.03
 Release:       1
 Release:       1
-License:       OPEN DATA LICENSE (see LICENSE.txt)
+License:       CC 3.0 BY-SA
 Group:         Applications/Databases
 Group:         Applications/Databases
-Source0:       http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
-# Source0-md5: 0fb194d98c87b5342a9cd61af94d528a
-Source1:       http://www.maxmind.com/download/geoip/database/LICENSE.txt
-# Source1-md5: a1381bd1aa0a0c91dc31b3f1e847cf4a
-URL:           http://www.maxmind.com/app/geolitecountry
-Requires:      GeoIP-libs
+Source0:       http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz?/GeoIP-%{version}.dat.gz
+# Source0-md5: 8c05085026366d19a3a5f954b70c2c8f
+Source1:       http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz?/GeoIPv6-%{version}.dat.gz
+# Source1-md5: 81fa4944d9e714af51919fb84a637617
+URL:           http://dev.maxmind.com/geoip/legacy/geolite/
+Requires:      GeoIP-libs >= 1.4.5-2
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-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 that is accurate as of March 2003. This database simply
-contains IP blocks as keys, and countries as values. This database
-should be more complete and accurate than using reverse DNS lookups.
-
 GeoLite Country is similar to the GeoIP Country database, but is not
 as accurate. Should you require greater accuracy, GeoIP Country is a
 drop-in replacement for GeoLite Country.
 GeoLite Country is similar to the GeoIP Country database, but is not
 as accurate. Should you require greater accuracy, GeoIP Country is a
 drop-in replacement for GeoLite Country.
@@ -30,12 +24,6 @@ License disclaimer: this product includes GeoLite data created by
 MaxMind, available from <http://www.maxmind.com/>.
 
 %description -l pl.UTF-8
 MaxMind, available from <http://www.maxmind.com/>.
 
 %description -l pl.UTF-8
-GeoIP jest biblioteką napisaną w C umożliwiającą użytkownikowi
-odnalezienie państwa, z którego pochodzi dany adres IP lub domena.
-Używa do tego zapisanej w pliku bazy danych (z marca 2003). W bazie
-tej adresy IP są kluczami, a państwa wartościami. Powinna ona być
-dokładniejsza niż sprawdzanie odwrotnego DNS. 
-
 GeoLite Country jest podobna do bazy danych GeoIP Country, ale nie
 jest tak dokładna. Jeśli wymagana jest większa dokładność, GeoIP
 Country jest zamiennikiem GeoLite Country.
 GeoLite Country jest podobna do bazy danych GeoIP Country, ale nie
 jest tak dokładna. Jeśli wymagana jest większa dokładność, GeoIP
 Country jest zamiennikiem GeoLite Country.
@@ -44,22 +32,31 @@ Informacja licencyjna: ten produkt zawiera dane GeoLite stworzone
 przez MaxWind, dostępne z <http://www.maxwind.com/>.
 
 %prep
 przez MaxWind, dostępne z <http://www.maxwind.com/>.
 
 %prep
-%setup -q -c -T
-cp %{SOURCE0} .
-cp %{SOURCE1} .
-
-gunzip GeoIP.dat.gz
+%setup -qcT
+cp -p %{SOURCE0} .
+cp -p %{SOURCE1} .
+
+gzip -d GeoIP-%{version}.dat.gz GeoIPv6-%{version}.dat.gz
+dt4=$(TZ=GMT stat -c '%y' GeoIP-%{version}.dat | awk '{print $1}' | tr - .)
+dt5=$(TZ=GMT stat -c '%y' GeoIP-%{version}.dat | awk '{print $1}' | tr - .)
+if [ "$(echo $dt4 | tr -d .)" -gt "$(echo $dt6 | tr -d .)" ]; then
+       ver=$dt4
+else
+       ver=$dt6
+fi
+if [ "$ver" != %{version} ]; then
+       exit 1
+fi
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_datadir}/GeoIP
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_datadir}/GeoIP
-
-install GeoIP.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP
+cp -p GeoIP-%{version}.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoIP.dat
+cp -p GeoIPv6-%{version}.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoIPv6.dat
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc *.txt
 %{_datadir}/GeoIP/*.dat
 %{_datadir}/GeoIP/*.dat
This page took 0.030058 seconds and 4 git commands to generate.