]> git.pld-linux.org Git - projects/template-specs.git/blob - php4-pecl.spec
- use confdir based php
[projects/template-specs.git] / php4-pecl.spec
1 %define         _modname        -
2 %define         _status         -
3 %define         _sysconfdir     /etc/php4
4
5 Summary:        %{_modname} -
6 Summary(pl):    %{_modname} -
7 Name:           php-pecl-%{_modname}
8 Version:        1.0
9 Release:        1
10 License:        PHP 2.02
11 Group:          Development/Languages/PHP
12 Source0:        http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 URL:            http://pecl.php.net/package/Modname/
14 BuildRequires:  libtool
15 BuildRequires:  php4-devel
16 Requires:       %{_sysconfdir}/conf.d
17 %requires_eq_to php4-common php4-devel
18 Obsoletes:      php-pear-%{_modname}
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
22
23 %description
24
25 In PECL status of this extension is: %{_status}.
26
27 %description -l pl
28
29 To rozszerzenie ma w PECL status: %{_status}.
30
31 %prep
32 %setup -q -c
33
34 %build
35 cd %{_modname}-%{version}
36 phpize
37 %configure
38 %{__make}
39
40 %install
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT%{extensionsdir}
43
44 install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
45 install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
46 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_name}.ini
47 ; Enable %{_modname} extension module
48 extension=%{_modname}.so
49 EOF
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
56 [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
57
58 %postun
59 if [ "$1" = 0 ]; then
60         [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
61         [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
62 fi
63
64 %files
65 %defattr(644,root,root,755)
66 %doc %{_modname}-%{version}/{CREDITS,EXPERIMENTAL}
67 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/%{_modname}.ini
68 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.059708 seconds and 4 git commands to generate.