]> git.pld-linux.org Git - packages/GeoIP-db-City.git/blobdiff - GeoIP-db-City.spec
updated to 2016.05.03
[packages/GeoIP-db-City.git] / GeoIP-db-City.spec
index 3bfc34b3460f9d6ae51e120e127efbf0003fd235..9f048a44b2d9b9019c51ca879194d6f57816e596 100644 (file)
@@ -2,14 +2,14 @@ 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:       2015.04.07
+Version:       2016.05.03
 Release:       1
 License:       CC 3.0 BY-SA
 Group:         Applications/Databases
 Source0:       http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.xz?/GeoLiteCity-%{version}.dat.xz
-# Source0-md5: a3c5eb1276a4e1d27ae814bd3bed7426
+# Source0-md5: e31793bb5ab4dfedf2991167f59337c4
 Source1:       http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz?/GeoLiteCityv6-%{version}.dat.gz
-# Source1-md5: 3035205183d4eaffbcd73f2dc049c1c9
+# Source1-md5: a0793331f873aac66b1d518052300006
 URL:           http://dev.maxmind.com/geoip/legacy/geolite/
 BuildRequires: tar >= 1:1.22
 BuildRequires: xz
@@ -40,7 +40,22 @@ cp -p %{SOURCE1} .
 xz -d GeoLiteCity-%{version}.dat.xz
 gunzip GeoLiteCityv6-%{version}.dat.gz
 
-ver=$(TZ=GMT stat -c '%y' GeoLiteCity-%{version}.dat | awk '{print $1}' | tr - .)
+%build
+# get file DATE in GMT timezone
+filedate() {
+       TZ=GMT stat -c '%y' "$1" | awk '{print $1}'
+}
+
+# use newest file date as version
+d1=$(filedate GeoLiteCity-%{version}.dat)
+d2=$(filedate GeoLiteCityv6-%{version}.dat)
+if [ "$(echo $d1 | tr -d -)" -gt "$(echo $d2 | tr -d -)" ]; then
+       d=$d1
+else
+       d=$d2
+fi
+
+ver=$(echo $d | tr - .)
 if [ "$ver" != %{version} ]; then
        exit 1
 fi
This page took 0.072525 seconds and 4 git commands to generate.