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