From 8f0140d79917184be37d34e70160edd970d8908d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Sat, 16 Mar 2024 00:08:17 -0400 Subject: [PATCH] initial built --- .gitattributes | 2 + IP-Country-DB_File-3.03.tar.gz | 3 ++ IP-Country-DB_File.spec | 70 ++++++++++++++++++++++++++++++++++ Makefile | 22 +++++++++++ 4 files changed, 97 insertions(+) create mode 100644 .gitattributes create mode 100644 IP-Country-DB_File-3.03.tar.gz create mode 100644 IP-Country-DB_File.spec create mode 100644 Makefile diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..57e6577 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.tar.gz filter=lfs diff=lfs merge=lfs -text +IP-Country-DB_File-3.03.tar.gz filter=lfs diff=lfs merge=lfs -text diff --git a/IP-Country-DB_File-3.03.tar.gz b/IP-Country-DB_File-3.03.tar.gz new file mode 100644 index 0000000..af6a948 --- /dev/null +++ b/IP-Country-DB_File-3.03.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c794cd1cfda173e86cabe62778a96c7c241a295541443a4530c0a692ed1841ea +size 16736 diff --git a/IP-Country-DB_File.spec b/IP-Country-DB_File.spec new file mode 100644 index 0000000..5b1cc78 --- /dev/null +++ b/IP-Country-DB_File.spec @@ -0,0 +1,70 @@ +# +# 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 +Release: 1 +# 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 +BuildRequires: rpm-perlprov >= 4.1-13 +BuildRequires: rpmbuild(macros) >= 1.745 +%if %{with tests} +BuildRequires: perl-Math-Int64 +%endif +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 + +%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 +* Fri Mar 15 2024 Jean-Philippe Pialasse -3.03-1.sme +- release for SME11 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c667bb3 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +# Makefile for source rpm: perl-IP-Country-DB_File +# $Id: Makefile,v 1.1 2024/03/15 13:14:25 jpp Exp $ +NAME := perl-IP-Country-DB_File +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) +