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