]> git.pld-linux.org Git - SPECS.git/blob - perl-Test-Trap.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / perl-Test-Trap.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 #
5 %define         pdir    Test
6 %define         pnam    Trap
7 Summary:        Test::Trap - Trap exit codes, exceptions, output, etc.
8 Summary(pl.UTF-8):      Test::Trap - przechwytywanie kodów wyjścia, wyjątków, wyjścia itp.
9 Name:           perl-Test-Trap
10 Version:        0.3.4
11 Release:        1
12 # same as perl
13 License:        GPL v1+ or Artistic
14 Group:          Development/Languages/Perl
15 Source0:        http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-v%{version}.tar.gz
16 # Source0-md5:  7cb432fcb7b8f761e9cc2fc12e76b80b
17 URL:            https://metacpan.org/release/Test-Trap
18 BuildRequires:  perl-Module-Build
19 BuildRequires:  perl-devel >= 1:5.8.0
20 BuildRequires:  rpm-perlprov >= 4.1-13
21 BuildRequires:  rpmbuild(macros) >= 1.745
22 %if %{with tests}
23 BuildRequires:  perl-Data-Dump
24 BuildRequires:  perl-Test-Simple
25 BuildRequires:  perl-Test-Tester >= 0.107
26 %endif
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Primarily (but not exclusively) for use in test scripts: A block eval
32 on steroids, configurable and extensible, but by default trapping
33 (Perl) STDOUT, STDERR, warnings, exceptions, would-be exit codes, and
34 return values from boxed blocks of test code.
35
36 The values collected by the latest trap can then be queried or tested
37 through a special trap object.
38
39 %description -l pl.UTF-8
40 Moduł przeznaczony głównie (ale nie wyłącznie) do użycia w skryptach
41 testowych: blokowy eval na sterydach, konfigurowalny i rozszerzalny,
42 ale domyślnie przechwytujący (perlowe) STDOUT, STDERR, ostrzeżenia,
43 wyjątki, potencjalne kody wyjścia i wartości zwracane z ograniczonych
44 bloków kodu testowego.
45
46 Zgromadzone wartości z ostatniej pułapki mogą być następnie odpytywane
47 lub testowane poprzez specjalny obiekt pułapki.
48
49 %prep
50 %setup -q -n %{pdir}-%{pnam}-v%{version}
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
71 %{perl_vendorlib}/Test/Trap.pm
72 %{perl_vendorlib}/Test/Trap
73 %{_mandir}/man3/Test::Trap*.3pm*
This page took 1.295363 seconds and 3 git commands to generate.