]> git.pld-linux.org Git - packages/php-pecl-apcu.git/blame - php-pecl-apcu.spec
up to 4.0.7
[packages/php-pecl-apcu.git] / php-pecl-apcu.spec
CommitLineData
19cb3b46
ER
1#
2# Conditional build:
3%bcond_with web # make web package
4
5# don't build for php53
6%if 0%{?_pld_builder:1} && "%{?php_suffix}" != "55"
7%undefine with_web
8%endif
9
f4d04e1d 10%define php_name php%{?php_suffix}
0c8088ff 11%define modname apcu
0c8088ff 12Summary: APCu - APC User Cache
f4d04e1d 13Name: %{php_name}-pecl-%{modname}
736c0438
ER
14Version: 4.0.7
15Release: 1
0c8088ff
ER
16License: PHP 3.01
17Group: Development/Languages/PHP
18Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
736c0438 19# Source0-md5: 9feb03d3e5217242a39244964f098b52
0c8088ff 20Source1: %{modname}.ini
6faee651
ER
21Source2: apache.conf
22Source3: config.php
3428561a 23Patch0: config.patch
0c8088ff 24URL: http://pecl.php.net/package/APCu/
f4d04e1d
ER
25BuildRequires: %{php_name}-devel >= 4:5.1.0
26BuildRequires: rpmbuild(macros) >= 1.666
0c8088ff 27%{?requires_php_extension}
5d23fa5d 28Provides: php(apcu) = %{version}
3428561a 29Obsoletes: php-pecl-apcu < 4.0.4-2
0c8088ff
ER
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
6faee651
ER
32%define _webapps /etc/webapps
33%define _webapp %{modname}
34%define _sysconfdir %{_webapps}/%{_webapp}
35%define _appdir %{_datadir}/%{_webapp}
36
0c8088ff
ER
37%description
38APCu is userland caching: APC stripped of opcode caching in
39preparation for the deployment of Zend Optimizer+ as the primary
40solution to opcode caching in future versions of PHP.
41
42APCu only supports userland caching (and dumping) of variables,
43providing an upgrade path for the future. When O+ takes over, many
44will be tempted to use 3rd party solutions to userland caching,
45possibly even distributed solutions; this would be a grave error. The
46tried and tested APC codebase provides far superior support for local
47storage of PHP variables.
48
6faee651
ER
49%package -n apcu-panel
50Summary: APCu control panel
51Group: Applications/Networking
52Requires: %{name} = %{version}-%{release}
53Requires: php(gd)
54Requires: webapps
55Requires: webserver(access)
56Requires: webserver(php) >= 5.0
57%if "%{_rpmversion}" >= "5"
58BuildArch: noarch
59%endif
60
61%description -n apcu-panel
62This package provides the APCu control panel, with Webserver
63configuration, available on <http://localhost/apcu-panel/>
64
0c8088ff
ER
65%prep
66%setup -qc
67mv %{modname}-%{version}/* .
6faee651 68%patch0 -p1
0c8088ff
ER
69cp -p %{SOURCE1} .
70
71%build
72phpize
73%configure \
74 --%{!?debug:dis}%{?debug:en}able-apcu-debug \
b2a78e74 75 --enable-apcu-spinlocks \
0c8088ff
ER
76 --enable-apcu-mmap
77%{__make}
78
79%install
80rm -rf $RPM_BUILD_ROOT
81install -d $RPM_BUILD_ROOT{%{php_extensiondir},%{php_sysconfdir}/conf.d}
82install -p modules/apcu.so $RPM_BUILD_ROOT%{php_extensiondir}/%{modname}.so
83cp -p %{modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
84
6faee651 85# Install the Control Panel
19cb3b46 86%if %{with web}
6faee651
ER
87install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir}}
88cp -p apc.php $RPM_BUILD_ROOT%{_appdir}/index.php
89cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
90cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
91cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/config.php
19cb3b46 92%endif
6faee651 93
0c8088ff
ER
94%clean
95rm -rf $RPM_BUILD_ROOT
96
97%post
98%php_webserver_restart
99
100%postun
101if [ "$1" = 0 ]; then
102 %php_webserver_restart
103fi
104
6faee651
ER
105%triggerin -n apcu-panel -- apache1 < 1.3.37-3, apache1-base
106%webapp_register apache %{_webapp}
107
108%triggerun -n apcu-panel -- apache1 < 1.3.37-3, apache1-base
109%webapp_unregister apache %{_webapp}
110
111%triggerin -n apcu-panel -- apache < 2.2.0, apache-base
112%webapp_register httpd %{_webapp}
113
114%triggerun -n apcu-panel -- apache < 2.2.0, apache-base
115%webapp_unregister httpd %{_webapp}
116
0c8088ff
ER
117%files
118%defattr(644,root,root,755)
119%doc README.md NOTICE TECHNOTES.txt TODO INSTALL LICENSE
120%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
121%attr(755,root,root) %{php_extensiondir}/%{modname}.so
6faee651 122
19cb3b46 123%if %{with web}
6faee651
ER
124%files -n apcu-panel
125%defattr(644,root,root,755)
126%dir %attr(750,root,http) %{_sysconfdir}
127%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
128%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
129%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.php
130%{_appdir}
19cb3b46 131%endif
This page took 0.060256 seconds and 4 git commands to generate.