%include /usr/lib/rpm/macros.php %define _class System %define _subclass Command %define _pearname %{_class}_%{_subclass} Summary: %{_pearname} - commandline execution interface Summary(pl): %{_pearname} - interfejs do wykonywania poleceń systemowych Name: php-pear-%{_pearname} Version: 1.0 Release: 3 License: PHP 2.02 Group: Development/Languages/PHP # Source0-md5: d468d8f9b2c7009ccc3af0fa158958f0 Source0: http://pear.php.net/get/%{_pearname}-%{version}.tgz URL: http://pear.php.net/package/%{_pearname}/ BuildRequires: rpm-php-pearprov >= 4.0.2-98 Requires: php-pear BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description Running functions from the commandline can be dangerous if the proper precautions are not taken to escape the shell arguments and reaping the exit status properly. This class give a formal interface to both, so that you can run a system command as comfortably as you would run a php function, which full pear error handling as results on failure. %description -l pl Używanie funkcji z poleceń systemowych może być niebezpieczne, jeśli nie wykonało się odpowiedniego przygotowania parametrów i sprawdzenia kodu wyjścia. Ta klasa daje formalny interfejs do obu rzeczy, co pozwala na wywoływanie poleceń systemowych w sposób tak wygodny, jak wywołanie funkcji php, która używa obsługi błędów PEAR-a w przypadku niepowodzenia. %prep %setup -q -c %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{php_pear_dir}/%{_class} install %{_pearname}-%{version}/*.php $RPM_BUILD_ROOT%{php_pear_dir}/%{_class} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %dir %{php_pear_dir}/%{_class} %{php_pear_dir}/%{_class}/*.php