]>
Commit | Line | Data |
---|---|---|
54a18e04 ER |
1 | # |
2 | # Conditional build: | |
eba65e8a | 3 | %bcond_without tests # build without tests |
54a18e04 ER |
4 | |
5 | %define pdir Data | |
6 | %define pnam Validate-IP | |
54a18e04 ER |
7 | Summary: Perl IP address validation routines |
8 | Name: perl-Data-Validate-IP | |
729c93dc | 9 | Version: 0.30 |
54a18e04 ER |
10 | Release: 1 |
11 | License: GPL+ or Artistic | |
12 | Group: Development/Libraries | |
13 | Source0: http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Data-Validate-IP-%{version}.tar.gz | |
729c93dc | 14 | # Source0-md5: 1302d60a6a0670b4105c9b7478a37992 |
54a18e04 ER |
15 | URL: http://search.cpan.org/dist/Data-Validate-IP |
16 | BuildRequires: rpm-perlprov >= 4.1-13 | |
17 | %if %{with tests} | |
18 | BuildRequires: perl(Exporter) | |
19 | BuildRequires: perl(ExtUtils::MakeMaker) | |
54a18e04 ER |
20 | BuildRequires: perl(NetAddr::IP) |
21 | BuildRequires: perl(Scalar::Util) | |
22 | BuildRequires: perl(Test::More) | |
23 | BuildRequires: perl(Test::Requires) | |
24 | BuildRequires: perl(constant) | |
25 | BuildRequires: perl(lib) | |
26 | %endif | |
27 | BuildArch: noarch | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | This module collects IP address validation routines to make input | |
32 | validation, and untainting easier and more readable. | |
33 | ||
34 | %prep | |
35 | %setup -q -n Data-Validate-IP-%{version} | |
36 | ||
37 | %build | |
38 | %{__perl} Makefile.PL \ | |
39 | INSTALLDIRS=vendor | |
40 | %{__make} | |
41 | ||
42 | %{?with_tests:%{__make} test} | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | %{__make} pure_install \ | |
47 | DESTDIR=$RPM_BUILD_ROOT | |
48 | ||
49 | %clean | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %files | |
53 | %defattr(644,root,root,755) | |
54 | %doc Changes README.md | |
55 | %{perl_vendorlib}/Data/Validate/IP.pm | |
56 | %{_mandir}/man3/Data::Validate::IP.3pm* |