[packages/dbip-asn-lite] Initial
arekm
arekm at pld-linux.org
Tue Jun 23 11:19:37 CEST 2026
commit e20f22be97b5f24368e199672574c8f26e3c8c9c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Jun 23 11:18:52 2026 +0200
Initial
dbip-asn-lite.spec | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
---
diff --git a/dbip-asn-lite.spec b/dbip-asn-lite.spec
new file mode 100644
index 0000000..c0d7f88
--- /dev/null
+++ b/dbip-asn-lite.spec
@@ -0,0 +1,85 @@
+%define edition asn
+%define geoname ASN
+%define mver 2026-06
+Summary: DB-IP IP to ASN Lite - free IP-to-ASN database
+Summary(pl.UTF-8): DB-IP IP to ASN Lite - darmowa baza danych systemów autonomicznych
+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: 675e466d960d460148e1c66cbdd02da7
+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 ASN Lite database, which maps IP
+addresses to an autonomous system number and organization.
+
+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 ASN Lite, przypisującą adresom IP
+numer systemu autonomicznego (ASN) oraz jego organizację.
+
+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 ASN Lite database
+Summary(pl.UTF-8): Dowiązanie o nazwie GeoLite2 do bazy DB-IP ASN Lite
+Group: Applications/Databases
+Requires: %{name} = %{version}-%{release}
+
+%description -n dbip-%{edition}-lite-GeoLite2-compat
+This compatibility package installs the DB-IP ASN 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 ASN 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-asn-lite.git/commitdiff/e20f22be97b5f24368e199672574c8f26e3c8c9c
More information about the pld-cvs-commit
mailing list