]> git.pld-linux.org Git - packages/xtables-geoip.git/blame - xtables-geoip.spec
- build and package arch data only; rel 2
[packages/xtables-geoip.git] / xtables-geoip.spec
CommitLineData
a9e058f3 1Summary: GeoIP database files for xt_geoip
2Name: xtables-geoip
01760299 3Version: 20100702
377423bf 4Release: 2
2ce9a429 5License: GPL, Open Data License
a9e058f3 6Group: Networking/Admin
2a48ce95 7URL: http://www.maxmind.com/
2ce9a429
ER
8Source0: http://jengelh.medozas.de/files/geoip/geoip_src.tar.bz2
9# Source0-md5: bbcb1edd6ce2ece229d3e61173c7cadc
10Source1: http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
01760299 11# Source1-md5: 07b16052593867747403c7c6841d3e7b
2ce9a429
ER
12Source2: http://geolite.maxmind.com/download/geoip/database/LICENSE.txt
13# Source2-md5: a1381bd1aa0a0c91dc31b3f1e847cf4a
e77737fd 14BuildRequires: perl-Text-CSV_XS >= 0.69
2ce9a429 15BuildRequires: perl-base
3be77cb9 16BuildRequires: unzip
a9e058f3 17BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
1f56ba0c
ER
19%define dbdir /usr/share/xt_geoip
20
377423bf
ER
21%ifarch ppc sparc ppc64 sparc64 sparcv9
22%define byteorder BE
23%else
24%define byteorder LE
25%endif
26
a9e058f3 27%description
28The package contains the GeoIP definition files (which IP addresses
29belong to which country) that are needed for Xtables-addons's xt_geoip
30module.
31
32%prep
2ce9a429
ER
33%setup -qc
34rm -f GeoIPCountryWhois.csv
35%setup -qD -a1
36
37ver=$(stat -c '%y' GeoIPCountryWhois.csv | awk '{print $1}' | tr -d -)
38if [ "$ver" != %{version} ]; then
39 exit 1
40fi
41
42cp -a %{SOURCE2} .
43
44%build
377423bf
ER
45install -d %{byteorder}
46cd %{byteorder}
47%if "%{byteorder}" == "BE"
2ce9a429 48%{__perl} ../geoip_csv_iv0.pl -b ../GeoIPCountryWhois.csv
377423bf 49%else
2ce9a429 50%{__perl} ../geoip_csv_iv0.pl ../GeoIPCountryWhois.csv
377423bf 51%endif
a9e058f3 52
53%install
54rm -rf $RPM_BUILD_ROOT
377423bf
ER
55install -d $RPM_BUILD_ROOT%{dbdir}/%{byteorder}
56cp -a %{byteorder}/* $RPM_BUILD_ROOT%{dbdir}/%{byteorder}
a9e058f3 57
58%clean
59rm -rf $RPM_BUILD_ROOT
60
61%files
62%defattr(644,root,root,755)
2ce9a429 63%doc LICENSE.txt
377423bf
ER
64%dir %{dbdir}
65%{dbdir}/%{byteorder}
This page took 0.06941 seconds and 4 git commands to generate.