]>
Commit | Line | Data |
---|---|---|
82f5b15c | 1 | %define _modname xcache |
82f5b15c | 2 | Summary: %{_modname} - PHP opcode cacher |
fd6082ef | 3 | Summary(pl.UTF-8): %{_modname} - buforowanie opcodów PHP |
82f5b15c | 4 | Name: php-%{_modname} |
1db758bf | 5 | Version: 1.2.1 |
cc268ab1 | 6 | Release: 1 |
82f5b15c ER |
7 | License: BSD |
8 | Group: Development/Languages/PHP | |
2405d2a6 | 9 | URL: http://xcache.lighttpd.net/ |
1db758bf ER |
10 | Source0: http://xcache.lighttpd.net/pub/Releases/1.2.1/xcache-%{version}.tar.bz2 |
11 | # Source0-md5: 42133468871c573c397b8375dc8c19b6 | |
2405d2a6 | 12 | BuildRequires: php-devel >= 3:5.1 |
e9d7bfa1 | 13 | BuildRequires: rpmbuild(macros) >= 1.344 |
99ae26ca | 14 | BuildRequires: sed >= 4.0 |
22775bf0 | 15 | %{?requires_zend_extension} |
e9d7bfa1 | 16 | Requires: php-common >= 4:5.0.4 |
82f5b15c ER |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
18 | ||
19 | %description | |
99ae26ca ER |
20 | XCache is a fast, stable PHP opcode cacher that has been tested and is |
21 | now running on production servers under high load. | |
82f5b15c | 22 | |
b3c5667f JR |
23 | %description -l pl.UTF-8 |
24 | XCache to szybkie, stabilne buforowanie opcodów PHP, przetestowane i | |
25 | działające na produkcyjnych serwerach o dużym obciążeniu. | |
822de9e6 | 26 | |
82f5b15c | 27 | %prep |
1db758bf | 28 | %setup -q -n xcache-%{version} |
82f5b15c | 29 | %{__sed} -i -e ' |
e9d7bfa1 ER |
30 | s,zend_extension =.*,zend_extension = %{php_extensiondir}/xcache.so, |
31 | s,zend_extension_ts = .*,zend_extension_ts = %{php_extensiondir}/xcache.so, | |
82f5b15c ER |
32 | ' xcache.ini |
33 | ||
2405d2a6 ER |
34 | %build |
35 | phpize | |
36 | %configure \ | |
37 | --enable-xcache \ | |
38 | --enable-xcache-optimizer \ | |
39 | --enable-xcache-coverager | |
718c7b68 | 40 | %{__make} |
2405d2a6 | 41 | |
82f5b15c ER |
42 | %install |
43 | rm -rf $RPM_BUILD_ROOT | |
e9d7bfa1 | 44 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d |
82f5b15c ER |
45 | |
46 | %{__make} install \ | |
47 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
48 | ||
2405d2a6 ER |
49 | # The cache directory where pre-compiled files will reside |
50 | install -d $RPM_BUILD_ROOT/var/cache/php-xcache | |
51 | install -d $RPM_BUILD_ROOT%{_datadir}/xcache | |
52 | ||
53 | # Drop in the bit of configuration | |
e9d7bfa1 | 54 | install xcache.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini |
2405d2a6 | 55 | install -D admin/* $RPM_BUILD_ROOT%{_datadir}/xcache |
82f5b15c ER |
56 | |
57 | %clean | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %post | |
e9d7bfa1 | 61 | %php_webserver_restart |
82f5b15c ER |
62 | |
63 | %postun | |
64 | if [ "$1" = 0 ]; then | |
e9d7bfa1 | 65 | %php_webserver_restart |
82f5b15c ER |
66 | fi |
67 | ||
68 | %files | |
69 | %defattr(644,root,root,755) | |
70 | %doc AUTHORS README THANKS | |
e9d7bfa1 ER |
71 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini |
72 | %attr(755,root,root) %{php_extensiondir}/%{_modname}.so | |
2405d2a6 ER |
73 | %{_datadir}/xcache |
74 | %dir %attr(775,root,http) /var/cache/php-xcache |