3 %bcond_without tests # build without tests
5 %define php_name php%{?php_suffix}
8 Summary(pl.UTF-8): %{modname} -
9 Name: %{php_name}-pecl-%{modname}
13 Group: Development/Languages/PHP
14 Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
16 URL: http://pecl.php.net/package/modname/
17 BuildRequires: %{php_name}-devel
18 BuildRequires: rpmbuild(macros) >= 1.650
19 %{?requires_php_extension}
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %description -l pl.UTF-8
28 mv %{modname}-%{version}/* .
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
38 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
39 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}}
42 EXTENSION_DIR=%{php_extensiondir} \
43 INSTALL_ROOT=$RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
46 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
47 ; Enable %{modname} extension module
48 extension=%{modname}.so
51 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
54 rm -rf $RPM_BUILD_ROOT
57 %php_webserver_restart
61 %php_webserver_restart
65 %defattr(644,root,root,755)
66 %doc CREDITS EXPERIMENTAL
67 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
68 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
69 %{_examplesdir}/%{name}-%{version}