8
0
Files
perl-Data-Validate-IP/perl-Data-Validate-IP.spec

57 lines
1.6 KiB
RPMSpec
Raw Normal View History

# vim: set sw=4 ts=4 et nu:
Name: perl-Data-Validate-IP
Version: 0.14
Release: 0
Summary: Ipv4 and ipv6 validation methods
Source: http://search.cpan.org/CPAN/authors/id/N/NE/NEELY/Data-Validate-IP-%{version}.tar.gz
URL: http://search.cpan.org/dist/Data-Validate-IP
Group: Development/Libraries/Perl
License: GNU General Public License version 2 or later or Artistic (GPLv2+ or Artistic)
BuildRoot: %{_tmppath}/build-%{name}-%{version}
%{perl_requires}
BuildRequires: perl-macros
BuildRequires: make
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::More)
BuildRequires: perl(Net::Netmask)
Requires: perl(Net::Netmask)
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description
This module collects ip validation routines to make input validation, and
untainting easier and more readable.
All functions return an untainted value if the test passes, and undef if
it fails. This means that you should always check for a defined status
explicitly. Don't assume the return will be true. (e.g. is_username('0'))
The value to test is always the first (and often only) argument.
%prep
%setup -q -n "Data-Validate-IP-%{version}"
%__sed -i '/^auto_install/d' Makefile.PL
%build
%__perl Makefile.PL PREFIX="%{_prefix}"
%__make %{?_smp_flags}
%install
%perl_make_install
%perl_process_packlist
%check
%__make test
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc Changes README
%dir %{perl_vendorlib}/Data
%dir %{perl_vendorlib}/Data/Validate
%{perl_vendorlib}/Data/Validate/IP.pm
%doc %{perl_man3dir}/Data::Validate::IP.%{perl_man3ext}%{ext_man}