[packages/mmdbinspect] Initial

arekm arekm at pld-linux.org
Fri Aug 28 09:19:02 CEST 2026


commit 37b5c8c50ea5e580f9ee66c761db1ee7ae2537f2
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Aug 28 09:18:44 2026 +0200

    Initial

 mmdbinspect.spec | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)
---
diff --git a/mmdbinspect.spec b/mmdbinspect.spec
new file mode 100644
index 0000000..985a9fb
--- /dev/null
+++ b/mmdbinspect.spec
@@ -0,0 +1,84 @@
+#
+# Conditional build:
+%bcond_without	tests		# unit tests
+
+# commit pinned by the test/data submodule of the v%{version} tag
+%define		testdata_commit	507c17e7cf266bb47bca4922aa62071cb21f6d06
+%define		testdata_short	507c17e7
+
+Summary:	Look up records for IPs and networks in MaxMind DB (mmdb) files
+Summary(pl.UTF-8):	Wyszukiwanie rekordów adresów IP i sieci w plikach MaxMind DB (mmdb)
+Name:		mmdbinspect
+Version:	2.0.0
+Release:	1
+License:	Apache v2.0 or MIT
+Group:		Applications/Networking
+#Source0Download: https://github.com/maxmind/mmdbinspect/releases
+Source0:	https://github.com/maxmind/mmdbinspect/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	a37dc78bb4be351c4c8e824e7a0c6e98
+# cd %{name}-%{version}
+# go mod vendor
+# tar cJf ../%{name}-vendor-%{version}.tar.xz vendor
+Source1:	%{name}-vendor-%{version}.tar.xz
+# Source1-md5:	10fb1827ead7d4ef3079d842238f8489
+# test data; the release tarball ships test/data as an empty submodule dir
+Source2:	https://github.com/maxmind/MaxMind-DB/archive/%{testdata_commit}/MaxMind-DB-%{testdata_short}.tar.gz
+# Source2-md5:	2f730664a2cde1b652f335ebda5b05d9
+URL:		https://github.com/maxmind/mmdbinspect
+BuildRequires:	golang >= 1.24
+BuildRequires:	rpmbuild(macros) >= 2.009
+ExclusiveArch:	%go_arches
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%undefine	_debugsource_packages
+
+%description
+mmdbinspect looks up records for one or more IP addresses or networks
+in one or more MaxMind DB (.mmdb) files, such as the GeoIP2 and
+GeoLite2 databases from MaxMind or the DB-IP Lite databases. Several
+databases can be queried in a single run and the results are printed
+in a machine-readable form, ready to be fed into other tools.
+
+It is a maintained replacement for geoiplookup, which reads only the
+retired GeoIP Legacy (.dat) format.
+
+%description -l pl.UTF-8
+mmdbinspect wyszukuje rekordy dla jednego lub wielu adresów IP albo
+sieci w jednym lub wielu plikach MaxMind DB (.mmdb), takich jak bazy
+GeoIP2 i GeoLite2 firmy MaxMind czy bazy DB-IP Lite. W jednym
+przebiegu można odpytać kilka baz naraz, a wyniki wypisywane są w
+postaci nadającej się do dalszego przetwarzania.
+
+Jest to utrzymywany zamiennik narzędzia geoiplookup, które czyta
+wyłącznie wycofany format GeoIP Legacy (.dat).
+
+%prep
+%if %{with tests}
+%setup -q -a1 -a2
+%{__mv} MaxMind-DB-%{testdata_commit}/test-data test/data/test-data
+%else
+%setup -q -a1
+%endif
+
+%{__mkdir_p} .go-cache
+
+%build
+%__go build -v -mod=vendor -o bin/%{name} ./cmd/%{name}
+
+%if %{with tests}
+%__go test -mod=vendor ./...
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_bindir}
+
+cp -p bin/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGELOG.md LICENSE-APACHE LICENSE-MIT README.md
+%attr(755,root,root) %{_bindir}/%{name}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mmdbinspect.git/commitdiff/37b5c8c50ea5e580f9ee66c761db1ee7ae2537f2



More information about the pld-cvs-commit mailing list