%define pkgname NetAddr-IP
%define filelist %{pkgname}-%{version}-filelist
%define NVR %{pkgname}-%{version}-%{release}

Name:           perl-NetAddr-IP
Summary:        NetAddr-IP - Manages IPv4 and IPv6 addresses and subnets
Version:        4.079
Release:        2%{?_dist_release}
Group:          programming
Vendor:         Project Vine
Distribution:   Vine Linux
Packager:       tomop, shaolin

License:        Artistic
URL:            https://metacpan.org/pod/NetAddr::IP
Source:         https://cpan.metacpan.org/authors/id/M/MI/MIKER/%{pkgname}-%{version}.tar.gz

BuildRequires:  perl >= 2:5.34.0
BuildRequires:  perl(AutoLoader)
BuildRequires:  perl(Carp)
BuildRequires:  perl(Data::Dumper)
BuildRequires:  perl(Exporter)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Math::BigInt)
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Socket6)
# Test Suite
BuildRequires:  perl(Data::Dumper)
BuildRequires:  perl(Storable)
BuildRequires:  perl(Test::More)
# Runtime
Requires:       perl >= 2:5.34.0
Requires:       perl(Math::BigInt)
Requires:       perl(Socket6)

# Don't "provide" private Perl libs or redundant unversioned provides
%global __provides_exclude ^(perl\\(NetAddr::IP(::(InetBase|Util(PP)?))?\\)$|Util\\.so)
 
%description
This module provides an object-oriented abstraction on top of IP
addresses or IP subnets, that allows for easy manipulations.
Version 4.xx of NetAdder::IP will will work older
versions of Perl and does B<not> use Math::BigInt as in previous versions.

The internal representation of all IP objects is in 128 bit IPv6 notation.
IPv4 and IPv6 objects may be freely mixed.


%debug_package


%prep
%setup -q -n %{pkgname}-%{version} 
chmod -R u+w %{_builddir}/%{pkgname}-%{version}


%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1
make %{?_smp_mflags}


%install
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name '*.bs' -empty -delete
%{_fixperms} %{buildroot}


%check
make test


%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}


%files
%license Artistic Copying
%doc About-NetAddr-IP.txt Changes TODO docs/rfc1884.txt
%{perl_vendorarch}/auto/NetAddr/
%{perl_vendorarch}/NetAddr/
%{_mandir}/man3/NetAddr::IP.3*
%{_mandir}/man3/NetAddr::IP::InetBase.3*
%{_mandir}/man3/NetAddr::IP::Lite.3*
%{_mandir}/man3/NetAddr::IP::Util.3*
%{_mandir}/man3/NetAddr::IP::UtilPP.3*


%changelog
* Sun Nov 21 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.079-1
- rebuilt with perl-5.34.0.

* Sun May 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.079-1
- new upstream release.
- rebuilt with perl-5.26.

* Mon Jun 30 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.075-1
- new upstream release.

* Thu Mar 27 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.072-1
- new upstream release.

* Thu Mar 01 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 4.058-1
- updated to 4.058: minor fix to the spec

* Thu Apr 07 2011 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.042-1
- Initial build.
