]> git.pld-linux.org Git - packages/php-eaccelerator.git/blob - php-eaccelerator.spec
33442b8a53d2154b0815a60c805963d56f9512b6
[packages/php-eaccelerator.git] / php-eaccelerator.spec
1 %define         pkgname         eaccelerator
2 Summary:        eAccelerator module for PHP
3 Summary(pl.UTF-8):      Moduł eAccelerator dla PHP
4 Name:           php-%{pkgname}
5 Version:        0.9.6.1
6 Release:        29
7 License:        GPL
8 Group:          Libraries
9 Source0:        http://bart.eaccelerator.net/source/%{version}/%{pkgname}-%{version}.tar.bz2
10 # Source0-md5:  32ccd838e06ef5613c2610c1c65ed228
11 Source1:        %{pkgname}.ini
12 Source2:        apache.conf
13 URL:            http://www.eaccelerator.net/
14 BuildRequires:  php-devel >= 3:5.1.0
15 BuildRequires:  rpmbuild(macros) >= 1.344
16 %requires_eq    php-common
17 %{?requires_php_extension}
18 Requires:       php(core) >= 5.1.0
19 Requires:       php(session)
20 Requires:       php(zlib)
21 Conflicts:      php-mmcache
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _webapps        /etc/webapps
25 %define         _webapp         %{pkgname}
26 %define         _sysconfdir     %{_webapps}/%{_webapp}
27 %define         _appdir         %{_datadir}/%{_webapp}
28
29 %description
30 eAccelerator is a further development from mmcache PHP Accelerator &
31 Encoder. It increases performance of PHP scripts by caching them in
32 compiled state, so that the overhead of compiling is almost completely
33 eliminated.
34
35 %description -l pl.UTF-8
36 eAccelerator to dalsze stadium rozwoju akceleratora i kodera PHP
37 mmcache. Zwiększa wydajność skryptów PHP poprzez zapamiętywanie ich w
38 postaci skompilowanej, dzięki czemu narzut potrzebny na kompilację
39 jest prawie całkowicie wyeliminowany.
40
41 %package webinterface
42 Summary:        WEB interface for PHP Accelerator
43 Summary(pl.UTF-8):      Interfejs WWW dla PHP Acceleratora
44 Group:          Libraries
45 Requires:       %{name} = %{epoch}:%{version}-%{release}
46 Requires:       webapps
47 Requires:       webserver(php)
48
49 %description webinterface
50 PHP Accelerator can be managed through web interface script
51 control.php and dasm.php (which requires disassembler and tokenizer).
52 For security reasons it is recommended to restrict the usage of this
53 script by your local IP and setup password based access.
54
55 More information you can find at %{url}.
56
57 %description webinterface -l pl.UTF-8
58 PHP Accelerator może być sterowany ze strony internetowej z
59 wykorzystaniem skryptów control.php i dasm.php (który wymaga modułu
60 obsługującego disassembler i tokenizer). Z powodów bezpieczeństwa
61 zalecane jest, aby ograniczyć korzystanie ze skryptu do lokalnego
62 adresu i ustawić autoryzację hasłem.
63
64 Więcej informacji można znaleźć pod %{url}.
65
66 %prep
67 %setup -q -n %{pkgname}-%{version}
68
69 %build
70 phpize
71 %configure \
72         --enable-eaccelerator=shared \
73         --with-eaccelerator-userid=http \
74         --without-eaccelerator-use-inode \
75         --with-php-config=%{_bindir}/php-config \
76         %{?debug:--with-eaccelerator-debug}
77 %{__make}
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT{%{php_extensiondir},%{_bindir},%{php_sysconfdir}/conf.d,/var/cache/%{pkgname},%{_sysconfdir},%{_appdir},/etc/tmpwatch}
82
83 install -p modules/eaccelerator.so $RPM_BUILD_ROOT%{php_extensiondir}
84 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{pkgname}.ini
85
86 cp -a {PHP_Highlight,control,dasm}.php $RPM_BUILD_ROOT%{_appdir}
87 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
88 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
89
90 echo "/var/cache/%{pkgname} 720" > $RPM_BUILD_ROOT/etc/tmpwatch/%{name}.conf
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %triggerin webinterface -- apache1 < 1.3.37-3, apache1-base
96 %webapp_register apache %{_webapp}
97
98 %triggerun webinterface -- apache1 < 1.3.37-3, apache1-base
99 %webapp_unregister apache %{_webapp}
100
101 %triggerin webinterface -- apache < 2.2.0, apache-base
102 %webapp_register httpd %{_webapp}
103
104 %triggerun webinterface -- apache < 2.2.0, apache-base
105 %webapp_unregister httpd %{_webapp}
106
107 %post
108 %php_webserver_restart
109 %banner %{name} <<EOF
110 +-------------------------------------------------------+
111 |                 !!! Attention !!!                     |
112 |                                                       |
113 | For disk cache users (using eaccelerator.shm_only=0): |
114 |                                                       |
115 | Please remember to empty your eAccelerator disk cache |
116 | when upgrading, otherwise things will break!          |
117 +-------------------------------------------------------+
118 EOF
119
120 %postun
121 if [ "$1" = 0 ]; then
122         %php_webserver_restart
123 fi
124
125 %preun
126 if [ "$1" = 0 ]; then
127         # remove last pieces of cache
128         rm -rf /var/cache/%{pkgname}/*
129 fi
130
131 %files
132 %defattr(644,root,root,755)
133 %doc AUTHORS ChangeLog NEWS README bugreport.php doc/php
134 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{pkgname}.ini
135 %config(noreplace) %verify(not md5 mtime size) /etc/tmpwatch/%{name}.conf
136 %attr(755,root,root) %{php_extensiondir}/eaccelerator.so
137 %attr(770,root,http) /var/cache/%{pkgname}
138
139 %files webinterface
140 %defattr(644,root,root,755)
141 %dir %attr(750,root,http) %{_sysconfdir}
142 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
143 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
144 %dir %{_appdir}
145 %{_appdir}/PHP_Highlight.php
146 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/control.php
147 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_appdir}/dasm.php
This page took 0.169406 seconds and 2 git commands to generate.