1 %include /usr/lib/rpm/macros.php
3 %define _subclass Command
5 %define _pearname %{_class}_%{_subclass}
7 Summary: %{_pearname} - commandline execution interface
8 Summary(pl): %{_pearname} - interfejs do wykonywania poleceñ systemowych
9 Name: php-pear-%{_pearname}
13 Group: Development/Languages/PHP
14 Source0: http://pear.php.net/get/%{_pearname}-%{version}.tgz
15 # Source0-md5: 1cdc6c0797c719cf5c0cc4d21f1be058
16 URL: http://pear.php.net/package/System_Command/
17 BuildRequires: rpm-php-pearprov >= 4.0.2-98
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Running functions from the commandline can be dangerous if the proper
24 precautions are not taken to escape the shell arguments and reaping
25 the exit status properly. This class give a formal interface to both,
26 so that you can run a system command as comfortably as you would run a
27 php function, which full pear error handling as results on failure.
29 This class has in PEAR status: %{_status}.
32 U¿ywanie funkcji z poleceñ systemowych mo¿e byæ niebezpieczne, je¶li
33 nie wykona³o siê odpowiedniego przygotowania parametrów i sprawdzenia
34 kodu wyj¶cia. Ta klasa daje formalny interfejs do obu rzeczy, co
35 pozwala na wywo³ywanie poleceñ systemowych w sposób tak wygodny, jak
36 wywo³anie funkcji php, która u¿ywa obs³ugi b³êdów PEAR-a w przypadku
39 Ta klasa ma w PEAR status: %{_status}.
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}
48 install %{_pearname}-%{version}/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class}
51 rm -rf $RPM_BUILD_ROOT
54 %defattr(644,root,root,755)
55 %dir %{php_pear_dir}/%{_class}
56 %{php_pear_dir}/%{_class}/*.php