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