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