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