]> git.pld-linux.org Git - packages/GeoIP-db-City.git/blame_incremental - GeoIP-db-City.spec
up to 2015.08.05
[packages/GeoIP-db-City.git] / GeoIP-db-City.spec
... / ...
CommitLineData
1Summary: GeoLite City - City database for GeoIP
2Summary(pl.UTF-8): GeoLite City - baza danych miast dla GeoIP
3Name: GeoIP-db-City
4# Updated every month:
5Version: 2015.08.05
6Release: 1
7License: CC 3.0 BY-SA
8Group: Applications/Databases
9Source0: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.xz?/GeoLiteCity-%{version}.dat.xz
10# Source0-md5: c4c70b767ab2082dac4e25676f9dbcca
11Source1: http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz?/GeoLiteCityv6-%{version}.dat.gz
12# Source1-md5: 8348aed15a9c8334b74adf76f3e1aeb5
13URL: http://dev.maxmind.com/geoip/legacy/geolite/
14BuildRequires: tar >= 1:1.22
15BuildRequires: xz
16BuildArch: noarch
17BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19%description
20Determine country, state/region, city, US postal code, US area code,
21metro code, latitude, and longitude information for IP addresses
22worldwide.
23
24License disclaimer: this product includes GeoLite data created by
25MaxMind, available from <http://www.maxmind.com/>.
26
27%description -l pl.UTF-8
28Znajdź państwo, stan/region, miasto, kod pocztowy, kod regionu, kod
29miejski, szerokość i wysokość geograficzną dla adresów IP z całego
30świata.
31
32Informacja licencyjna: ten produkt zawiera dane GeoLite stworzone
33przez MaxWind, dostępne z <http://www.maxwind.com/>.
34
35%prep
36%setup -qcT
37cp -p %{SOURCE0} .
38cp -p %{SOURCE1} .
39
40xz -d GeoLiteCity-%{version}.dat.xz
41gunzip GeoLiteCityv6-%{version}.dat.gz
42
43%build
44# get file DATE in GMT timezone
45filedate() {
46 TZ=GMT stat -c '%y' "$1" | awk '{print $1}'
47}
48
49# use newest file date as version
50d1=$(filedate GeoLiteCity-%{version}.dat)
51d2=$(filedate GeoLiteCityv6-%{version}.dat)
52if [ "$(echo $d1 | tr -d -)" -gt "$(echo $d2 | tr -d -)" ]; then
53 d=$d1
54else
55 d=$d2
56fi
57
58ver=$(echo $d | tr - .)
59if [ "$ver" != %{version} ]; then
60 exit 1
61fi
62
63%install
64rm -rf $RPM_BUILD_ROOT
65install -d $RPM_BUILD_ROOT%{_datadir}/GeoIP
66cp -p GeoLiteCity-%{version}.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoLiteCity.dat
67ln -s GeoLiteCity.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoIPCity.dat
68
69cp -p GeoLiteCityv6-%{version}.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoLiteCityv6.dat
70ln -s GeoLiteCityv6.dat $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoIPCityv6.dat
71
72%clean
73rm -rf $RPM_BUILD_ROOT
74
75%files
76%defattr(644,root,root,755)
77%{_datadir}/GeoIP/*.dat
This page took 0.188309 seconds and 4 git commands to generate.