3 %bcond_without tests # do not perform "make test"
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
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
22 BuildRequires: perl-Inline
23 BuildRequires: perl-Inline-C
24 BuildRequires: perl-Test-Simple
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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.
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
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.
56 %setup -q -n %{pdir}-%{pnam}-%{version}
59 %{__perl} Makefile.PL \
63 %{?with_tests:%{__make} test}
66 rm -rf $RPM_BUILD_ROOT
68 %{__make} pure_install \
69 DESTDIR=$RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT%{_examplesdir}
72 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
75 rm -rf $RPM_BUILD_ROOT
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}