]> git.pld-linux.org Git - packages/php-pecl-expect.git/blob - php-pecl-expect.spec
- BR rpmmacros for fixed %requires_php_extension
[packages/php-pecl-expect.git] / php-pecl-expect.spec
1 %define         _modname        expect
2 %define         _status         beta
3 %define         _sysconfdir     /etc/php
4 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
5 Summary:        %{_modname} - PHP extension for expect library
6 Summary(pl):    %{_modname} - rozszerzenie PHP dla biblioteki expect
7 Name:           php-pecl-%{_modname}
8 Version:        0.2.1
9 Release:        1
10 License:        PHP 2.02
11 Group:          Development/Languages/PHP
12 Source0:        http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5:  60ba045f711ce75378cb398169a0a0b5
14 URL:            http://pecl.php.net/package/expect/
15 BuildRequires:  expect-devel
16 BuildRequires:  php-devel >= 3:5.0.0
17 BuildRequires:  rpmbuild(macros) >= 1.322
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 This extension allows to interact with processes through PTY, using
25 expect library.
26
27 In PECL status of this extension is: %{_status}.
28
29 %description -l pl
30 To rozszerzenie pozwala na interakcjê z procesami poprzez PTY przy
31 u¿yciu biblioteki expect.
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 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
70 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.080396 seconds and 3 git commands to generate.