]> git.pld-linux.org Git - packages/php-xcache.git/blob - php-xcache.spec
- 1.2.0-rc1: php 5.2 support (not tested)
[packages/php-xcache.git] / php-xcache.spec
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
5 Summary(pl):    %{_modname} - buforowanie opcodów PHP
6 Name:           php-%{_modname}
7 Version:        1.2.0
8 Release:        0.1
9 License:        BSD
10 Group:          Development/Languages/PHP
11 URL:            http://trac.lighttpd.net/xcache/
12 Source0:        http://210.51.190.228/pub/XCache/rc/1.2.0-rc1/xcache-%{version}-rc1.tar.bz2
13 # Source0-md5:  a518400a879d8904771867b9f50a650d
14 BuildRequires:  php-devel >= 3:5.0
15 BuildRequires:  rpmbuild(macros) >= 1.254
16 BuildRequires:  sed >= 4.0
17 %{?requires_zend_extension}
18 Requires:       %{_sysconfdir}/conf.d
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 XCache is a fast, stable PHP opcode cacher that has been tested and is
23 now running on production servers under high load.
24
25 %description -l pl
26 XCache to szybkie, stabilne buforowanie opcodów PHP, przetestowane i
27 dzia³aj±ce na produkcyjnych serwerach o du¿ym obci±¿eniu.
28
29 %prep
30 %setup -q -n xcache
31
32 %build
33 phpize
34 %configure
35 %{__make}
36 %{__sed} -i -e '
37         s,zend_extension =.*,zend_extension = %{extensionsdir}/xcache.so,
38         s,zend_extension_ts = .*,zend_extension_ts = %{extensionsdir}/xcache.so,
39 ' xcache.ini
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
44
45 %{__make} install \
46         INSTALL_ROOT=$RPM_BUILD_ROOT
47
48 install xcache.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
49
50 %clean
51 rm -rf $RPM_BUILD_ROOT
52
53 %post
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
56
57 %postun
58 if [ "$1" = 0 ]; then
59         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
60         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
61 fi
62
63 %files
64 %defattr(644,root,root,755)
65 %doc AUTHORS README THANKS
66 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
67 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.174268 seconds and 4 git commands to generate.