perl-IP-Country-DB_File/IP-Country-DB_File.spec

71 lines
1.9 KiB
RPMSpec
Raw Normal View History

2024-03-16 05:08:17 +01:00
#
# Conditional build:
%bcond_without tests # unit tests
#
%define pdir IP
%define pnam Country-DB_File
Summary: IP::Country::DB_File - IPv4 and IPv6 to country translation using DB_File
Name: perl-IP-Country-DB_File
Version: 3.03
2024-03-16 13:53:50 +01:00
Release: 2
2024-03-16 05:08:17 +01:00
# same as perl
License: GPL v1+ or Artistic
Group: Development/Languages/Perl
Source0: http://www.cpan.org/modules/by-module/IP/%{pdir}-%{pnam}-%{version}.tar.gz
# Source0-md5: 749ea4ca65126ef38d30bb386865c49e
URL: https://metacpan.org/dist/IP-Country-DB_File
BuildRequires: perl-devel >= 1:5.8.0
%if %{with tests}
2024-03-16 13:53:50 +01:00
BuildRequires: perl-Math-Int64 perl-DB_File
2024-03-16 05:08:17 +01:00
%endif
2024-03-16 13:53:50 +01:00
Requires: perl-DB_File
2024-03-16 05:08:17 +01:00
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
IP::Country::DB_File is a light-weight module for fast IP address to
country translation based on DB_File. The country code database is
stored in a Berkeley DB file. You have to build the database using
build_ipcc.pl or IP::Country::DB_File::Builder before you can lookup
country codes.
This module tries to be API compatible with the other IP::Country
modules. The installation of IP::Country is not required.
There are many other modules for locating IP addresses. Neil Bowers
posted an excellent review. Some features that make this module
unique:
%prep
%setup -q -n %{pdir}-%{pnam}-%{version}
%build
%{__perl} Makefile.PL \
INSTALLDIRS=vendor
%{__make}
%{?with_tests:%{__make} test}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} pure_install \
DESTDIR=$RPM_BUILD_ROOT
2024-03-16 13:53:50 +01:00
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
2024-03-16 05:08:17 +01:00
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc Changes README
%attr(755,root,root) %{_bindir}/build_ipcc.pl
%{perl_vendorlib}/IP/Country/*.pm
%{perl_vendorlib}/IP/Country/DB_File
%{_mandir}/man1/build_ipcc.pl.1*
%{_mandir}/man3/IP::Country::DB_File*.3*
%changelog
2024-03-16 13:53:50 +01:00
* Fri Mar 15 2024 Jean-Philippe Pialasse <jpp@koozali.org> -3.03-2.sme
2024-03-16 05:08:17 +01:00
- release for SME11