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