]> git.pld-linux.org Git - packages/GeoIP-db-City.git/blobdiff - GeoIP-db-City.spec
- rel 2; add IPv6 database, too; version tarbals locally
[packages/GeoIP-db-City.git] / GeoIP-db-City.spec
index 263e6713a46c8882797856f9901ec89e83cba77d..e5eb7f0cb453423eed928c115c143ca1b5db768c 100644 (file)
@@ -2,16 +2,17 @@ Summary:      GeoLite City - City database for GeoIP
 Summary(pl.UTF-8):     GeoLite City - baza danych miast dla GeoIP
 Name:          GeoIP-db-City
 # Updated every month:
-Version:       2010.02.02
-Release:       1
-License:       OPEN DATA LICENSE (see LICENSE.txt)
+Version:       2014.02.05
+Release:       2
+License:       CC 3.0 BY-SA
 Group:         Applications/Databases
-Source0:       http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
-# Source0-md5: 5fa77fb3cb3dc578cf2e2265a838bfbd
-Source1:       http://www.maxmind.com/download/geoip/database/LICENSE.txt
-# Source1-md5: a1381bd1aa0a0c91dc31b3f1e847cf4a
-URL:           http://www.maxmind.com/app/geolitecity
-Requires:      GeoIP-libs
+Source0:       http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.xz?/GeoLiteCity-%{version}.dat.xz
+# Source0-md5: 354d8ce598706612f8e134a028fd020a
+Source1:       http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz?/GeoLiteCityv6-%{version}.dat.gz
+# Source1-md5: 61dfc4c65e6433a2402b25e43347594e
+URL:           http://dev.maxmind.com/geoip/legacy/geolite/
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -32,23 +33,30 @@ Informacja licencyjna: ten produkt zawiera dane GeoLite stworzone
 przez MaxWind, dostÄ™pne z <http://www.maxwind.com/>.
 
 %prep
-%setup -q -c -T
-cp %{SOURCE0} .
-cp %{SOURCE1} .
+%setup -qcT
+cp -p %{SOURCE0} .
+cp -p %{SOURCE1} .
 
-gunzip GeoLiteCity.dat.gz
+xz -d GeoLiteCity-%{version}.dat.xz
+gunzip GeoLiteCityv6-%{version}.dat.gz
+
+ver=$(TZ=GMT stat -c '%y' GeoLiteCity-%{version}.dat | awk '{print $1}' | tr - .)
+if [ "$ver" != %{version} ]; then
+       exit 1
+fi
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_datadir}/GeoIP
+cp -p GeoLiteCity-%{version}.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoLiteCity.dat
+ln -s GeoLiteCity.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoIPCity.dat
 
-install GeoLiteCity.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP
-ln -s   GeoLiteCity.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoIPCity.dat
+cp -p GeoLiteCityv6-%{version}.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoLiteCityv6.dat
+ln -s GeoLiteCityv6.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoIPCityv6.dat
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc *.txt
 %{_datadir}/GeoIP/*.dat
This page took 0.073052 seconds and 4 git commands to generate.