]> git.pld-linux.org Git - SPECS.git/blob - GeoLite2-db-City.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / GeoLite2-db-City.spec
1 %define         dbname  City
2 Summary:        GeoLite2 City - City database for GeoIP
3 Summary(pl.UTF-8):      GeoLite2 City - baza danych miast dla GeoIP
4 Name:           GeoLite2-db-%{dbname}
5 # Updated every month:
6 Version:        20131210
7 Release:        1
8 License:        CC 3.0 BY-SA
9 Group:          Applications/Databases
10 Source0:        http://geolite.maxmind.com/download/geoip/database/GeoLite2-%{dbname}.mmdb.gz?/GeoLite2-%{dbname}-%{version}.mmdb.gz
11 # Source0-md5:  ca142991d3594c8b65faa45ac442e1f3
12 URL:            http://dev.maxmind.com/geoip/geoip2/geolite2/
13 BuildArch:      noarch
14 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15
16 %description
17 GeoLite2 databases are free IP geolocation databases comparable to,
18 but less accurate than, MaxMind's GeoIP2 databases.
19
20 GeoLite2 databases are updated on the first Tuesday of each month.
21
22 %prep
23 %setup -qcT
24 cp -p %{SOURCE0} GeoLite2-%{dbname}.mmdb.gz
25
26 gunzip GeoLite2-%{dbname}.mmdb.gz
27
28 ver=$(TZ=GMT stat -c '%y' GeoLite2-%{dbname}.mmdb | awk '{print $1}' | tr -d -)
29 if [ "$ver" != %{version} ]; then
30         exit 1
31 fi
32
33 %install
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT%{_datadir}/GeoIP
36 cp -p GeoLite2-%{dbname}.mmdb $RPM_BUILD_ROOT%{_datadir}/GeoIP
37
38 %clean
39 rm -rf $RPM_BUILD_ROOT
40
41 %files
42 %defattr(644,root,root,755)
43 %{_datadir}/GeoIP/*.mmdb
This page took 0.474282 seconds and 3 git commands to generate.