]> git.pld-linux.org Git - packages/xtables-geoip.git/blame - xtables-geoip.spec
- rel 2
[packages/xtables-geoip.git] / xtables-geoip.spec
CommitLineData
a9e058f3 1Summary: GeoIP database files for xt_geoip
2Name: xtables-geoip
a24c8ed7 3Version: 20110404
a5459e86 4Release: 2
2ce9a429 5License: GPL, Open Data License
a9e058f3 6Group: Networking/Admin
2a48ce95 7URL: http://www.maxmind.com/
14600c7f 8Source0: http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
a24c8ed7
JR
9# Source0-md5: 37cf1951b9ecced2612f8ff0c0bd3eaa
10Source1: http://geolite.maxmind.com/download/geoip/database/GeoIPv6.csv.gz
11# Source1-md5: 4956a5ab8ecd2dd078420faa5552f09f
12Source2: http://geolite.maxmind.com/download/geoip/database/LICENSE.txt
13# Source2-md5: a1381bd1aa0a0c91dc31b3f1e847cf4a
14Source3: http://xtables-addons.git.sourceforge.net/git/gitweb.cgi?p=xtables-addons/xtables-addons;a=blob_plain;f=geoip/xt_geoip_build
15# Source3-md5: 9933235c5d9c4c7fbad965d6317f8c2f
e77737fd 16BuildRequires: perl-Text-CSV_XS >= 0.69
2ce9a429 17BuildRequires: perl-base
3be77cb9 18BuildRequires: unzip
a9e058f3 19BuildRoot: %{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
377423bf
ER
26%ifarch ppc sparc ppc64 sparc64 sparcv9
27%define byteorder BE
28%else
29%define byteorder LE
30%endif
31
a9e058f3 32%description
33The package contains the GeoIP definition files (which IP addresses
34belong to which country) that are needed for Xtables-addons's xt_geoip
35module.
36
37%prep
2ce9a429 38%setup -qc
2ce9a429
ER
39
40ver=$(stat -c '%y' GeoIPCountryWhois.csv | awk '{print $1}' | tr -d -)
41if [ "$ver" != %{version} ]; then
42 exit 1
43fi
44
a24c8ed7
JR
45gunzip -c %{SOURCE1} >GeoIPv6.csv
46cp -a %{SOURCE2} .
2ce9a429
ER
47
48%build
377423bf 49install -d %{byteorder}
a5459e86 50%{__perl} %{SOURCE3} GeoIPCountryWhois.csv GeoIPv6.csv | tee ranges.txt
a9e058f3 51
52%install
53rm -rf $RPM_BUILD_ROOT
377423bf
ER
54install -d $RPM_BUILD_ROOT%{dbdir}/%{byteorder}
55cp -a %{byteorder}/* $RPM_BUILD_ROOT%{dbdir}/%{byteorder}
a9e058f3 56
57%clean
58rm -rf $RPM_BUILD_ROOT
59
60%files
61%defattr(644,root,root,755)
e399ee80 62%doc LICENSE.txt ranges.txt
377423bf
ER
63%dir %{dbdir}
64%{dbdir}/%{byteorder}
This page took 0.130454 seconds and 4 git commands to generate.