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}
12 Group: Development/Languages/PHP
13 Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
14 # Source0-md5: a175166ac32544051bd3277cc00a7b5d
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.519
19 %{?requires_php_extension}
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 The Zend OPcache provides faster PHP execution through opcode caching
24 and optimization. It improves PHP performance by storing precompiled
25 script bytecode in the shared memory. This eliminates the stages of
26 reading code from the disk and compiling it on future access. In
27 addition, it applies a few bytecode optimization patterns that make
28 code execution faster.
32 mv %{modname}-%{version}/* .
40 rm -rf $RPM_BUILD_ROOT
42 EXTENSION_DIR=%{php_extensiondir} \
43 INSTALL_ROOT=$RPM_BUILD_ROOT
45 # NOTE: In case you are going to use Zend OPcache together with Xdebug,
46 # be sure that Xdebug is loaded after OPcache. "php -v" must show Xdebug
48 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
49 sed -e 's,@extensiondir@,%{php_extensiondir},' %{SOURCE1} > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
52 rm -rf $RPM_BUILD_ROOT
55 %php_webserver_restart
59 %php_webserver_restart
63 %defattr(644,root,root,755)
65 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
66 %attr(755,root,root) %{php_extensiondir}/opcache.so