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: 63be7c8b14ffc01babe5378111f13228
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},
55 mv htdocs/{config.default.php,config.php}
61 --enable-xcache-optimizer \
62 --enable-xcache-coverager
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{_sysconfdir}}
70 INSTALL_ROOT=$RPM_BUILD_ROOT
72 # The cache directory where pre-compiled files will reside
73 install -d $RPM_BUILD_ROOT/var/cache/php-%{modname}
74 install -d $RPM_BUILD_ROOT%{_appdir}
76 # Drop in the bit of configuration
77 cp -p xcache.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
78 cp -a htdocs/* $RPM_BUILD_ROOT%{_appdir}
80 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
81 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
82 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
85 rm -rf $RPM_BUILD_ROOT
88 %php_webserver_restart
92 %php_webserver_restart
95 %triggerin web -- apache1 < 1.3.37-3, apache1-base
96 %webapp_register apache %{_webapp}
98 %triggerun web -- apache1 < 1.3.37-3, apache1-base
99 %webapp_unregister apache %{_webapp}
101 %triggerin web -- apache < 2.2.0, apache-base
102 %webapp_register httpd %{_webapp}
104 %triggerun web -- apache < 2.2.0, apache-base
105 %webapp_unregister httpd %{_webapp}
107 %triggerin web -- lighttpd
108 %webapp_register lighttpd %{_webapp}
110 %triggerun web -- lighttpd
111 %webapp_unregister lighttpd %{_webapp}
114 %defattr(644,root,root,755)
115 %doc AUTHORS README THANKS
116 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
117 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
119 # XXX: what for this dir is used?
120 %dir %attr(775,root,http) /var/cache/php-xcache
123 %defattr(644,root,root,755)
124 %dir %attr(750,root,http) %{_sysconfdir}
125 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
126 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
127 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf