Blame SPECS/geolite2.spec

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