4 Summary: %{modname} - PHP opcode cacher
5 Summary(pl.UTF-8): %{modname} - buforowanie opcodów PHP
10 Group: Development/Languages/PHP
11 URL: http://xcache.lighttpd.net/
12 Source0: http://xcache.lighttpd.net/pub/Releases/%{version}/xcache-%{version}.tar.bz2
13 # Source0-md5: 63be7c8b14ffc01babe5378111f13228
14 Source1: %{modname}-apache.conf
15 Source2: %{modname}-lighttpd.conf
17 BuildRequires: php-devel >= 4:5.2.17-8
18 BuildRequires: rpmbuild(macros) >= 1.344
19 BuildRequires: sed >= 4.0
20 %{?requires_zend_extension}
21 Requires: php(core) >= 5.0.4
22 Requires(triggerpostun): sed >= 4.0
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _webapps /etc/webapps
26 %define _webapp %{modname}
27 %define _sysconfdir %{_webapps}/%{_webapp}
28 %define _appdir %{_datadir}/%{_webapp}
31 XCache is a fast, stable PHP opcode cacher that has been tested and is
32 now running on production servers under high load.
34 %description -l pl.UTF-8
35 XCache to szybkie, stabilne buforowanie opcodów PHP, przetestowane i
36 działające na produkcyjnych serwerach o dużym obciążeniu.
39 Summary: WEB interface for xCache
41 Requires: %{name} = %{version}-%{release}
43 Requires: webserver(php) >= 5.0
46 Via this web interface script you can manage and view statistics of
49 More information you can find at %{url}.
52 %setup -q -n %{modname}-%{version}
55 s,@extensiondir@,%{php_extensiondir},
58 mv htdocs/config{.default,}.php
59 mv htdocs/config.example.php config.example.php
60 mv htdocs/cacher/config{.default,}.php
61 mv htdocs/cacher/config.example.php cacher.config.example.php
62 mv htdocs/coverager/config{.default,}.php
63 mv htdocs/coverager/config.example.php coverager.config.example.php
65 %{__rm} htdocs/common/lang/*.po
66 %{__rm} htdocs/coverager/lang/*.po
67 %{__rm} htdocs/cacher/lang/*.po
70 %{__rm} htdocs/diagnosis/lang/zh-tranditional.php
76 --enable-xcache-optimizer \
77 --enable-xcache-coverager
81 rm -rf $RPM_BUILD_ROOT
83 INSTALL_ROOT=$RPM_BUILD_ROOT
85 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
86 cp -p xcache.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
88 # The cache directory where pre-compiled files will reside
89 install -d $RPM_BUILD_ROOT/var/cache/php-%{modname}
92 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
93 cp -a htdocs/* $RPM_BUILD_ROOT%{_appdir}
94 %{__rm} $RPM_BUILD_ROOT%{_appdir}/diagnosis/lang/*.po
96 mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/config.php
97 mv $RPM_BUILD_ROOT{%{_appdir}/cacher/config.php,%{_sysconfdir}/cacher.config.php}
98 mv $RPM_BUILD_ROOT{%{_appdir}/coverager/config.php,%{_sysconfdir}/coverager.config.php}
99 ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/config.php
100 ln -s %{_sysconfdir}/cacher.config.php $RPM_BUILD_ROOT%{_appdir}/cacher/config.php
101 ln -s %{_sysconfdir}/coverager.config.php $RPM_BUILD_ROOT%{_appdir}/coverager/config.php
102 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
103 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
104 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
107 rm -rf $RPM_BUILD_ROOT
110 %php_webserver_restart
113 if [ "$1" = 0 ]; then
114 %php_webserver_restart
117 %triggerpostun -- %{name} < 3.0.0-0.8
118 %{__sed} -i -e 's,zend_extension,extension,' %{php_sysconfdir}/conf.d/%{modname}.ini
120 %triggerin web -- apache1 < 1.3.37-3, apache1-base
121 %webapp_register apache %{_webapp}
123 %triggerun web -- apache1 < 1.3.37-3, apache1-base
124 %webapp_unregister apache %{_webapp}
126 %triggerin web -- apache < 2.2.0, apache-base
127 %webapp_register httpd %{_webapp}
129 %triggerun web -- apache < 2.2.0, apache-base
130 %webapp_unregister httpd %{_webapp}
132 %triggerin web -- lighttpd
133 %webapp_register lighttpd %{_webapp}
135 %triggerun web -- lighttpd
136 %webapp_unregister lighttpd %{_webapp}
139 %defattr(644,root,root,755)
140 %doc AUTHORS README THANKS
141 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
142 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
144 # XXX: what for this dir is used?
145 %dir %attr(775,root,http) /var/cache/php-xcache
148 %defattr(644,root,root,755)
149 %doc config*.example.php
150 %dir %attr(750,root,http) %{_sysconfdir}
151 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
152 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
153 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
154 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
155 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cacher.config.php
156 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/coverager.config.php
160 %dir %{_appdir}/common
161 %{_appdir}/common/*.css
162 %{_appdir}/common/*.php
163 %{_appdir}/common/*.png
164 %dir %{_appdir}/common/lang
165 %{_appdir}/common/lang/en.php
166 %lang(cn) %{_appdir}/common/lang/zh-simplified.php
167 %lang(cn) %{_appdir}/common/lang/zh-traditional.php
169 %dir %{_appdir}/cacher
170 %{_appdir}/cacher/*.css
171 %{_appdir}/cacher/*.js
172 %{_appdir}/cacher/*.php
173 %{_appdir}/cacher/sub
174 %dir %{_appdir}/cacher/lang
175 %{_appdir}/cacher/lang/en.php
176 %lang(zh_CN) %{_appdir}/cacher/lang/zh-simplified.php
177 %lang(zh_CN) %{_appdir}/cacher/lang/zh-traditional.php
179 %dir %{_appdir}/coverager
180 %{_appdir}/coverager/*.css
181 %{_appdir}/coverager/*.php
182 %dir %{_appdir}/coverager/lang
183 %{_appdir}/coverager/lang/en.php
184 %lang(zh_CN) %{_appdir}/coverager/lang/zh-simplified.php
185 %lang(zh_CN) %{_appdir}/coverager/lang/zh-traditional.php
187 %dir %{_appdir}/diagnosis
188 %{_appdir}/diagnosis/*.css
189 %{_appdir}/diagnosis/*.php
190 %dir %{_appdir}/diagnosis/lang
191 %{_appdir}/diagnosis/lang/en.php
192 %lang(zh_CN) %{_appdir}/diagnosis/lang/zh-simplified.php
193 %lang(zh_CN) %{_appdir}/diagnosis/lang/zh-traditional.php