Name:           perl-Net-IPv4Addr
Summary:        Perl extension for manipulating IPv4 addresses
Version:        0.10
Release:        1%{?_dist_release}
License:        Artistic or GPL+
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/Net-IPv4Addr/

Source:         http://www.cpan.org/modules/by-module/Net/Net-IPv4Addr-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

BuildArch:      noarch
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildRequires:  perl(ExtUtils::MakeMaker)

%description
This package contains a Perl extension for manipulating IPv4 addresses.

%prep
%setup -q -n Net-IPv4Addr-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS="vendor" PREFIX="%{buildroot}%{_prefix}"
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf %{buildroot}
%{__make} pure_install

### Clean up buildroot
find %{buildroot} -name .packlist -exec %{__rm} {} \;

%check
%{__make} test

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, 0755)
%doc ChangeLog README
%{_mandir}/man?/*
%{_bindir}/ipv4calc
%{perl_vendorlib}/Net/IPv4Addr.pm
%{perl_vendorlib}/auto/Net

%changelog
* Mon Mar 05 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.10-1
- initial build for Vine Linux
