]> git.pld-linux.org Git - packages/php-pecl-apcu.git/blob - php-pecl-apcu.spec
405ce8f42e78a32f8e12a29b5e063216d9818379
[packages/php-pecl-apcu.git] / php-pecl-apcu.spec
1 %define         php_name        php%{?php_suffix}
2 %define         modname apcu
3 Summary:        APCu - APC User Cache
4 Name:           %{php_name}-pecl-%{modname}
5 Version:        4.0.4
6 Release:        1
7 License:        PHP 3.01
8 Group:          Development/Languages/PHP
9 Source0:        http://pecl.php.net/get/%{modname}-%{version}.tgz
10 # Source0-md5:  a7696b1c351d9bd1592b7840701f5bf7
11 Source1:        %{modname}.ini
12 URL:            http://pecl.php.net/package/APCu/
13 BuildRequires:  %{php_name}-devel >= 4:5.1.0
14 BuildRequires:  rpmbuild(macros) >= 1.666
15 %{?requires_php_extension}
16 Requires:       php(core) >= 5.1.0
17 Provides:       php(apcu) = %{version}
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 APCu is userland caching: APC stripped of opcode caching in
22 preparation for the deployment of Zend Optimizer+ as the primary
23 solution to opcode caching in future versions of PHP.
24
25 APCu only supports userland caching (and dumping) of variables,
26 providing an upgrade path for the future. When O+ takes over, many
27 will be tempted to use 3rd party solutions to userland caching,
28 possibly even distributed solutions; this would be a grave error. The
29 tried and tested APC codebase provides far superior support for local
30 storage of PHP variables.
31
32 %prep
33 %setup -qc
34 mv %{modname}-%{version}/* .
35 cp -p %{SOURCE1} .
36
37 %build
38 phpize
39 %configure \
40         --%{!?debug:dis}%{?debug:en}able-apcu-debug \
41         --enable-apcu-spinlocks \
42         --enable-apcu-mmap
43 %{__make}
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{php_extensiondir},%{php_sysconfdir}/conf.d}
48 install -p modules/apcu.so $RPM_BUILD_ROOT%{php_extensiondir}/%{modname}.so
49 cp -p %{modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 %php_webserver_restart
56
57 %postun
58 if [ "$1" = 0 ]; then
59         %php_webserver_restart
60 fi
61
62 %files
63 %defattr(644,root,root,755)
64 %doc README.md NOTICE TECHNOTES.txt TODO INSTALL LICENSE
65 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
66 %attr(755,root,root) %{php_extensiondir}/%{modname}.so
This page took 0.05246 seconds and 2 git commands to generate.