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