2 Summary: %{modname} - PHP opcode cacher
3 Summary(pl.UTF-8): %{modname} - buforowanie opcodów PHP
8 Group: Development/Languages/PHP
9 URL: http://xcache.lighttpd.net/
10 Source0: http://xcache.lighttpd.net/pub/Releases/%{version}/xcache-%{version}.tar.bz2
11 # Source0-md5: 36f3af6f1ab1ff631c4dc73f5d541226
12 Source1: %{modname}-apache.conf
13 Source2: %{modname}-lighttpd.conf
14 BuildRequires: php-devel >= 3:5.1
15 BuildRequires: rpmbuild(macros) >= 1.344
16 BuildRequires: sed >= 4.0
17 %{?requires_zend_extension}
18 Requires: php-common >= 4:5.0.4
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _webapps /etc/webapps
22 %define _webapp %{modname}
23 %define _sysconfdir %{_webapps}/%{_webapp}
24 %define _appdir %{_datadir}/%{_webapp}
27 XCache is a fast, stable PHP opcode cacher that has been tested and is
28 now running on production servers under high load.
30 %description -l pl.UTF-8
31 XCache to szybkie, stabilne buforowanie opcodów PHP, przetestowane i
32 działające na produkcyjnych serwerach o dużym obciążeniu.
35 Summary: WEB interface for xCache
37 Requires: %{name} = %{epoch}:%{version}-%{release}
39 Requires: webserver(php) >= 5.0
42 Via this web interface script you can manage and view statistics of
45 More information you can find at %{url}.
48 %setup -q -n %{modname}-%{version}
50 s,zend_extension =.*,zend_extension = %{php_extensiondir}/xcache.so,
51 s,zend_extension_ts = .*,zend_extension_ts = %{php_extensiondir}/xcache.so,
58 --enable-xcache-optimizer \
59 --enable-xcache-coverager
63 rm -rf $RPM_BUILD_ROOT
64 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{_sysconfdir}}
67 INSTALL_ROOT=$RPM_BUILD_ROOT
69 # The cache directory where pre-compiled files will reside
70 install -d $RPM_BUILD_ROOT/var/cache/php-%{modname}
71 install -d $RPM_BUILD_ROOT%{_appdir}
73 # Drop in the bit of configuration
74 cp -a xcache.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
75 cp -a admin/* $RPM_BUILD_ROOT%{_appdir}
77 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
78 cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
79 cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
82 rm -rf $RPM_BUILD_ROOT
85 %php_webserver_restart
89 %php_webserver_restart
92 %triggerin web -- apache1 < 1.3.37-3, apache1-base
93 %webapp_register apache %{_webapp}
95 %triggerun web -- apache1 < 1.3.37-3, apache1-base
96 %webapp_unregister apache %{_webapp}
98 %triggerin web -- apache < 2.2.0, apache-base
99 %webapp_register httpd %{_webapp}
101 %triggerun web -- apache < 2.2.0, apache-base
102 %webapp_unregister httpd %{_webapp}
104 %triggerin web -- lighttpd
105 %webapp_register lighttpd %{_webapp}
107 %triggerun web -- lighttpd
108 %webapp_unregister lighttpd %{_webapp}
111 %defattr(644,root,root,755)
112 %doc AUTHORS README THANKS
113 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
114 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
116 # XXX: what for this dir is used?
117 %dir %attr(775,root,http) /var/cache/php-xcache
120 %defattr(644,root,root,755)
121 %dir %attr(750,root,http) %{_sysconfdir}
122 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
123 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
124 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf