File xtables-geoip.spec of Package xtables-geoip

#
# spec file for package xtables-geoip
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           xtables-geoip
Version:        2016.09
Release:        0
Summary:        Geolocation database files for xt_geoip
License:        CC-BY-SA-3.0
Group:          Productivity/Networking/Security
Url:            http://dev.maxmind.com/geoip/legacy/geolite/

Source1:        GeoIPCountryWhois.csv.xz
Source2:        GeoIPv6.csv.xz
Source4:        %name-rpmlintrc
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-Text-CSV_XS
BuildRequires:  xtables-addons >= 1.33
BuildRequires:  xz
#db format changed at that time
Conflicts:      xtables-addons < 1.33

%description
The package contains the GeoIP definition files (which IP addresses
belong to which country) that are needed for Xtables-addons's
xt_geoip module.

This product includes GeoLite data created by MaxMind, available from
http://maxmind.com/.

Author(s):
----------
	The GeoIP data is from MaxMind.com.
Please do not contact them for errors with this package.

%prep

%build
xz -cd "%{S:1}" >ipv4.csv;
xz -cd "%{S:2}" >ipv6.csv;

%install
b="%buildroot";
mkdir -p "$b/%_datadir/xt_geoip";
%_libexecdir/xtables-addons/xt_geoip_build -D "$b/%_datadir/xt_geoip" *.csv;

%files
%defattr(-,root,root)
%_datadir/xt_geoip/

%changelog
openSUSE Build Service is sponsored by