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