]> git.pld-linux.org Git - packages/php-pecl-archive.git/blob - php-pecl-archive.spec
- rel 6 (rebuild with new php)
[packages/php-pecl-archive.git] / php-pecl-archive.spec
1 %define         _modname        archive
2 %define         _status         beta
3 %define         _sysconfdir     /etc/php
4 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
5 Summary:        %{_modname} - manipulate tar/cpio archives
6 Summary(pl):    %{_modname} - obróbka archiwów tar/cpio
7 Name:           php-pecl-%{_modname}
8 Version:        0.2
9 Release:        6
10 License:        PHP 2.02
11 Group:          Development/Languages/PHP
12 Source0:        http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5:  1b121440b2c460b2a1af46e31f23e46e
14 URL:            http://pecl.php.net/package/archive/
15 BuildRequires:  libarchive-devel
16 BuildRequires:  php-devel >= 3:5.0.0
17 BuildRequires:  rpmbuild(macros) >= 1.254
18 %{?requires_php_extension}
19 Requires:       %{_sysconfdir}/conf.d
20 Obsoletes:      php-pear-%{_modname}
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 archive extension allows to read and write tar and cpio archives using
25 libarchive.
26
27 In PECL status of this extension is: %{_status}.
28
29 %description -l pl
30 Rozszerzenie archive pozwala na odczyt i zapis archiwów tar oraz cpio
31 przy u¿yciu biblioteki libarchive.
32
33 To rozszerzenie ma w PECL status: %{_status}.
34
35 %prep
36 %setup -q -c
37
38 %build
39 cd %{_modname}-%{version}
40 phpize
41 %configure
42 %{__make}
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
47
48 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
49 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
50 ; Enable %{_modname} extension module
51 extension=%{_modname}.so
52 EOF
53
54 %clean
55 rm -rf $RPM_BUILD_ROOT
56
57 %post
58 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
59 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
60
61 %postun
62 if [ "$1" = 0 ]; then
63         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
64         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
65 fi
66
67 %files
68 %defattr(644,root,root,755)
69 %doc %{_modname}-%{version}/{API.txt,CREDITS,tests}
70 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
71 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.102867 seconds and 3 git commands to generate.