]>
Commit | Line | Data |
---|---|---|
a9e058f3 | 1 | Summary: GeoIP database files for xt_geoip |
b7f9561d | 2 | Summary(pl.UTF-8): Pliki baz danych GeoIP dla xt_geoip |
a9e058f3 | 3 | Name: xtables-geoip |
7f795e91 | 4 | Version: 20181030 |
c1500f15 | 5 | Release: 1 |
2ce9a429 | 6 | License: GPL, Open Data License |
a9e058f3 | 7 | Group: Networking/Admin |
f9c5b547 ER |
8 | Source0: https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip |
9 | # Source0-md5: 8527b411dfd72d39ff0556c703ca7f80 | |
10 | Source1: https://geolite.maxmind.com/download/geoip/database/LICENSE.txt | |
26944ea1 | 11 | # Source1-md5: a1381bd1aa0a0c91dc31b3f1e847cf4a |
f9c5b547 | 12 | Source2: https://sourceforge.net/p/xtables-addons/xtables-addons/ci/master/tree/geoip/xt_geoip_build?format=raw&/xt_geoip_build |
26944ea1 | 13 | # Source2-md5: 462ca00be38471d19dc6e0f32c098275 |
f9c5b547 | 14 | URL: https://www.maxmind.com/ |
e77737fd | 15 | BuildRequires: perl-Text-CSV_XS >= 0.69 |
2ce9a429 | 16 | BuildRequires: perl-base |
2ec6929c | 17 | BuildRequires: rpm >= 4.4.9-56 |
3be77cb9 | 18 | BuildRequires: unzip |
a9e058f3 | 19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
1f56ba0c ER |
21 | %define dbdir /usr/share/xt_geoip |
22 | ||
14600c7f ER |
23 | # no debuginfo to package |
24 | %define _enable_debug_packages 0 | |
25 | ||
a9e058f3 | 26 | %description |
27 | The package contains the GeoIP definition files (which IP addresses | |
28 | belong to which country) that are needed for Xtables-addons's xt_geoip | |
29 | module. | |
30 | ||
b7f9561d JB |
31 | %description -l pl.UTF-8 |
32 | Ten pakiet zawiera pliki definicji GeoIP (określające, które adresy IP | |
33 | należą do jakiego kraju), wymagane przez moduł xt_geoip z pakietu | |
34 | xtables-addons. | |
35 | ||
a9e058f3 | 36 | %prep |
2ce9a429 | 37 | %setup -qc |
2ce9a429 | 38 | |
caed6501 ER |
39 | ver=$(echo GeoLite2-Country-CSV_*) |
40 | ver=${ver#GeoLite2-Country-CSV_} | |
2ce9a429 ER |
41 | if [ "$ver" != %{version} ]; then |
42 | exit 1 | |
43 | fi | |
44 | ||
26944ea1 | 45 | cp -p %{SOURCE1} . |
2ce9a429 ER |
46 | |
47 | %build | |
276dcb61 AO |
48 | %{__mkdir} out |
49 | %{__perl} %{SOURCE2} -S GeoLite2-Country-CSV_%{version} -D out > ranges.txt | |
a9e058f3 | 50 | |
51 | %install | |
52 | rm -rf $RPM_BUILD_ROOT | |
a29328a9 | 53 | install -d $RPM_BUILD_ROOT%{dbdir} |
276dcb61 | 54 | cp -a out/* $RPM_BUILD_ROOT%{dbdir} |
a9e058f3 | 55 | |
b7f9561d JB |
56 | %clean |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
a9e058f3 | 59 | %files |
60 | %defattr(644,root,root,755) | |
e399ee80 | 61 | %doc LICENSE.txt ranges.txt |
276dcb61 | 62 | %{dbdir} |