X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=xtables-geoip.spec;h=36ea6b83e0c83dcc1dea56f5ec1e9fdedff34c4a;hb=0f0a4c1;hp=66a335c0f69f35604373d0b4f2883fe9cc319931;hpb=f6988933f02f79b4f6bcd4472d81d0272182c090;p=packages%2Fxtables-geoip.git diff --git a/xtables-geoip.spec b/xtables-geoip.spec index 66a335c..36ea6b8 100644 --- a/xtables-geoip.spec +++ b/xtables-geoip.spec @@ -1,18 +1,19 @@ Summary: GeoIP database files for xt_geoip +Summary(pl.UTF-8): Pliki baz danych GeoIP dla xt_geoip Name: xtables-geoip -Version: 20120704 -Release: 3 +Version: 20170502 +Release: 1 License: GPL, Open Data License Group: Networking/Admin -URL: http://www.maxmind.com/ Source0: http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip -# Source0-md5: a2f038b8c46e28ccfeaa21e6322decd1 +# Source0-md5: df40c4ccbfd0253787bca195fb95649c Source1: http://geolite.maxmind.com/download/geoip/database/GeoIPv6.csv.gz -# Source1-md5: ddd56306ba1802c139a4490d199295df +# Source1-md5: c1e4881c6ea770d4c5387686bd68887e Source2: http://geolite.maxmind.com/download/geoip/database/LICENSE.txt # Source2-md5: a1381bd1aa0a0c91dc31b3f1e847cf4a -Source3: http://xtables-addons.git.sourceforge.net/git/gitweb.cgi?p=xtables-addons/xtables-addons;a=blob_plain;f=geoip/xt_geoip_build -# Source3-md5: 9933235c5d9c4c7fbad965d6317f8c2f +Source3: http://sourceforge.net/p/xtables-addons/xtables-addons/ci/master/tree/geoip/xt_geoip_build?format=raw&/xt_geoip_build +# Source3-md5: 4dcd62c8b2c8b90cc88e961613118be3 +URL: http://www.maxmind.com/ BuildRequires: perl-Text-CSV_XS >= 0.69 BuildRequires: perl-base BuildRequires: rpm >= 4.4.9-56 @@ -24,7 +25,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # no debuginfo to package %define _enable_debug_packages 0 -%ifarch ppc sparc ppc64 sparc64 sparcv9 +%ifarch ppc ppc64 s390 s390x sparc sparc64 sparcv9 %define byteorder BE %else %define byteorder LE @@ -35,15 +36,27 @@ The package contains the GeoIP definition files (which IP addresses belong to which country) that are needed for Xtables-addons's xt_geoip module. +%description -l pl.UTF-8 +Ten pakiet zawiera pliki definicji GeoIP (określające, które adresy IP +należą do jakiego kraju), wymagane przez moduł xt_geoip z pakietu +xtables-addons. + %prep %setup -qc +gunzip -c %{SOURCE1} > GeoIPv6.csv +touch -r %{SOURCE1} GeoIPv6.csv -ver=$(stat -c '%y' GeoIPCountryWhois.csv | awk '{print $1}' | tr -d -) +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 if [ "$ver" != %{version} ]; then exit 1 fi -gunzip -c %{SOURCE1} >GeoIPv6.csv cp -p %{SOURCE2} . %build @@ -69,6 +82,9 @@ install -d $RPM_BUILD_ROOT/var/lib ln -s %{_datadir}/xt_geoip $RPM_BUILD_ROOT/var/lib/geoip %endif +%clean +rm -rf $RPM_BUILD_ROOT + %if "%{pld_release}" == "ac" %pretrans # this needs to be a symlink @@ -79,9 +95,6 @@ if [ -d /var/lib/geoip -a ! -L /var/lib/geoip ]; then fi %endif -%clean -rm -rf $RPM_BUILD_ROOT - %files %defattr(644,root,root,755) %doc LICENSE.txt ranges.txt