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