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 modname zendopcache
5 Summary: Zend Optimizer+ - PHP code optimizer
6 Summary(pl.UTF-8): Zend Optimizer+ - optymalizator kodu PHP
7 Name: php-pecl-%{modname}
12 Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
13 # Source0-md5: 3a0a43a4819c72763bc35ecf5689221e
14 Source1: %{modname}.ini
15 URL: http://pecl.php.net/package/zendopcache
16 BuildRequires: php-devel >= 4:5.0.4
17 BuildRequires: rpmbuild(macros) >= 1.519
18 %{?requires_php_extension}
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 The Zend OPcache provides faster PHP execution through opcode caching
23 and optimization. It improves PHP performance by storing precompiled
24 script bytecode in the shared memory. This eliminates the stages of
25 reading code from the disk and compiling it on future access. In
26 addition, it applies a few bytecode optimization patterns that make
27 code execution faster.
31 mv %{modname}-%{version}/* .
39 rm -rf $RPM_BUILD_ROOT
41 EXTENSION_DIR=%{php_extensiondir} \
42 INSTALL_ROOT=$RPM_BUILD_ROOT
44 # NOTE: In case you are going to use Zend OPcache together with Xdebug,
45 # be sure that Xdebug is loaded after OPcache. "php -v" must show Xdebug
47 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
48 sed -e 's,@extensiondir@,%{php_extensiondir},' %{SOURCE1} > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
51 rm -rf $RPM_BUILD_ROOT
54 %php_webserver_restart
58 %php_webserver_restart
62 %defattr(644,root,root,755)
64 %attr(755,root,root) %{php_extensiondir}/opcache.so
65 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php/conf.d/%{modname}.ini