3 %bcond_without tests # do not perform "make test"
6 %define pnam Validate-Domain
7 Summary: Domain validation methods Perl module
8 Name: perl-Data-Validate-Domain
11 License: GPL+ or Artistic
12 Group: Development/Libraries
13 Source0: http://search.cpan.org/CPAN/authors/id/N/NE/NEELY/Data-Validate-Domain-%{version}.tar.gz
14 # Source0-md5: 1331c0f47c024a83c610f8598490423a
15 URL: http://search.cpan.org/dist/Data-Validate-Domain
16 BuildRequires: rpm-perlprov >= 4.1-13
17 %if %{with autodeps} || %{with tests}
18 BuildRequires: perl(Exporter)
19 BuildRequires: perl(ExtUtils::MakeMaker)
20 BuildRequires: perl(Net::Domain::TLD) >= 1.62
21 BuildRequires: perl(Test::More)
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 This module collects domain validation routines to make input
28 validation, and untainting easier and more readable.
30 All functions return an untainted value if the test passes, and undef
31 if it fails. This means that you should always check for a defined
32 status explicitly. Don't assume the return will be true. (e.g.
35 The value to test is always the first (and often only) argument.
38 %setup -q -n Data-Validate-Domain-%{version}
40 find lib -name "*.pm" -exec chmod -c a-x {} +
43 %{__perl} Makefile.PL \
47 %{?with_tests:%{__make} test}
50 rm -rf $RPM_BUILD_ROOT
51 %{__make} pure_install \
52 DESTDIR=$RPM_BUILD_ROOT
55 rm -rf $RPM_BUILD_ROOT
58 %defattr(644,root,root,755)
60 %{perl_vendorlib}/Data/Validate/Domain.pm
61 %{_mandir}/man3/Data::Validate::Domain.3pm*