]>
Commit | Line | Data |
---|---|---|
2a391858 MP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir Test | |
7 | %define pnam Block | |
8 | Summary: Test::Block - Specify fine granularity test plans | |
aceaa100 | 9 | Summary(pl.UTF-8): Test::Block - określanie szczegółowych planów testów |
2a391858 | 10 | Name: perl-Test-Block |
824742a0 | 11 | Version: 0.13 |
2892bd3b | 12 | Release: 3 |
2a391858 MP |
13 | # same as perl |
14 | License: GPL v1+ or Artistic | |
15 | Group: Development/Languages/Perl | |
aceaa100 | 16 | Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz |
824742a0 | 17 | # Source0-md5: f4e289f7f2a333983f1e4d578d82f5a3 |
b9f2a8b0 JB |
18 | # https://rt.cpan.org/Ticket/Attachment/1600903/856113/0001-Make-Test-Block-work-with-perl-5.23.8.patch |
19 | Patch0: %{name}-perl5.24.patch | |
aceaa100 | 20 | URL: http://search.cpan.org/dist/Test-Block/ |
b9f2a8b0 | 21 | BuildRequires: perl-Module-Build >= 0.38 |
2a391858 MP |
22 | BuildRequires: perl-devel >= 1:5.8.0 |
23 | BuildRequires: rpm-perlprov >= 4.1-13 | |
2892bd3b | 24 | BuildRequires: rpmbuild(macros) >= 1.672 |
2a391858 | 25 | %if %{with tests} |
b9f2a8b0 JB |
26 | BuildRequires: perl(Test::Builder) >= 0.17 |
27 | BuildRequires: perl-Test-Builder-Tester >= 1.01 | |
aceaa100 | 28 | BuildRequires: perl-Test-Exception >= 0.15 |
b9f2a8b0 | 29 | BuildRequires: perl-Test-Simple >= 0.47 |
2a391858 | 30 | %endif |
296597a9 | 31 | Requires: perl-base |
2a391858 MP |
32 | BuildArch: noarch |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
2892bd3b JB |
35 | # provided by Tie::Scalar (perl-base) |
36 | %define _noautoreq_perl Tie::StdScalar | |
296597a9 | 37 | |
2a391858 | 38 | %description |
aceaa100 JB |
39 | This module allows you to specify the number of expected tests at a |
40 | finer level of granularity than an entire test script. It is built | |
41 | with Test::Builder and plays happily with Test::More and friends. | |
2a391858 | 42 | |
aceaa100 JB |
43 | %description -l pl.UTF-8 |
44 | Ten moduł pozwala na określanie liczby oczekiwanych testów na poziomie | |
45 | dokładniejszym niż cały skrypt testowy. Jest stworzony w oparciu o | |
46 | Test::Builder i dobrze współpracuje z Test::More oraz podobnymi. | |
2a391858 MP |
47 | |
48 | %prep | |
49 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
b9f2a8b0 | 50 | %patch0 -p2 |
2a391858 MP |
51 | |
52 | %build | |
53 | %{__perl} Build.PL \ | |
54 | destdir=$RPM_BUILD_ROOT \ | |
55 | installdirs=vendor | |
56 | ./Build | |
57 | ||
58 | %{?with_tests:./Build test} | |
59 | ||
60 | %install | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | ./Build install | |
64 | ||
65 | %clean | |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | %files | |
69 | %defattr(644,root,root,755) | |
70 | %doc Changes README | |
b9f2a8b0 JB |
71 | %{perl_vendorlib}/Test/Block.pm |
72 | %{_mandir}/man3/Test::Block.3pm* |