File perl-IP-Geolocation-MMDB.spec of Package perl-IP-Geolocation-MMDB
#
# spec file for package perl-IP-Geolocation-MMDB
#
# Copyright (c) 2025 Andreas Vögele <andreas@andreasvoegele.com>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please send bugfixes or comments to the author.
#
Name: perl-IP-Geolocation-MMDB
Version: 1.013
Release: 0
Summary: Read MaxMind DB files
License: GPL-1.0-or-later OR Artistic-1.0-Perl
URL: https://metacpan.org/dist/IP-Geolocation-MMDB
Source: https://cpan.metacpan.org/authors/id/V/VO/VOEGELAS/IP-Geolocation-MMDB-%{version}.tar.gz
AutoProv: 1
AutoReq: 1
%global __perl_requires /bin/true
%global __perllib_requires /bin/true
%global __perltest_requires /bin/true
# Build:
BuildRequires: coreutils
BuildRequires: gcc
BuildRequires: make
BuildRequires: perl
%if 0%{?fedora} > 0 || 0%{?rhel} > 0
BuildRequires: perl-generators
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%endif
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
BuildRequires: pkgconfig(libmaxminddb) >= 1.2.0
# Runtime:
%if 0%{?mageia} > 0
BuildRequires: perl(Math::BigInt) >= 1.999.806
%else
BuildRequires: perl(Math::BigInt) >= 1.999806
%endif
BuildRequires: perl(XSLoader)
BuildRequires: perl(utf8)
# Tests:
BuildRequires: perl(File::Spec::Functions)
BuildRequires: perl(Test::More)
%if 0%{?mageia} > 0
Requires: perl(Math::BigInt) >= 1.999.806
%else
Requires: perl(Math::BigInt) >= 1.999806
%endif
Requires: perl(XSLoader)
Requires: perl(utf8)
Requires: perl(warnings)
Suggests: dbip-asn-lite
Suggests: dbip-country-lite
Suggests: perl-Geo-Location-IP
%{?perl_requires}
%{?perl_default_filter}
%description
A Perl module that reads MaxMind DB files and maps IP addresses to location
information such as country and city names.
%prep
%autosetup -n IP-Geolocation-MMDB-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor
make
%install
%{make_install}
%{_fixperms} %{buildroot}/*
find %{buildroot} \
\( -name perllocal.pod -o -name .packlist -o -type d -empty \) \
-delete
%check
make test
%files
%defattr(-, root, root)
%license LICENSE
%doc Changes CONTRIBUTING.md README.md
%{perl_vendorarch}/*
%exclude %dir %{perl_vendorarch}/auto/
%{_mandir}/man3/*
%changelog