Blob Blame History Raw
Name:       geoip-geolite
# The geolite databases are updated on the first Tuesday of each month,
# therefore we will use a versioning scheme of YYYY.MM for the fedora
# package.
Version:    2013.04
Release:    2%{?dist}
Summary:    Free IP geolocation databases

Group:      Development/Libraries

License:    CC-BY-SA
URL:        http://dev.maxmind.com/geoip/geolite

# Make sure to preserve timestamp when wgetting new files.
# http://fedoraproject.org/wiki/Packaging:Guidelines#Timestamps
Source0:    http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
Source1:    http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
Source2:    http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
Source3:    http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
Source4:    http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
Source5:    http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNumv6.dat.gz
Source6:    http://creativecommons.org/licenses/by-sa/3.0/legalcode.txt

BuildArch:  noarch

%description
The GeoLite databases are free IP geolocation databases.

The GeoLite databases are distributed under the Creative Commons
Attribution-ShareAlike 3.0 Unported License. The attribution requirement may
be met by including the following in all advertising and documentation
mentioning features of or use of this database: "This product includes
GeoLite data created by MaxMind, available from http://www.maxmind.com".

%prep
%setup -q -T -c -n geoip-geolite
cp %{SOURCE0} GeoIP.dat.gz
cp %{SOURCE1} GeoIPv6.dat.gz
cp %{SOURCE2} GeoLiteCity.dat.gz
cp %{SOURCE3} GeoLiteCityv6.dat.gz
cp %{SOURCE4} GeoIPASNum.dat.gz
cp %{SOURCE5} GeoIPASNumv6.dat.gz
cp %{SOURCE6} LICENSE

gunzip GeoIP.dat.gz
gunzip GeoIPv6.dat.gz
gunzip GeoLiteCity.dat.gz
gunzip GeoLiteCityv6.dat.gz
gunzip GeoIPASNum.dat.gz
gunzip GeoIPASNumv6.dat.gz

%build
# pass.  nothing to do here.

%install
%{__mkdir_p} %{buildroot}/%{_datadir}/GeoIP/
cp -p GeoIP.dat         %{buildroot}/%{_datadir}/GeoIP/GeoIP.dat
cp -p GeoIPv6.dat       %{buildroot}/%{_datadir}/GeoIP/GeoIPv6.dat
cp -p GeoLiteCity.dat   %{buildroot}/%{_datadir}/GeoIP/GeoLiteCity.dat
cp -p GeoLiteCityv6.dat %{buildroot}/%{_datadir}/GeoIP/GeoLiteCityv6.dat
cp -p GeoIPASNum.dat    %{buildroot}/%{_datadir}/GeoIP/GeoIPASNum.dat
cp -p GeoIPASNumv6.dat  %{buildroot}/%{_datadir}/GeoIP/GeoIPASNumv6.dat

%files
%doc LICENSE
# This directory is also owned by the GeoIP package (a c library).  We do not
# need that library for this package, but we both own the directory as per:
# http://fedoraproject.org/wiki/Packaging:Guidelines#The_directory_is_owned_by_a_package_which_is_not_required_for_your_package_to_function
%{_datadir}/GeoIP/

%changelog
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.04-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Apr 10 2013 Ralph Bean <rbean@redhat.com> - 2013.04-1
- Got the latest version.
- Added the IPASNum datasets (ipv4 and ipv6).

* Mon Apr 01 2013 Ralph Bean <rbean@redhat.com> - 2013.03-1
- Got the latest version (updated our incorrect version number).
- Changed datadir from geoip to GeoIp to share with the GeoIP package.
- Attempt to preserve upstream timestamps.

* Wed Feb 13 2013 Ralph Bean <rbean@redhat.com> - 2012.02-2
- Added BuildArch noarch tag.
- Pulled in the license text from creative commons.

* Mon Feb 11 2013 Ralph Bean <rbean@redhat.com> - 2012.02-1
- Initial packaging for Fedora.