]>
Commit | Line | Data |
---|---|---|
e3c503d7 AG |
1 | %define _modname archive |
2 | %define _status beta | |
e3c503d7 | 3 | Summary: %{_modname} - manipulate tar/cpio archives |
d82b4266 | 4 | Summary(pl.UTF-8): %{_modname} - obróbka archiwów tar/cpio |
e3c503d7 AG |
5 | Name: php-pecl-%{_modname} |
6 | Version: 0.2 | |
bd13b4d8 | 7 | Release: 14 |
39479244 | 8 | License: PHP 3.01 |
e3c503d7 AG |
9 | Group: Development/Languages/PHP |
10 | Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz | |
11 | # Source0-md5: 1b121440b2c460b2a1af46e31f23e46e | |
777dd0cd | 12 | Patch0: %{name}-php52.patch |
e3c503d7 | 13 | URL: http://pecl.php.net/package/archive/ |
3e0bf3e4 | 14 | BuildRequires: libarchive-devel |
e3c503d7 | 15 | BuildRequires: php-devel >= 3:5.0.0 |
7ef0fd52 | 16 | BuildRequires: rpmbuild(macros) >= 1.344 |
493dade8 | 17 | %{?requires_php_extension} |
bd13b4d8 | 18 | Requires: php(core) >= 5.0.4 |
e3c503d7 AG |
19 | Obsoletes: php-pear-%{_modname} |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
21 | ||
e3c503d7 AG |
22 | %description |
23 | archive extension allows to read and write tar and cpio archives using | |
24 | libarchive. | |
25 | ||
26 | In PECL status of this extension is: %{_status}. | |
27 | ||
b95c4efd JR |
28 | %description -l pl.UTF-8 |
29 | Rozszerzenie archive pozwala na odczyt i zapis archiwów tar oraz cpio | |
30 | przy użyciu biblioteki libarchive. | |
e3c503d7 AG |
31 | |
32 | To rozszerzenie ma w PECL status: %{_status}. | |
33 | ||
34 | %prep | |
35 | %setup -q -c | |
777dd0cd AG |
36 | cd %{_modname}-%{version} |
37 | %patch0 -p0 | |
e3c503d7 AG |
38 | |
39 | %build | |
40 | cd %{_modname}-%{version} | |
41 | phpize | |
42 | %configure | |
43 | %{__make} | |
44 | ||
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
7ef0fd52 | 47 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} |
e3c503d7 | 48 | |
7ef0fd52 ER |
49 | install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{php_extensiondir} |
50 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini | |
d8a5b3c3 ER |
51 | ; Enable %{_modname} extension module |
52 | extension=%{_modname}.so | |
53 | EOF | |
e3c503d7 AG |
54 | |
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %post | |
7ef0fd52 | 59 | %php_webserver_restart |
e3c503d7 | 60 | |
d8a5b3c3 ER |
61 | %postun |
62 | if [ "$1" = 0 ]; then | |
7ef0fd52 | 63 | %php_webserver_restart |
e3c503d7 AG |
64 | fi |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
68 | %doc %{_modname}-%{version}/{API.txt,CREDITS,tests} | |
7ef0fd52 ER |
69 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini |
70 | %attr(755,root,root) %{php_extensiondir}/%{_modname}.so |