]> git.pld-linux.org Git - packages/xtables-geoip.git/blobdiff - xtables-geoip.spec
updated to 20181023
[packages/xtables-geoip.git] / xtables-geoip.spec
index 727d50bc1d888b1afea5bfa267ad593d3e0dac79..bd42789a22b7fcad3ae71ea4ebc1f233a3601bae 100644 (file)
@@ -1,18 +1,20 @@
 Summary:       GeoIP database files for xt_geoip
+Summary(pl.UTF-8):     Pliki baz danych GeoIP dla xt_geoip
 Name:          xtables-geoip
-Version:       20110202
+Version:       20181023
 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: 8349b51b0de83b7ef906c3dd4918e5e9
+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://xtables-addons.git.sf.net/git/gitweb.cgi?p=xtables-addons/xtables-addons;a=blob_plain;f=geoip/geoip_build_db.pl
-# Source2-md5: 7cd5c1ab1d83a94d84ae918f0805603f
+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
+BuildRequires: rpm >= 4.4.9-56
 BuildRequires: unzip
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -21,39 +23,35 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 # no debuginfo to package
 %define                _enable_debug_packages  0
 
-%ifarch ppc sparc ppc64 sparc64 sparcv9
-%define                byteorder       BE
-%else
-%define                byteorder       LE
-%endif
-
 %description
 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
 
-ver=$(stat -c '%y' GeoIPCountryWhois.csv | awk '{print $1}' | tr -d -)
+ver=$(echo GeoLite2-Country-CSV_*)
+ver=${ver#GeoLite2-Country-CSV_}
 if [ "$ver" != %{version} ]; then
        exit 1
 fi
 
-cp -a %{SOURCE1} .
+cp -p %{SOURCE1} .
 
 %build
-install -d %{byteorder}
-%if "%{byteorder}" == "BE"
-%{__perl} %{SOURCE2} -D %{byteorder} -b GeoIPCountryWhois.csv | tee ranges.txt
-%else
-%{__perl} %{SOURCE2} -D %{byteorder} GeoIPCountryWhois.csv | tee ranges.txt
-%endif
+%{__mkdir} out
+%{__perl} %{SOURCE2} -S GeoLite2-Country-CSV_%{version} -D out > ranges.txt
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{dbdir}/%{byteorder}
-cp -a %{byteorder}/* $RPM_BUILD_ROOT%{dbdir}/%{byteorder}
+install -d $RPM_BUILD_ROOT%{dbdir}
+cp -a out/* $RPM_BUILD_ROOT%{dbdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -61,5 +59,4 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc LICENSE.txt ranges.txt
-%dir %{dbdir}
-%{dbdir}/%{byteorder}
+%{dbdir}
This page took 0.064019 seconds and 4 git commands to generate.