]> git.pld-linux.org Git - packages/perl-IPC-System-Simple.git/blob - perl-IPC-System-Simple.spec
- updated to 1.30
[packages/perl-IPC-System-Simple.git] / perl-IPC-System-Simple.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define         pdir    IPC
6 %define         pnam    System-Simple
7 Summary:        IPC::System::Simple - Run commands simply, with detailed diagnostics
8 Summary(pl.UTF-8):      IPC::System::Simple - proste uruchamianie poleceń ze szczegółową diagnostyką
9 Name:           perl-IPC-System-Simple
10 Version:        1.30
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/IPC/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5:  e68341fd958fd013b3521d909904f675
17 URL:            https://metacpan.org/release/IPC-System-Simple
18 BuildRequires:  perl-ExtUtils-MakeMaker >= 6.30
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-Scalar-List-Utils
24 BuildRequires:  perl-Test-Simple
25 %endif
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 Calling Perl's in-built system() function is easy, determining if it
31 was successful is hard. Let's face it, $? isn't the nicest variable in
32 the world to play with, and even if you do check it, producing a
33 well-formatted error string takes a lot of work.
34
35 IPC::System::Simple takes the hard work out of calling external
36 commands. In fact, if you want to be really lazy, you can just write:
37
38     use IPC::System::Simple qw(system);
39
40 and all of your system commands will either succeed (run to completion
41 and return a zero exit value), or die with rich diagnostic messages.
42
43 The IPC::System::Simple module also provides a simple replacement to
44 Perl's backticks operator.
45
46 %description -l pl.UTF-8
47 Wywołanie wbudowanej funkcji Perla system() jest łatwe, ale
48 stwierdzenie, czy się powiodło, jest trudne. $? nie jest najładniejszą
49 zmienną do obsługi, a nawet jeśli się ją sprawdzi, przygotowanie
50 dobrze sformatowanej informacji o błędzie wymaga dużo pracy.
51
52 IPC::System::Simple bierze na siebie tę ciężką pracę przy wywoływaniu
53 poleceń zewnętrznych. Będąc naprawdę leniwym, wystarczy napisać:
54
55     use IPC::System::Simple qw(system);
56
57 i wszystkie wywołania systemowe albo się powiodą (zakończą i zwrócą
58 zerowy kod wyjścia), albo zakończą śmiercią ze szczegółowym
59 komunikatem diagnostycznym.
60
61 Moduł IPC::System::Simple udostępnia także prosty zamiennik operatora
62 Perla ``.
63
64 %prep
65 %setup -q -n %{pdir}-%{pnam}-%{version}
66
67 %build
68 %{__perl} Makefile.PL \
69         INSTALLDIRS=vendor
70 %{__make}
71
72 %{?with_tests:%{__make} test}
73
74 %install
75 rm -rf $RPM_BUILD_ROOT
76
77 %{__make} pure_install \
78         DESTDIR=$RPM_BUILD_ROOT
79
80 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
81 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %files
87 %defattr(644,root,root,755)
88 %doc Changes README
89 %{perl_vendorlib}/IPC/System/Simple.pm
90 %{_mandir}/man3/IPC::System::Simple.3pm*
91 %{_examplesdir}/%{name}-%{version}
This page took 0.23391 seconds and 4 git commands to generate.