]> git.pld-linux.org Git - packages/xtables-geoip.git/commitdiff
- build and package arch data only; rel 2 auto/th/xtables-geoip-20100702-2
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 9 Aug 2010 20:09:25 +0000 (20:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    xtables-geoip.spec -> 1.10

xtables-geoip.spec

index 77ed79364d9d2c441d6110f80d30a11b65898c13..98f4a183b28662c802d005e0b4cf6ef51405e51c 100644 (file)
@@ -1,9 +1,7 @@
-# TODO
-# - make it arch dependant and package only LE or BE dirs?
 Summary:       GeoIP database files for xt_geoip
 Name:          xtables-geoip
 Version:       20100702
-Release:       1
+Release:       2
 License:       GPL, Open Data License
 Group:         Networking/Admin
 URL:           http://www.maxmind.com/
@@ -16,11 +14,16 @@ Source2:    http://geolite.maxmind.com/download/geoip/database/LICENSE.txt
 BuildRequires: perl-Text-CSV_XS >= 0.69
 BuildRequires: perl-base
 BuildRequires: unzip
-BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                dbdir   /usr/share/xt_geoip
 
+%ifarch ppc sparc ppc64 sparc64 sparcv9
+%define                byteorder       BE
+%else
+%define                byteorder       LE
+%endif
+
 %description
 The package contains the GeoIP definition files (which IP addresses
 belong to which country) that are needed for Xtables-addons's xt_geoip
@@ -39,17 +42,18 @@ fi
 cp -a %{SOURCE2} .
 
 %build
-install -d {B,L}E
-cd BE
+install -d %{byteorder}
+cd %{byteorder}
+%if "%{byteorder}" == "BE"
 %{__perl} ../geoip_csv_iv0.pl -b ../GeoIPCountryWhois.csv
-cd ../LE
+%else
 %{__perl} ../geoip_csv_iv0.pl ../GeoIPCountryWhois.csv
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{dbdir}/{B,L}E
-cp -a BE/* $RPM_BUILD_ROOT%{dbdir}/BE
-cp -a LE/* $RPM_BUILD_ROOT%{dbdir}/LE
+install -d $RPM_BUILD_ROOT%{dbdir}/%{byteorder}
+cp -a %{byteorder}/* $RPM_BUILD_ROOT%{dbdir}/%{byteorder}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -57,4 +61,5 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc LICENSE.txt
-%{dbdir}
+%dir %{dbdir}
+%{dbdir}/%{byteorder}
This page took 0.051174 seconds and 4 git commands to generate.