]>
Commit | Line | Data |
---|---|---|
00a56a74 | 1 | %define _modname zip |
d26e0fea | 2 | %define _status stable |
00a56a74 AG |
3 | %define _sysconfdir /etc/php4 |
4 | %define extensionsdir %(php-config --extension-dir 2>/dev/null) | |
e30f29e0 | 5 | |
00a56a74 | 6 | Summary: %{_modname} - a zip management extension |
d26c5d0f | 7 | Summary(pl.UTF-8): %{_modname} - zarządzanie archiwami zip |
00a56a74 | 8 | Name: php4-pecl-%{_modname} |
d26e0fea | 9 | Version: 1.8.1 |
00a56a74 AG |
10 | Release: 1 |
11 | License: PHP 2.02 | |
12 | Group: Development/Languages/PHP | |
13 | Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz | |
d26e0fea | 14 | # Source0-md5: da546bac3acce6d13af3cbcd461c20b6 |
00a56a74 AG |
15 | URL: http://pecl.php.net/package/zip/ |
16 | BuildRequires: php4-devel >= 3:4.3.0 | |
f9f5d8ea | 17 | BuildRequires: rpmbuild(macros) >= 1.322 |
00a56a74 AG |
18 | BuildRequires: zziplib-devel |
19 | %{?requires_php_extension} | |
20 | Requires: %{_sysconfdir}/conf.d | |
21 | Obsoletes: php-pear-%{_modname} | |
22 | Obsoletes: php-zip | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
742394f2 | 26 | Zip is an extension to create, modify and read zip files. |
00a56a74 AG |
27 | |
28 | In PECL status of this package is: %{_status}. | |
29 | ||
d26c5d0f JR |
30 | %description -l pl.UTF-8 |
31 | Zip jest rozszerzeniem umożliwiającym tworzenie, modyfikację oraz | |
32 | odczyt archiwów zip. | |
00a56a74 AG |
33 | |
34 | To rozszerzenie ma w PECL status: %{_status}. | |
35 | ||
36 | %prep | |
37 | %setup -q -c | |
38 | ||
39 | %build | |
40 | cd %{_modname}-%{version} | |
41 | phpize | |
42 | %configure | |
43 | %{__make} | |
44 | ||
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}} | |
48 | ||
49 | install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir} | |
50 | cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini | |
51 | ; Enable %{_modname} extension module | |
52 | extension=%{_modname}.so | |
53 | EOF | |
54 | ||
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %post | |
59 | [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart | |
60 | [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart | |
61 | ||
62 | %postun | |
63 | if [ "$1" = 0 ]; then | |
64 | [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart | |
65 | [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart | |
66 | fi | |
67 | ||
68 | %files | |
69 | %defattr(644,root,root,755) | |
70 | %doc %{_modname}-%{version}/CREDITS | |
71 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini | |
72 | %attr(755,root,root) %{extensionsdir}/%{_modname}.so |