[packages/GeoLite2-db-City] new, geolite2 city database

glen glen at pld-linux.org
Mon Dec 16 18:41:05 CET 2013


commit 4e083213f30ec5cf1aebf5513840fa26656e7a35
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Dec 16 19:40:33 2013 +0200

    new, geolite2 city database

 GeoLite2-db-City.spec | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
---
diff --git a/GeoLite2-db-City.spec b/GeoLite2-db-City.spec
new file mode 100644
index 0000000..4394604
--- /dev/null
+++ b/GeoLite2-db-City.spec
@@ -0,0 +1,43 @@
+%define		dbname	City
+Summary:	GeoLite2 City - City database for GeoIP
+Summary(pl.UTF-8):	GeoLite2 City - baza danych miast dla GeoIP
+Name:		GeoLite2-db-%{dbname}
+# Updated every month:
+Version:	20131210
+Release:	1
+License:	CC 3.0 BY-SA
+Group:		Applications/Databases
+Source0:	http://geolite.maxmind.com/download/geoip/database/GeoLite2-%{dbname}.mmdb.gz?/GeoLite2-%{dbname}-%{version}.mmdb.gz
+# Source0-md5:	ca142991d3594c8b65faa45ac442e1f3
+URL:		http://dev.maxmind.com/geoip/geoip2/geolite2/
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+GeoLite2 databases are free IP geolocation databases comparable to,
+but less accurate than, MaxMind's GeoIP2 databases.
+
+GeoLite2 databases are updated on the first Tuesday of each month.
+
+%prep
+%setup -qcT
+cp -p %{SOURCE0} GeoLite2-%{dbname}.mmdb.gz
+
+gunzip GeoLite2-%{dbname}.mmdb.gz
+
+ver=$(TZ=GMT stat -c '%y' GeoLite2-%{dbname}.mmdb | awk '{print $1}' | tr -d -)
+if [ "$ver" != %{version} ]; then
+	exit 1
+fi
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_datadir}/GeoIP
+cp -p GeoLite2-%{dbname}.mmdb $RPM_BUILD_ROOT%{_datadir}/GeoIP
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%{_datadir}/GeoIP/*.mmdb
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/GeoLite2-db-City.git/commitdiff/4e083213f30ec5cf1aebf5513840fa26656e7a35



More information about the pld-cvs-commit mailing list