]> git.pld-linux.org Git - packages/php-xcache.git/blame - php-xcache.spec
do not load xcache extension twice
[packages/php-xcache.git] / php-xcache.spec
CommitLineData
e35cf769
ER
1%define modname xcache
2Summary: %{modname} - PHP opcode cacher
3Summary(pl.UTF-8): %{modname} - buforowanie opcodów PHP
4Name: php-%{modname}
b1a803df 5Version: 2.0.1
9d1b1092 6Release: 3
82f5b15c
ER
7License: BSD
8Group: Development/Languages/PHP
2405d2a6 9URL: http://xcache.lighttpd.net/
4d014367 10Source0: http://xcache.lighttpd.net/pub/Releases/%{version}/xcache-%{version}.tar.bz2
b1a803df 11# Source0-md5: d3bc9645dc1b084c1eb45cfc4d8e9ccc
e35cf769
ER
12Source1: %{modname}-apache.conf
13Source2: %{modname}-lighttpd.conf
9d1b1092
ER
14Patch0: ini.patch
15BuildRequires: php-devel >= 4:5.2.17-8
e9d7bfa1 16BuildRequires: rpmbuild(macros) >= 1.344
99ae26ca 17BuildRequires: sed >= 4.0
22775bf0 18%{?requires_zend_extension}
e9d7bfa1 19Requires: php-common >= 4:5.0.4
82f5b15c
ER
20BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
e89262a8 22%define _webapps /etc/webapps
e35cf769 23%define _webapp %{modname}
e89262a8
ER
24%define _sysconfdir %{_webapps}/%{_webapp}
25%define _appdir %{_datadir}/%{_webapp}
26
82f5b15c 27%description
99ae26ca
ER
28XCache is a fast, stable PHP opcode cacher that has been tested and is
29now running on production servers under high load.
82f5b15c 30
b3c5667f
JR
31%description -l pl.UTF-8
32XCache to szybkie, stabilne buforowanie opcodów PHP, przetestowane i
33działające na produkcyjnych serwerach o dużym obciążeniu.
822de9e6 34
e35cf769
ER
35%package web
36Summary: WEB interface for xCache
37Group: Libraries
eeb07124 38Requires: %{name} = %{version}-%{release}
e35cf769
ER
39Requires: webapps
40Requires: webserver(php) >= 5.0
41
42%description web
43Via this web interface script you can manage and view statistics of
44xCache.
45
46More information you can find at %{url}.
47
82f5b15c 48%prep
e35cf769 49%setup -q -n %{modname}-%{version}
9d1b1092
ER
50%patch0 -p1
51%{__sed} -i.bak -e '
52 s,@extensiondir@,%{php_extensiondir},
82f5b15c
ER
53' xcache.ini
54
2405d2a6
ER
55%build
56phpize
57%configure \
58 --enable-xcache \
59 --enable-xcache-optimizer \
60 --enable-xcache-coverager
718c7b68 61%{__make}
2405d2a6 62
82f5b15c
ER
63%install
64rm -rf $RPM_BUILD_ROOT
e89262a8 65install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{_sysconfdir}}
82f5b15c
ER
66
67%{__make} install \
68 INSTALL_ROOT=$RPM_BUILD_ROOT
69
2405d2a6 70# The cache directory where pre-compiled files will reside
e35cf769 71install -d $RPM_BUILD_ROOT/var/cache/php-%{modname}
e89262a8 72install -d $RPM_BUILD_ROOT%{_appdir}
2405d2a6
ER
73
74# Drop in the bit of configuration
eeb07124 75cp -p xcache.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
d62ebf8e 76cp -a admin/* $RPM_BUILD_ROOT%{_appdir}
e89262a8 77
eeb07124
ER
78cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
79cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
80cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
82f5b15c
ER
81
82%clean
83rm -rf $RPM_BUILD_ROOT
84
85%post
e9d7bfa1 86%php_webserver_restart
82f5b15c
ER
87
88%postun
89if [ "$1" = 0 ]; then
e9d7bfa1 90 %php_webserver_restart
82f5b15c
ER
91fi
92
e35cf769 93%triggerin web -- apache1 < 1.3.37-3, apache1-base
e89262a8
ER
94%webapp_register apache %{_webapp}
95
e35cf769 96%triggerun web -- apache1 < 1.3.37-3, apache1-base
e89262a8
ER
97%webapp_unregister apache %{_webapp}
98
e35cf769 99%triggerin web -- apache < 2.2.0, apache-base
e89262a8
ER
100%webapp_register httpd %{_webapp}
101
e35cf769 102%triggerun web -- apache < 2.2.0, apache-base
e89262a8
ER
103%webapp_unregister httpd %{_webapp}
104
e35cf769 105%triggerin web -- lighttpd
8eff491a
ER
106%webapp_register lighttpd %{_webapp}
107
e35cf769 108%triggerun web -- lighttpd
8eff491a
ER
109%webapp_unregister lighttpd %{_webapp}
110
82f5b15c
ER
111%files
112%defattr(644,root,root,755)
113%doc AUTHORS README THANKS
e35cf769
ER
114%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
115%attr(755,root,root) %{php_extensiondir}/%{modname}.so
116
117# XXX: what for this dir is used?
118%dir %attr(775,root,http) /var/cache/php-xcache
119
120%files web
121%defattr(644,root,root,755)
44fec13e 122%dir %attr(750,root,http) %{_sysconfdir}
e89262a8
ER
123%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
124%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
44fec13e 125%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
e89262a8 126%{_appdir}
This page took 0.178577 seconds and 4 git commands to generate.