Name: perl-Geo-IP
Summary: Efficient Perl bindings for the GeoIP location database
Version: 1.43
Release: 3%{?dist}
URL: http://search.cpan.org/dist/Geo-IP/
License: GPL+ or Artistic
Source0: http://search.cpan.org/CPAN/authors/id/B/BO/BORISZ/Geo-IP-%{version}.tar.gz
Patch0: Geo-IP-1.40-Drop-failing-namelookup-unit-test.patch
Patch1: Geo-IP-1.40-Fix-shebangs-in-example-files.patch
BuildRequires: GeoIP-devel
BuildRequires: perl(ExtUtils::MakeMaker)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%{?perl_default_filter}
%description
This package contains Perl bindings for the GeoIP IP/host-name to
country/location/organization database.
This package requires Maxmind's GeoIP libraries but is often faster than other,
similar modules.
%prep
%setup -q -n Geo-IP-%{version}
%patch0 -p1
%patch1 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}
# Avoid uneeded dependencies in the docs.
find example/ -type f | xargs chmod -x
%install
make pure_install PERL_INSTALL_ROOT=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w %{buildroot}/*
%check
make test
%files
%doc Changes example
%{perl_vendorarch}/Geo
%{perl_vendorarch}/auto/Geo
%{_mandir}/man3/Geo::IP*.3*
%{_mandir}/man3/Geo::Mirror.3*
%changelog
* Thu Sep 04 2014 Petr Lautrbach <plautrba@redhat.com> 1.43-3
- initial release