]> git.pld-linux.org Git - packages/php-pecl-zendopcache.git/blob - php-pecl-zendopcache.spec
f6ccc9168e0862605bf4b1fd3a1631adc99b0629
[packages/php-pecl-zendopcache.git] / php-pecl-zendopcache.spec
1 # NOTE:
2 # This version of Zend OPcache is compatible with PHP 5.2.*, 5.3.*, 5.4.*
3 # and PHP-5.5 development branch. PHP 5.2 support may be removed in the future.
4 %define         php_name        php%{?php_suffix}
5 %define         modname zendopcache
6 Summary:        Zend Optimizer+ - PHP code optimizer
7 Summary(pl.UTF-8):      Zend Optimizer+ - optymalizator kodu PHP
8 Name:           %{php_name}-pecl-%{modname}
9 Version:        7.0.5
10 Release:        1
11 License:        PHP 3.01
12 Group:          Development/Languages/PHP
13 Source0:        http://pecl.php.net/get/%{modname}-%{version}.tgz
14 # Source0-md5:  0c2710c272e398bea89d41dee42ee633
15 Source1:        %{modname}.ini
16 URL:            http://pecl.php.net/package/zendopcache
17 BuildRequires:  %{php_name}-devel >= 4:5.2
18 BuildRequires:  rpmbuild(macros) >= 1.650
19 %{?requires_php_extension}
20 Provides:       php(%{modname}) = %{version}
21 Obsoletes:      php-pecl-zendopcache < 7.0.3-1
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 The Zend OPcache provides faster PHP execution through opcode caching
26 and optimization. It improves PHP performance by storing precompiled
27 script bytecode in the shared memory. This eliminates the stages of
28 reading code from the disk and compiling it on future access. In
29 addition, it applies a few bytecode optimization patterns that make
30 code execution faster.
31
32 %prep
33 %setup -qc
34 mv %{modname}-%{version}/* .
35
36 if [ %{php_major_version} -ge 5 -a %{php_minor_version} -ge 5 ]; then
37         echo >&2 "pointless to build, PHP >= 5.5 has php-opcache package"
38         exit 1
39 fi
40
41 %build
42 phpize
43 %configure
44 %{__make}
45
46 %install
47 rm -rf $RPM_BUILD_ROOT
48 %{__make} install \
49         EXTENSION_DIR=%{php_extensiondir} \
50         INSTALL_ROOT=$RPM_BUILD_ROOT
51
52 # NOTE: In case you are going to use Zend OPcache together with Xdebug,
53 # be sure that Xdebug is loaded after OPcache. "php -v" must show Xdebug
54 # after OPcache.
55 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
56 sed -e 's,@extensiondir@,%{php_extensiondir},' %{SOURCE1} > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %post
62 %php_webserver_restart
63
64 %postun
65 if [ "$1" = 0 ]; then
66         %php_webserver_restart
67 fi
68
69 %files
70 %defattr(644,root,root,755)
71 %doc README LICENSE
72 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
73 %attr(755,root,root) %{php_extensiondir}/opcache.so
This page took 0.044864 seconds and 2 git commands to generate.