1 %define php_name php%{?php_suffix}
3 Summary: APCu - APC User Cache
4 Name: %{php_name}-pecl-%{modname}
8 Group: Development/Languages/PHP
9 Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
10 # Source0-md5: a7696b1c351d9bd1592b7840701f5bf7
11 Source1: %{modname}.ini
15 URL: http://pecl.php.net/package/APCu/
16 BuildRequires: %{php_name}-devel >= 4:5.1.0
17 BuildRequires: rpmbuild(macros) >= 1.666
18 %{?requires_php_extension}
19 Requires: php(core) >= 5.1.0
20 Provides: php(apcu) = %{version}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _webapps /etc/webapps
24 %define _webapp %{modname}
25 %define _sysconfdir %{_webapps}/%{_webapp}
26 %define _appdir %{_datadir}/%{_webapp}
29 APCu is userland caching: APC stripped of opcode caching in
30 preparation for the deployment of Zend Optimizer+ as the primary
31 solution to opcode caching in future versions of PHP.
33 APCu only supports userland caching (and dumping) of variables,
34 providing an upgrade path for the future. When O+ takes over, many
35 will be tempted to use 3rd party solutions to userland caching,
36 possibly even distributed solutions; this would be a grave error. The
37 tried and tested APC codebase provides far superior support for local
38 storage of PHP variables.
40 %package -n apcu-panel
41 Summary: APCu control panel
42 Group: Applications/Networking
43 Requires: %{name} = %{version}-%{release}
46 Requires: webserver(access)
47 Requires: webserver(php) >= 5.0
48 %if "%{_rpmversion}" >= "5"
52 %description -n apcu-panel
53 This package provides the APCu control panel, with Webserver
54 configuration, available on <http://localhost/apcu-panel/>
58 mv %{modname}-%{version}/* .
65 --%{!?debug:dis}%{?debug:en}able-apcu-debug \
66 --enable-apcu-spinlocks \
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{php_extensiondir},%{php_sysconfdir}/conf.d}
73 install -p modules/apcu.so $RPM_BUILD_ROOT%{php_extensiondir}/%{modname}.so
74 cp -p %{modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
76 # Install the Control Panel
77 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
78 cp -p apc.php $RPM_BUILD_ROOT%{_appdir}/index.php
79 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
80 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
81 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/config.php
84 rm -rf $RPM_BUILD_ROOT
87 %php_webserver_restart
91 %php_webserver_restart
94 %triggerin -n apcu-panel -- apache1 < 1.3.37-3, apache1-base
95 %webapp_register apache %{_webapp}
97 %triggerun -n apcu-panel -- apache1 < 1.3.37-3, apache1-base
98 %webapp_unregister apache %{_webapp}
100 %triggerin -n apcu-panel -- apache < 2.2.0, apache-base
101 %webapp_register httpd %{_webapp}
103 %triggerun -n apcu-panel -- apache < 2.2.0, apache-base
104 %webapp_unregister httpd %{_webapp}
107 %defattr(644,root,root,755)
108 %doc README.md NOTICE TECHNOTES.txt TODO INSTALL LICENSE
109 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
110 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
113 %defattr(644,root,root,755)
114 %dir %attr(750,root,http) %{_sysconfdir}
115 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
116 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
117 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php