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