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