%define php_name php%{?php_suffix} %define modname hash %define status stable Summary: %{modname} - HASH Message Digest Framework Summary(pl.UTF-8): %{modname} - implementacja popularnych funkcji skrótu Name: %{php_name}-pecl-%{modname} Version: 1.5 Release: 2 License: PHP 2.02 Group: Development/Languages/PHP Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz # Source0-md5: cb19f4ee392b05776788e54b51f98c83 URL: http://pecl.php.net/package/hash/ BuildRequires: %{php_name}-devel >= 3:5.0.0 BuildRequires: rpmbuild(macros) >= 1.650 %{?requires_php_extension} Requires: php(core) >= 5.0.4 Provides: php(%{modname}) = %{version} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description Native implementations of common message digest algorithms using a generic factory method. In PECL status of this extension is: %{status}. %description -l pl.UTF-8 Natywne implementacje popularnych algorytmów skrótu. To rozszerzenie ma w PECL status: %{status}. %prep %setup -qc mv %{modname}-%{version}/* . %build phpize %configure %{__make} %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d %{__make} install \ INSTALL_ROOT=$RPM_BUILD_ROOT \ EXTENSION_DIR=%{php_extensiondir} cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini ; Enable %{modname} extension module extension=%{modname}.so EOF %clean rm -rf $RPM_BUILD_ROOT %post %php_webserver_restart %postun if [ "$1" = 0 ]; then %php_webserver_restart fi %files %defattr(644,root,root,755) %doc README %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini %attr(755,root,root) %{php_extensiondir}/%{modname}.so