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: d3bc9645dc1b084c1eb45cfc4d8e9ccc
12 Source1: %{modname}-apache.conf
13 Source2: %{modname}-lighttpd.conf
15 BuildRequires: php-devel >= 4:5.2.17-8
16 BuildRequires: rpmbuild(macros) >= 1.344
17 BuildRequires: sed >= 4.0
18 %{?requires_zend_extension}
19 Requires: php(core) >= 5.0.4
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 %define _webapps /etc/webapps
23 %define _webapp %{modname}
24 %define _sysconfdir %{_webapps}/%{_webapp}
25 %define _appdir %{_datadir}/%{_webapp}
28 XCache is a fast, stable PHP opcode cacher that has been tested and is
29 now running on production servers under high load.
31 %description -l pl.UTF-8
32 XCache to szybkie, stabilne buforowanie opcodów PHP, przetestowane i
33 działające na produkcyjnych serwerach o dużym obciążeniu.
36 Summary: WEB interface for xCache
38 Requires: %{name} = %{version}-%{release}
40 Requires: webserver(php) >= 5.0
43 Via this web interface script you can manage and view statistics of
46 More information you can find at %{url}.
49 %setup -q -n %{modname}-%{version}
52 s,@extensiondir@,%{php_extensiondir},
59 --enable-xcache-optimizer \
60 --enable-xcache-coverager
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{_sysconfdir}}
68 INSTALL_ROOT=$RPM_BUILD_ROOT
70 # The cache directory where pre-compiled files will reside
71 install -d $RPM_BUILD_ROOT/var/cache/php-%{modname}
72 install -d $RPM_BUILD_ROOT%{_appdir}
74 # Drop in the bit of configuration
75 cp -p xcache.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
76 cp -a admin/* $RPM_BUILD_ROOT%{_appdir}
78 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
79 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
80 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
83 rm -rf $RPM_BUILD_ROOT
86 %php_webserver_restart
90 %php_webserver_restart
93 %triggerin web -- apache1 < 1.3.37-3, apache1-base
94 %webapp_register apache %{_webapp}
96 %triggerun web -- apache1 < 1.3.37-3, apache1-base
97 %webapp_unregister apache %{_webapp}
99 %triggerin web -- apache < 2.2.0, apache-base
100 %webapp_register httpd %{_webapp}
102 %triggerun web -- apache < 2.2.0, apache-base
103 %webapp_unregister httpd %{_webapp}
105 %triggerin web -- lighttpd
106 %webapp_register lighttpd %{_webapp}
108 %triggerun web -- lighttpd
109 %webapp_unregister lighttpd %{_webapp}
112 %defattr(644,root,root,755)
113 %doc AUTHORS README THANKS
114 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
115 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
117 # XXX: what for this dir is used?
118 %dir %attr(775,root,http) /var/cache/php-xcache
121 %defattr(644,root,root,755)
122 %dir %attr(750,root,http) %{_sysconfdir}
123 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
124 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
125 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf