]> git.pld-linux.org Git - packages/perl-Capture-Tiny.git/blob - perl-Capture-Tiny.spec
up to 0.27
[packages/perl-Capture-Tiny.git] / perl-Capture-Tiny.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4
5 %define         pdir    Capture
6 %define         pnam    Tiny
7 %include        /usr/lib/rpm/macros.perl
8 Summary:        Capture::Tiny - Capture STDOUT and STDERR from Perl, XS or external programs
9 Summary(pl.UTF-8):      Capture::Tiny - przechwytywanie STDOUT i STDERR z Perla, XS lub programów zewnętrznych
10 Name:           perl-Capture-Tiny
11 Version:        0.27
12 Release:        1
13 License:        Apache v2.0
14 Group:          Development/Languages/Perl
15 Source0:        http://www.cpan.org/modules/by-authors/id/D/DA/DAGOLDEN/Capture-Tiny-%{version}.tar.gz
16 # Source0-md5:  63ee233f1dfaa75c5233839407b87ae3
17 URL:            http://search.cpan.org/dist/Capture-Tiny/
18 BuildRequires:  perl-ExtUtils-MakeMaker >= 6.30
19 BuildRequires:  perl-devel >= 1:5.8.0
20 BuildRequires:  rpm-perlprov >= 4.1-13
21 %if %{with tests}
22 BuildRequires:  perl-Inline
23 BuildRequires:  perl-Inline-C
24 BuildRequires:  perl-Test-Simple
25 %endif
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 Capture::Tiny provides a simple, portable way to capture anything sent
31 to STDOUT or STDERR, regardless of whether it comes from Perl, from XS
32 code or from an external program. Optionally, output can be teed so
33 that it is captured while being passed through to the original
34 handles. Yes, it even works on Windows. Stop guessing which of a dozen
35 capturing modules to use in any particular situation and just use this
36 one.
37
38 This module was heavily inspired by IO::CaptureOutput, which provides
39 similar functionality without the ability to tee output and with more
40 complicated code and API.
41
42 %description -l pl.UTF-8
43 Capture::Tiny dostarcza prosty, przenośny sposób przechwytywania
44 wszystkiego, co zostało przesłane na STDOUT lub STDERR, niezależnie od
45 tego, czy pochodzi z Perla, kodu XS lub programu zewnętrznego.
46 Opcjonalnie może działać jak tee, podczas przechwytywania przekazując
47 dane do oryginalnych uchwytów. Moduł działa nawet pod Windows. Nie
48 trzeba zgadywać, który z modułów przechwytujących działa w danej
49 sytuacji.
50
51 Ten moduł był w dużym stopniu inspirowany modułem IO::CaptureOutput,
52 który zapewnia podobną funkcjonalność bez możliwości przekazywania
53 wyjścia jak tee i ma nieco bardziej złożone API.
54
55 %prep
56 %setup -q -n %{pdir}-%{pnam}-%{version}
57
58 %build
59 %{__perl} Makefile.PL \
60         INSTALLDIRS=vendor
61 %{__make}
62
63 %{?with_tests:%{__make} test}
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 %{__make} pure_install \
69         DESTDIR=$RPM_BUILD_ROOT
70
71 install -d $RPM_BUILD_ROOT%{_examplesdir}
72 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %files
78 %defattr(644,root,root,755)
79 %doc Changes README Todo
80 %dir %{perl_vendorlib}/Capture
81 %{perl_vendorlib}/Capture/Tiny.pm
82 %{_mandir}/man3/Capture::Tiny.3pm*
83 %{_examplesdir}/%{name}-%{version}
This page took 0.055838 seconds and 3 git commands to generate.