X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=xtables-geoip.spec;h=de8cafcf3c53abb154654c570e34c20ed1dc3e12;hb=26944ea19930db56a89edacd4420d2e97648d9b3;hp=70c888b564b11ac1768f11f911bef909da2ae35d;hpb=44772d74e7bd4c695e6ef71c4d6326680367b74b;p=packages%2Fxtables-geoip.git diff --git a/xtables-geoip.spec b/xtables-geoip.spec index 70c888b..de8cafc 100644 --- a/xtables-geoip.spec +++ b/xtables-geoip.spec @@ -1,18 +1,16 @@ Summary: GeoIP database files for xt_geoip Summary(pl.UTF-8): Pliki baz danych GeoIP dla xt_geoip Name: xtables-geoip -Version: 20180105 +Version: 20181023 Release: 1 License: GPL, Open Data License Group: Networking/Admin -Source0: http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip -# Source0-md5: 0db774fa7fa978f9ec06b857c7fb3c83 -Source1: http://geolite.maxmind.com/download/geoip/database/GeoIPv6.csv.gz -# Source1-md5: 215f3163e2d6ac538927c492b0311d32 -Source2: http://geolite.maxmind.com/download/geoip/database/LICENSE.txt -# Source2-md5: a1381bd1aa0a0c91dc31b3f1e847cf4a -Source3: http://sourceforge.net/p/xtables-addons/xtables-addons/ci/master/tree/geoip/xt_geoip_build?format=raw&/xt_geoip_build -# Source3-md5: 4dcd62c8b2c8b90cc88e961613118be3 +Source0: http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip +# Source0-md5: 1f5524d5ac54a779831bffc57d91e2a2 +Source1: http://geolite.maxmind.com/download/geoip/database/LICENSE.txt +# Source1-md5: a1381bd1aa0a0c91dc31b3f1e847cf4a +Source2: http://sourceforge.net/p/xtables-addons/xtables-addons/ci/master/tree/geoip/xt_geoip_build?format=raw&/xt_geoip_build +# Source2-md5: 462ca00be38471d19dc6e0f32c098275 URL: http://www.maxmind.com/ BuildRequires: perl-Text-CSV_XS >= 0.69 BuildRequires: perl-base @@ -43,24 +41,17 @@ xtables-addons. %prep %setup -qc -gunzip -c %{SOURCE1} > GeoIPv6.csv -touch -r %{SOURCE1} GeoIPv6.csv -ver4=$(TZ=GMT stat -c '%y' GeoIPCountryWhois.csv | awk '{print $1}' | tr -d -) -ver6=$(TZ=GMT stat -c '%y' GeoIPv6.csv | awk '{print $1}' | tr -d -) -if [ "$ver4" -gt "$ver6" ]; then - ver=$ver4 -else - ver=$ver6 -fi +ver=$(ls -d GeoLite2-Country-CSV_* | head -1 | %{__sed} 's/^GeoLite2-Country-CSV_//') if [ "$ver" != %{version} ]; then exit 1 fi -cp -p %{SOURCE2} . +cp -p %{SOURCE1} . %build -%{__perl} %{SOURCE3} GeoIPCountryWhois.csv GeoIPv6.csv | tee ranges.txt +%{__mkdir} %{byteorder} +%{__perl} %{SOURCE2} -S GeoLite2-Country-CSV_%{version} -D %{byteorder} > ranges.txt %install rm -rf $RPM_BUILD_ROOT