]> git.pld-linux.org Git - projects/template-specs.git/blob - php-pecl.spec
php suffix support
[projects/template-specs.git] / php-pecl.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 %define         php_name        php%{?php_suffix}
6 %define         modname -
7 Summary:        %{modname} -
8 Summary(pl.UTF-8):      %{modname} -
9 Name:           %{php_name}-pecl-%{modname}
10 Version:        1.0
11 Release:        1
12 License:        PHP 3.01
13 Group:          Development/Languages/PHP
14 Source0:        http://pecl.php.net/get/%{modname}-%{version}.tgz
15 # Source0-md5:  -
16 URL:            http://pecl.php.net/package/modname/
17 BuildRequires:  %{php_name}-devel
18 BuildRequires:  rpmbuild(macros) >= 1.650
19 %{?requires_php_extension}
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23
24 %description -l pl.UTF-8
25
26 %prep
27 %setup -qc
28 mv %{modname}-%{version}/* .
29
30 %build
31 phpize
32 %configure
33 %{__make}
34
35 %install
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
38 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
39 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir},%{_examplesdir}/%{name}-%{version}}
40
41 %{__make} install \
42         EXTENSION_DIR=%{php_extensiondir} \
43         INSTALL_ROOT=$RPM_BUILD_ROOT
44
45 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
46 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
47 ; Enable %{modname} extension module
48 extension=%{modname}.so
49 EOF
50
51 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %post
57 %php_webserver_restart
58
59 %postun
60 if [ "$1" = 0 ]; then
61         %php_webserver_restart
62 fi
63
64 %files
65 %defattr(644,root,root,755)
66 %doc CREDITS EXPERIMENTAL
67 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
68 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
69 %{_examplesdir}/%{name}-%{version}
This page took 0.289498 seconds and 4 git commands to generate.