3 %bcond_without tests # build without tests
5 %define php_name php%{?php_suffix}
6 %define modname archive
8 Summary: %{modname} - manipulate tar/cpio archives
9 Summary(pl.UTF-8): %{modname} - obróbka archiwów tar/cpio
10 Name: %{php_name}-pecl-%{modname}
14 Group: Development/Languages/PHP
15 Source0: http://pecl.php.net/get/%{modname}-0.2.tgz
16 # Source0-md5: 1b121440b2c460b2a1af46e31f23e46e
18 URL: http://pecl.php.net/package/archive/
19 BuildRequires: %{php_name}-devel >= 3:5.0.4
20 BuildRequires: libarchive-devel
21 BuildRequires: rpmbuild(macros) >= 1.650
22 %{?with_tests:BuildRequires: %{php_name}-cli}
23 %{?requires_php_extension}
24 Provides: php(%{modname}) = %{version}
25 Obsoletes: php-pecl-archive < 0.2-17
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 archive extension allows to read and write tar and cpio archives using
32 In PECL status of this extension is: %{status}.
34 %description -l pl.UTF-8
35 Rozszerzenie archive pozwala na odczyt i zapis archiwów tar oraz cpio
36 przy użyciu biblioteki libarchive.
38 To rozszerzenie ma w PECL status: %{status}.
51 # simple module load test
53 -dextension_dir=modules \
54 -dextension=%{modname}.so \
56 grep %{modname} modules.log
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
62 install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
63 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
64 ; Enable %{modname} extension module
65 extension=%{modname}.so
69 rm -rf $RPM_BUILD_ROOT
72 %php_webserver_restart
76 %php_webserver_restart
80 %defattr(644,root,root,755)
81 %doc API.txt CREDITS tests
82 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
83 %attr(755,root,root) %{php_extensiondir}/%{modname}.so