Blame SPECS/geolite2.spec

2bdb5c
%global _docdir_fmt %{name}
2bdb5c
%global _description \
2bdb5c
GeoLite2 databases are free IP geolocation databases comparable to, but less\
2bdb5c
accurate than, MaxMind's GeoIP2 databases.  This product includes GeoLite2 data\
2bdb5c
created by MaxMind, available from http://www.maxmind.com.
2bdb5c
2bdb5c
Name:           geolite2
2bdb5c
Version:        20180605
2bdb5c
Release:        1%{?dist}
2bdb5c
Summary:        Free IP geolocation databases
2bdb5c
License:        CC-BY-SA
2bdb5c
URL:            https://dev.maxmind.com/geoip/geoip2/geolite2/
2bdb5c
Source0:        https://geolite.maxmind.com/download/geoip/database/GeoLite2-City_%{version}.tar.gz
2bdb5c
Source1:        https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country_%{version}.tar.gz
2bdb5c
BuildArch:      noarch
2bdb5c
2bdb5c
2bdb5c
%description %{_description}
2bdb5c
2bdb5c
2bdb5c
%package city
2bdb5c
Summary:        Free IP geolocation city database
2bdb5c
2bdb5c
%description city %{_description}
2bdb5c
2bdb5c
2bdb5c
%package country
2bdb5c
Summary:        Free IP geolocation country database
2bdb5c
2bdb5c
%description country %{_description}
2bdb5c
2bdb5c
2bdb5c
%prep
2bdb5c
%setup -q -T -c -a 0 -a 1
2bdb5c
2bdb5c
2bdb5c
%install
2bdb5c
for db in GeoLite2-City GeoLite2-Country; do
2bdb5c
    install -D -p -m 0644 ${db}_%{version}/$db.mmdb %{buildroot}%{_datadir}/GeoIP/$db.mmdb
2bdb5c
done
2bdb5c
2bdb5c
2bdb5c
%files city
2bdb5c
%license GeoLite2-City_%{version}/COPYRIGHT.txt GeoLite2-City_%{version}/LICENSE.txt
2bdb5c
%dir %{_datadir}/GeoIP
2bdb5c
%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLite2-City.mmdb
2bdb5c
2bdb5c
2bdb5c
%files country
2bdb5c
%license GeoLite2-Country_%{version}/COPYRIGHT.txt GeoLite2-Country_%{version}/LICENSE.txt
2bdb5c
%dir %{_datadir}/GeoIP
2bdb5c
%verify(not md5 size mtime) %{_datadir}/GeoIP/GeoLite2-Country.mmdb
2bdb5c
2bdb5c
2bdb5c
%changelog
2bdb5c
* Tue Feb 05 2019 Michal Ruprich <mruprich@redhat.com> - 20180605-1
2bdb5c
- Resolves: #1643472 - Add geolite2 package
2bdb5c
- Lowering the NVR due to the package version in el8. Higher NVR could make problems during migration from el7 to el8
2bdb5c
2bdb5c
* Mon Jun 11 2018 Carl George <carl@george.computer> - 20180605-1
2bdb5c
- Latest upstream
2bdb5c
2bdb5c
* Tue Apr 24 2018 Carl George <carl@george.computer> - 20180403-1
2bdb5c
- Initial package