]> git.pld-linux.org Git - projects/template-specs.git/blob - php-pecl.spec
- BR macros for fpm restart
[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
37
38 %{__make} install \
39         INSTALL_ROOT=$RPM_BUILD_ROOT \
40         EXTENSION_DIR=%{php_extensiondir}
41 cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
42 ; Enable %{modname} extension module
43 extension=%{modname}.so
44 EOF
45
46 %clean
47 rm -rf $RPM_BUILD_ROOT
48
49 %post
50 %php_webserver_restart
51
52 %postun
53 if [ "$1" = 0 ]; then
54         %php_webserver_restart
55 fi
56
57 %files
58 %defattr(644,root,root,755)
59 %doc CREDITS EXPERIMENTAL
60 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
61 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.241782 seconds and 4 git commands to generate.