]> git.pld-linux.org Git - packages/php-pecl-zip.git/blob - php-pecl-zip.spec
64a1b277a7c19d6099cc4f7227b437b81c45239f
[packages/php-pecl-zip.git] / php-pecl-zip.spec
1 %define         _modname        zip
2 %define         _status         alpha
3 %define         _sysconfdir     /etc/php
4 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
5
6 Summary:        %{_modname} - a zip management extension
7 Summary(pl):    %{_modname} - zarz±dzanie archiwami zip
8 Name:           php-pecl-%{_modname}
9 Version:        1.5.0
10 Release:        1
11 License:        PHP 2.02
12 Group:          Development/Languages/PHP
13 Source0:        http://pecl.php.net/get/%{_modname}-%{version}.tgz
14 # Source0-md5:  cea41efb3a3c5642d119081801bd0d1c
15 URL:            http://pecl.php.net/package/zip/
16 BuildRequires:  php-devel >= 3:5.0.0
17 BuildRequires:  rpmbuild(macros) >= 1.254
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
26 Zip is an extension to create, modify and read zip files.
27
28 In PECL status of this package is: %{_status}.
29
30 %description -l pl
31 Zip jest rozszerzeniem umo¿liwiaj±cym tworzenie, modyfikacjê oraz
32 odczyt archiwów zip.
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_php.conf ] || %service -q apache restart
60 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
61
62 %postun
63 if [ "$1" = 0 ]; then
64         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
65         [ ! -f /etc/httpd/httpd.conf/??_mod_php.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
This page took 0.133654 seconds and 2 git commands to generate.