]>
Commit | Line | Data |
---|---|---|
ddf28ae8 | 1 | # TODO |
674c666c ER |
2 | # - maybe related: |
3 | # - http://pecl.php.net/bugs/bug.php?id=7141 | |
4 | # - http://pecl.php.net/bugs/bug.php?id=7261 | |
5 | # - http://pecl.php.net/bugs/bug.php?id=7762 | |
7515e84d AG |
6 | %define _modname APC |
7 | %define _status stable | |
7515e84d | 8 | Summary: %{_modname} - Alternative PHP Cache |
70e83400 | 9 | Summary(pl.UTF-8): %{_modname} - alternatywne cache PHP |
7515e84d | 10 | Name: php-pecl-%{_modname} |
cdb94c68 AG |
11 | Version: 3.0.15 |
12 | Release: 1 | |
aecf8506 | 13 | License: PHP |
7515e84d AG |
14 | Group: Development/Languages/PHP |
15 | Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz | |
cdb94c68 | 16 | # Source0-md5: fa15eac040221728f3aaeaf9595de6e1 |
7515e84d | 17 | URL: http://pecl.php.net/package/APC/ |
e3079ee8 | 18 | BuildRequires: php-devel >= 3:5.0.0 |
11794077 | 19 | BuildRequires: rpmbuild(macros) >= 1.344 |
0838462f | 20 | %{?requires_php_extension} |
bacfe0ab | 21 | Requires: php-common >= 4:5.0.4 |
7515e84d AG |
22 | Obsoletes: php-pear-%{_modname} |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
7515e84d | 25 | %description |
97cb589b JB |
26 | APC is the Alternative PHP Cache. It was conceived of to provide a |
27 | free, open, and robust framework for caching and optimizing PHP | |
28 | intermediate code. | |
7515e84d | 29 | |
4a26397c | 30 | In PECL status of this package is: %{_status}. |
7515e84d | 31 | |
5c0d759f JR |
32 | %description -l pl.UTF-8 |
33 | APC to alternatywne cache PHP. W wyobrażeniach miało dostarczać | |
34 | wolnodostępny, otwarty i potężny szkielet do buforowania i | |
35 | optymalizowania kodu pośredniego PHP. | |
97cb589b | 36 | |
4a26397c | 37 | To rozszerzenie ma w PECL status: %{_status}. |
7515e84d AG |
38 | |
39 | %prep | |
40 | %setup -q -c | |
41 | ||
674c666c | 42 | cat <<'EOF' > %{_modname}.ini |
e3079ee8 ER |
43 | ; Enable %{_modname} extension module |
44 | extension=%{_modname}.so | |
c9568dd8 | 45 | apc.enabled=1 |
c9568dd8 | 46 | ;apc.optimization=0 |
1f637fad ER |
47 | ;apc.shm_segments=1 |
48 | ;apc.shm_size=32 | |
c9568dd8 PG |
49 | ;apc.cache_by_default=1 |
50 | ;apc.max_file_size=1M | |
1f637fad ER |
51 | ;apc.num_files_hint=1024 |
52 | ;apc.gc_ttl=3600 | |
53 | ;apc.ttl=0 | |
54 | ;apc.mmap_file_mask=/tmp/apc.XXXXXX | |
55 | ;apc.filters= | |
56 | ;apc.stat=1 | |
57 | ;apc.enable_cli=0 | |
e3079ee8 | 58 | EOF |
7515e84d | 59 | |
674c666c ER |
60 | |
61 | %build | |
62 | cd %{_modname}-%{version} | |
63 | phpize | |
64 | %configure \ | |
65 | --%{!?debug:dis}%{?debug:en}able-debug \ | |
66 | --enable-apc-mmap | |
67 | %{__make} | |
68 | ||
69 | %install | |
70 | rm -rf $RPM_BUILD_ROOT | |
11794077 | 71 | install -D %{_modname}-%{version}/modules/apc.so $RPM_BUILD_ROOT%{php_extensiondir}/%{_modname}.so |
674c666c ER |
72 | |
73 | # we install APC.ini for all handlers but CLI and CGI | |
11794077 ER |
74 | install -d $RPM_BUILD_ROOT%{php_sysconfdir}/{cgi-fcgi,conf,apache,apache2handler}.d |
75 | cp -a %{_modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/cgi-fcgi.d/%{_modname}.ini | |
11794077 ER |
76 | cp -a %{_modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/apache.d/%{_modname}.ini |
77 | cp -a %{_modname}.ini $RPM_BUILD_ROOT%{php_sysconfdir}/apache2handler.d/%{_modname}.ini | |
674c666c | 78 | |
7515e84d AG |
79 | %clean |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %post | |
11794077 | 83 | %php_webserver_restart |
7515e84d | 84 | |
e3079ee8 ER |
85 | %postun |
86 | if [ "$1" = 0 ]; then | |
11794077 | 87 | %php_webserver_restart |
7515e84d AG |
88 | fi |
89 | ||
90 | %files | |
91 | %defattr(644,root,root,755) | |
92 | %doc %{_modname}-%{version}/{CHANGELOG,INSTALL,NOTICE} | |
11794077 | 93 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/cgi-fcgi.d/%{_modname}.ini |
11794077 ER |
94 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/apache.d/%{_modname}.ini |
95 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/apache2handler.d/%{_modname}.ini | |
96 | %attr(755,root,root) %{php_extensiondir}/%{_modname}.so |