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