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