[packages/dbip-city-lite] Initial

arekm arekm at pld-linux.org
Tue Jun 23 11:17:59 CEST 2026


commit 4e65bd0d3e0e6b924731fa31a8d4214c5017b90d
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Jun 23 11:17:19 2026 +0200

    Initial

 dbip-city-lite.spec | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 87 insertions(+)
---
diff --git a/dbip-city-lite.spec b/dbip-city-lite.spec
new file mode 100644
index 0000000..28073e3
--- /dev/null
+++ b/dbip-city-lite.spec
@@ -0,0 +1,87 @@
+%define		edition	city
+%define		geoname	City
+%define		mver	2026-06
+Summary:	DB-IP IP to City Lite - free IP geolocation database
+Summary(pl.UTF-8):	DB-IP IP to City Lite - darmowa baza danych miast dla geolokalizacji IP
+Name:		dbip-%{edition}-lite
+Version:	20260601
+Release:	1
+License:	CC-BY-4.0
+Group:		Applications/Databases
+Source0:	https://download.db-ip.com/free/%{name}-%{mver}.mmdb.gz
+# Source0-md5:	d2461267fa02a82dd2db2ddd78af8a39
+URL:		https://db-ip.com/db/lite.php
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+DB-IP Lite databases are free IP geolocation databases from DB-IP.com,
+a freely redistributable alternative to MaxMind GeoLite2 in the same
+MMDB format.
+
+This package provides the IP to City Lite database, which maps IP
+addresses to a country, region, city and approximate coordinates.
+
+This product includes IP geolocation data created by DB-IP.com,
+available under a Creative Commons Attribution 4.0 International
+License.
+
+%description -l pl.UTF-8
+Bazy danych DB-IP Lite to darmowe bazy geolokalizacji adresów IP od
+DB-IP.com, swobodnie redystrybuowalna alternatywa dla MaxMind GeoLite2
+w tym samym formacie MMDB.
+
+Ten pakiet dostarcza bazę IP to City Lite, przypisującą adresom IP
+kraj, region, miasto i przybliżone współrzędne geograficzne.
+
+Produkt zawiera dane geolokalizacyjne stworzone przez DB-IP.com,
+dostępne na licencji Creative Commons Attribution 4.0 International.
+
+%package -n dbip-%{edition}-lite-GeoLite2-compat
+Summary:	GeoLite2-named symlink for the DB-IP City Lite database
+Summary(pl.UTF-8):	Dowiązanie o nazwie GeoLite2 do bazy DB-IP City Lite
+Group:		Applications/Databases
+Requires:	%{name} = %{version}-%{release}
+Provides:	GeoLite2-db-%{geoname} = %{version}-%{release}
+Conflicts:	GeoLite2-db-%{geoname}
+
+%description -n dbip-%{edition}-lite-GeoLite2-compat
+This compatibility package installs the DB-IP City Lite database under
+the MaxMind file name %{_datadir}/GeoIP/GeoLite2-%{geoname}.mmdb (a
+symlink), for software that expects the GeoLite2 file name.
+
+%description -n dbip-%{edition}-lite-GeoLite2-compat -l pl.UTF-8
+Pakiet zgodności udostępniający bazę DB-IP City Lite pod nazwą pliku
+MaxMind %{_datadir}/GeoIP/GeoLite2-%{geoname}.mmdb (dowiązanie
+symboliczne), dla oprogramowania oczekującego nazwy zgodnej z
+GeoLite2.
+
+%prep
+%setup -qcT
+cp -p %{SOURCE0} dbip-%{edition}-lite.mmdb.gz
+
+# -N: take the build date from the gzip header, not the download mtime
+gunzip -N dbip-%{edition}-lite.mmdb.gz
+
+# the database build month must match %{mver}
+ver=$(TZ=GMT stat -c '%y' dbip-%{edition}-lite.mmdb | cut -c1-7)
+if [ "$ver" != "%{mver}" ]; then
+	exit 1
+fi
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_datadir}/GeoIP
+cp -p dbip-%{edition}-lite.mmdb $RPM_BUILD_ROOT%{_datadir}/GeoIP
+ln -s dbip-%{edition}-lite.mmdb $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoLite2-%{geoname}.mmdb
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%{_datadir}/GeoIP/dbip-%{edition}-lite.mmdb
+
+%files -n dbip-%{edition}-lite-GeoLite2-compat
+%defattr(644,root,root,755)
+%{_datadir}/GeoIP/GeoLite2-%{geoname}.mmdb
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/dbip-city-lite.git/commitdiff/4e65bd0d3e0e6b924731fa31a8d4214c5017b90d



More information about the pld-cvs-commit mailing list