1 %define _modname xcache
2 %define _sysconfdir /etc/php
3 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
4 Summary: %{_modname} - PHP opcode cacher
9 Group: Development/Languages/PHP
10 URL: http://trac.lighttpd.net/xcache/
11 Source0: http://210.51.190.228/pub/XCache/Releases/xcache-%{version}.tar.gz
12 # Source0-md5: a4e2ff36f16b096f24d3edd9b6ab411b
13 BuildRequires: php-devel >= 3:5.0
14 BuildRequires: rpmbuild(macros) >= 1.254
15 BuildRequires: sed >= 4.0
16 %{?requires_php_extension}
17 Requires: %{_sysconfdir}/conf.d
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 XCache is a fast, stable PHP opcode cacher that has been tested and is
22 now running on production servers under high load.
32 s,zend_extension =.*,zend_extension = %{extensiondir}/xcache.so,
33 s,zend_extension_ts = .*,zend_extension_ts = %{extensiondir}/xcache.so,
37 rm -rf $RPM_BUILD_ROOT
38 install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
41 INSTALL_ROOT=$RPM_BUILD_ROOT
43 install xcache.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
46 rm -rf $RPM_BUILD_ROOT
49 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
50 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
54 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
55 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
59 %defattr(644,root,root,755)
60 %doc AUTHORS README THANKS
61 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
62 %attr(755,root,root) %{extensionsdir}/%{_modname}.so