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 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 %define _webapps /etc/webapps
25 %define _webapp %{modname}
26 %define _sysconfdir %{_webapps}/%{_webapp}
27 %define _appdir %{_datadir}/%{_webapp}
30 XCache is a fast, stable PHP opcode cacher that has been tested and is
31 now running on production servers under high load.
33 %description -l pl.UTF-8
34 XCache to szybkie, stabilne buforowanie opcodów PHP, przetestowane i
35 działające na produkcyjnych serwerach o dużym obciążeniu.
38 Summary: WEB interface for xCache
40 Requires: %{name} = %{version}-%{release}
42 Requires: webserver(php) >= 5.0
45 Via this web interface script you can manage and view statistics of
48 More information you can find at %{url}.
51 %setup -q -n %{modname}-%{version}
54 s,@extensiondir@,%{php_extensiondir},
57 mv htdocs/config{.default,}.php
58 mv htdocs/config.example.php config.example.php
59 mv htdocs/cacher/config{.default,}.php
60 mv htdocs/cacher/config.example.php cacher.config.example.php
61 mv htdocs/coverager/config{.default,}.php
62 mv htdocs/coverager/config.example.php coverager.config.example.php
64 %{__rm} htdocs/common/lang/*.po
65 %{__rm} htdocs/coverager/lang/*.po
66 %{__rm} htdocs/cacher/lang/*.po
69 %{__rm} htdocs/diagnosis/lang/zh-tranditional.php
75 --enable-xcache-optimizer \
76 --enable-xcache-coverager
80 rm -rf $RPM_BUILD_ROOT
82 INSTALL_ROOT=$RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
85 cp -p xcache.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
87 # The cache directory where pre-compiled files will reside
88 install -d $RPM_BUILD_ROOT/var/cache/php-%{modname}
91 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
92 cp -a htdocs/* $RPM_BUILD_ROOT%{_appdir}
93 %{__rm} $RPM_BUILD_ROOT%{_appdir}/diagnosis/lang/*.po
95 mv $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}/config.php
96 mv $RPM_BUILD_ROOT{%{_appdir}/cacher/config.php,%{_sysconfdir}/cacher.config.php}
97 mv $RPM_BUILD_ROOT{%{_appdir}/coverager/config.php,%{_sysconfdir}/coverager.config.php}
98 ln -s %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_appdir}/config.php
99 ln -s %{_sysconfdir}/cacher.config.php $RPM_BUILD_ROOT%{_appdir}/cacher/config.php
100 ln -s %{_sysconfdir}/coverager.config.php $RPM_BUILD_ROOT%{_appdir}/coverager/config.php
101 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
102 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
103 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
106 rm -rf $RPM_BUILD_ROOT
109 %php_webserver_restart
112 if [ "$1" = 0 ]; then
113 %php_webserver_restart
116 %triggerin web -- apache1 < 1.3.37-3, apache1-base
117 %webapp_register apache %{_webapp}
119 %triggerun web -- apache1 < 1.3.37-3, apache1-base
120 %webapp_unregister apache %{_webapp}
122 %triggerin web -- apache < 2.2.0, apache-base
123 %webapp_register httpd %{_webapp}
125 %triggerun web -- apache < 2.2.0, apache-base
126 %webapp_unregister httpd %{_webapp}
128 %triggerin web -- lighttpd
129 %webapp_register lighttpd %{_webapp}
131 %triggerun web -- lighttpd
132 %webapp_unregister lighttpd %{_webapp}
135 %defattr(644,root,root,755)
136 %doc AUTHORS README THANKS
137 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
138 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
140 # XXX: what for this dir is used?
141 %dir %attr(775,root,http) /var/cache/php-xcache
144 %defattr(644,root,root,755)
145 %doc config*.example.php
146 %dir %attr(750,root,http) %{_sysconfdir}
147 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
148 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
149 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
150 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
151 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cacher.config.php
152 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/coverager.config.php
156 %dir %{_appdir}/common
157 %{_appdir}/common/*.css
158 %{_appdir}/common/*.php
159 %{_appdir}/common/*.png
160 %dir %{_appdir}/common/lang
161 %{_appdir}/common/lang/en.php
162 %lang(cn) %{_appdir}/common/lang/zh-simplified.php
163 %lang(cn) %{_appdir}/common/lang/zh-traditional.php
165 %dir %{_appdir}/cacher
166 %{_appdir}/cacher/*.css
167 %{_appdir}/cacher/*.js
168 %{_appdir}/cacher/*.php
169 %{_appdir}/cacher/sub
170 %dir %{_appdir}/cacher/lang
171 %{_appdir}/cacher/lang/en.php
172 %lang(zh_CN) %{_appdir}/cacher/lang/zh-simplified.php
173 %lang(zh_CN) %{_appdir}/cacher/lang/zh-traditional.php
175 %dir %{_appdir}/coverager
176 %{_appdir}/coverager/*.css
177 %{_appdir}/coverager/*.php
178 %dir %{_appdir}/coverager/lang
179 %{_appdir}/coverager/lang/en.php
180 %lang(zh_CN) %{_appdir}/coverager/lang/zh-simplified.php
181 %lang(zh_CN) %{_appdir}/coverager/lang/zh-traditional.php
183 %dir %{_appdir}/diagnosis
184 %{_appdir}/diagnosis/*.css
185 %{_appdir}/diagnosis/*.php
186 %dir %{_appdir}/diagnosis/lang
187 %{_appdir}/diagnosis/lang/en.php
188 %lang(zh_CN) %{_appdir}/diagnosis/lang/zh-simplified.php
189 %lang(zh_CN) %{_appdir}/diagnosis/lang/zh-traditional.php