File php-xcache.spec of Package php5-xcache
1
%define default_extdir %{_libdir}/php/modules
2
%define default_apiver 20041225
3
%define default_version 5.2.6
4
5
%define module_version 3.0.3
6
7
%define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{default_extdir})
8
%{!?php_version:%define php_version %(php-config --version 2>/dev/null || echo %{default_version})}
9
10
11
Summary: PHP accelerator, optimizer, encoder and dynamic content cacher
12
Name: php-xcache
13
Version: %{php_version}_%{module_version}
14
Release: 1
15
License: GPL
16
Group: Development/Languages
17
BuildRoot: %{_tmppath}/%{name}-%{version}-root
18
Requires: php = %{php_version}
19
Provides: php-zend_extension
20
BuildRequires: php, php-devel, sed
21
BuildRequires: autoconf, automake, libtool
22
Source0: xcache-%{module_version}.tar.bz2
23
24
%description
25
XCache is a fast, stable PHP opcode cacher that has been tested and is now
26
running on production servers under high load. It is tested (on linux) and
27
supported on all of the latest PHP cvs branches such as PHP_4_3 PHP_4_4
28
PHP_5_1 PHP_5_2 PHP_5_3 PHP_5_4 HEAD(6.x). ThreadSafe/Windows is also supported.
29
30
%prep
31
%setup -n xcache-%{module_version}
32
33
%build
34
phpize
35
%configure --enable-xcache
36
37
make
38
39
%install
40
rm -rf $RPM_BUILD_$ROOT
41
42
make install INSTALL_ROOT=%{buildroot}
43
mkdir -p $RPM_BUILD_ROOT/var/cache/php-xcache
44
mkdir -p $RPM_BUILD_ROOT/var/www/html/xcache/
45
%{__install} -D -m 0644 $RPM_SOURCE_DIR/xcache.ini $RPM_BUILD_ROOT%{_sysconfdir}/php.d/xcache.ini
46
sed -i -e 's|/REPLACEME|%{php_extdir}|g' $RPM_BUILD_ROOT%{_sysconfdir}/php.d/xcache.ini
47
cp -R htdocs/* $RPM_BUILD_ROOT%{_var}/www/html/xcache/
48
49
50
%clean
51
rm -rf $RPM_BUILD_ROOT
52
53
54
%files
55
%defattr(-, root, root, 0755)
56
%doc xcache.ini THANKS README NEWS ChangeLog
57
%config(noreplace) %{_sysconfdir}/php.d/xcache.ini
58
%{php_extdir}/xcache.so
59
%{_var}/www/html/xcache/*
60
61
%changelog
62