]> git.pld-linux.org Git - packages/php-xcache.git/blob - php-xcache.spec
- adjust BR
[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 Name:           php-%{_modname}
6 Version:        1.0
7 Release:        0.2
8 License:        BSD
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)
19
20 %description
21 XCache is a fast, stable PHP opcode cacher that has been tested and is
22 now running on production servers under high load.
23
24 %prep
25 %setup -q -n xcache
26
27 %build
28 phpize
29 %configure
30 %{__make}
31 %{__sed} -i -e '
32         s,zend_extension =.*,zend_extension = %{extensiondir}/xcache.so,
33         s,zend_extension_ts = .*,zend_extension_ts = %{extensiondir}/xcache.so,
34 ' xcache.ini
35
36 %install
37 rm -rf $RPM_BUILD_ROOT
38 install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
39
40 %{__make} install \
41         INSTALL_ROOT=$RPM_BUILD_ROOT
42
43 install xcache.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
44
45 %clean
46 rm -rf $RPM_BUILD_ROOT
47
48 %post
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
51
52 %postun
53 if [ "$1" = 0 ]; then
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 fi
57
58 %files
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
This page took 0.077912 seconds and 4 git commands to generate.