]> git.pld-linux.org Git - packages/php-pecl-archive.git/blob - php-pecl-archive.spec
- ./adapter -s
[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
6 Summary:        %{_modname} - manipulate tar/cpio archives
7 Summary(pl):    %{_modname} - obróbka archiwów tar/cpio
8 Name:           php-pecl-%{_modname}
9 Version:        0.2
10 Release:        3
11 License:        PHP 2.02
12 Group:          Development/Languages/PHP
13 Source0:        http://pecl.php.net/get/%{_modname}-%{version}.tgz
14 # Source0-md5:  1b121440b2c460b2a1af46e31f23e46e
15 URL:            http://pecl.php.net/package/archive/
16 BuildRequires:  libarchive-devel
17 BuildRequires:  php-devel >= 3:5.0.0
18 BuildRequires:  rpmbuild(macros) >= 1.230
19 %requires_eq_to php-common php-devel
20 Requires:       %{_sysconfdir}/conf.d
21 Obsoletes:      php-pear-%{_modname}
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 archive extension allows to read and write tar and cpio archives using
26 libarchive.
27
28 In PECL status of this extension is: %{_status}.
29
30 %description -l pl
31 Rozszerzenie archive pozwala na odczyt i zapis archiwów tar oraz cpio
32 przy u¿yciu biblioteki libarchive.
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}/{API.txt,CREDITS,tests}
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.09047 seconds and 4 git commands to generate.