]> git.pld-linux.org Git - packages/php4-pecl-APC.git/blob - php4-pecl-APC.spec
- 3.0.10
[packages/php4-pecl-APC.git] / php4-pecl-APC.spec
1 %define         _modname        APC
2 %define         _status         stable
3 %define         _sysconfdir     /etc/php4
4 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
5 Summary:        %{_modname} - Alternative PHP Cache
6 Summary(pl):    %{_modname} - alternatywne cache PHP
7 Name:           php4-pecl-%{_modname}
8 Version:        3.0.10
9 Release:        1
10 License:        PHP
11 Group:          Development/Languages/PHP
12 Source0:        http://pecl.php.net/get/%{_modname}-%{version}.tgz
13 # Source0-md5:  8abab9ceb22e2af22a282bc1d8a4766a
14 URL:            http://pecl.php.net/package/APC/
15 BuildRequires:  php4-devel >= 3:4.3.0
16 BuildRequires:  rpmbuild(macros) >= 1.254
17 %{?requires_php_extension}
18 Requires:       %{_sysconfdir}/conf.d
19 Obsoletes:      php-pear-%{_modname}
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 APC is the Alternative PHP Cache. It was conceived of to provide a
24 free, open, and robust framework for caching and optimizing PHP
25 intermediate code.
26
27 In PECL status of this package is: %{_status}.
28
29 %description -l pl
30 APC to alternatywne cache PHP. W wyobra¿eniach mia³o dostarczaæ
31 wolnodostêpny, otwarty i potê¿ny szkielet do buforowania i
32 optymalizowania kodu po¶redniego PHP.
33
34 To rozszerzenie ma w PECL status: %{_status}.
35
36 %prep
37 %setup -q -c
38
39 %build
40 cd %{_modname}-%{version}
41 phpize
42 %configure
43 %{__make}
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
48
49 install %{_modname}-%{version}/modules/apc.so $RPM_BUILD_ROOT%{extensionsdir}/%{_modname}.so
50 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
51 ; Enable %{_modname} extension module
52 extension=%{_modname}.so
53 apc.enabled=1
54 ;apc.optimization=0
55 ;apc.shm_segments=1
56 ;apc.shm_size=32
57 ;apc.cache_by_default=1
58 ;apc.max_file_size=1M
59 ;apc.num_files_hint=1024
60 ;apc.gc_ttl=3600
61 ;apc.ttl=0
62 ;apc.mmap_file_mask=/tmp/apc.XXXXXX
63 ;apc.filters=
64 ;apc.stat=1
65 ;apc.enable_cli=0
66 EOF
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %post
72 [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
73 [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
74
75 %postun
76 if [ "$1" = 0 ]; then
77         [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
78         [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
79 fi
80
81 %files
82 %defattr(644,root,root,755)
83 %doc %{_modname}-%{version}/{CHANGELOG,INSTALL,NOTICE}
84 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
85 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.054529 seconds and 3 git commands to generate.