]>
Commit | Line | Data |
---|---|---|
976653d5 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
64b5a3de | 5 | %define php_name php%{?php_suffix} |
4f8b3975 | 6 | %define modname archive |
64b5a3de ER |
7 | %define status beta |
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} | |
cfbe30dd ER |
11 | Version: 0.3.1 |
12 | Release: 1 | |
39479244 | 13 | License: PHP 3.01 |
e3c503d7 | 14 | Group: Development/Languages/PHP |
cfbe30dd | 15 | Source0: http://pecl.php.net/get/%{modname}-0.2.tgz |
e3c503d7 | 16 | # Source0-md5: 1b121440b2c460b2a1af46e31f23e46e |
cfbe30dd | 17 | Patch100: branch.diff |
e3c503d7 | 18 | URL: http://pecl.php.net/package/archive/ |
4f8b3975 | 19 | BuildRequires: %{php_name}-devel >= 3:5.0.4 |
3e0bf3e4 | 20 | BuildRequires: libarchive-devel |
64b5a3de | 21 | BuildRequires: rpmbuild(macros) >= 1.650 |
976653d5 | 22 | %{?with_tests:BuildRequires: %{php_name}-cli} |
493dade8 | 23 | %{?requires_php_extension} |
ac70ff1c | 24 | Provides: php(%{modname}) = %{version} |
88371f97 | 25 | Obsoletes: php-pecl-archive < 0.2-17 |
e3c503d7 AG |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
e3c503d7 AG |
28 | %description |
29 | archive extension allows to read and write tar and cpio archives using | |
30 | libarchive. | |
31 | ||
64b5a3de | 32 | In PECL status of this extension is: %{status}. |
e3c503d7 | 33 | |
b95c4efd JR |
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. | |
e3c503d7 | 37 | |
64b5a3de | 38 | To rozszerzenie ma w PECL status: %{status}. |
e3c503d7 AG |
39 | |
40 | %prep | |
64b5a3de | 41 | %setup -qc |
cfbe30dd ER |
42 | mv %{modname}-*/* . |
43 | %patch100 -p1 | |
e3c503d7 AG |
44 | |
45 | %build | |
e3c503d7 AG |
46 | phpize |
47 | %configure | |
48 | %{__make} | |
49 | ||
976653d5 ER |
50 | %if %{with tests} |
51 | # simple module load test | |
52 | %{__php} -n \ | |
53 | -dextension_dir=modules \ | |
54 | -dextension=%{modname}.so \ | |
55 | -m > modules.log | |
56 | grep %{modname} modules.log | |
57 | %endif | |
58 | ||
e3c503d7 AG |
59 | %install |
60 | rm -rf $RPM_BUILD_ROOT | |
7ef0fd52 | 61 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} |
64b5a3de ER |
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 | |
d8a5b3c3 | 66 | EOF |
e3c503d7 AG |
67 | |
68 | %clean | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %post | |
7ef0fd52 | 72 | %php_webserver_restart |
e3c503d7 | 73 | |
d8a5b3c3 ER |
74 | %postun |
75 | if [ "$1" = 0 ]; then | |
7ef0fd52 | 76 | %php_webserver_restart |
e3c503d7 AG |
77 | fi |
78 | ||
79 | %files | |
80 | %defattr(644,root,root,755) | |
64b5a3de ER |
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 |