1 %define _modname mmcache
2 %define _pkgname turck-mmcache
3 %define _sysconfdir /etc/php4
4 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
6 Summary: Turck MMCache extension module for PHP
7 Summary(pl.UTF-8): Moduł Turck MMCache dla PHP
13 Source0: http://dl.sourceforge.net/%{_pkgname}/%{_pkgname}-%{version}.tar.gz
14 # Source0-md5: bcf671bec2e8b009e9b2d8f8d2574041
15 Patch0: %{name}-debian-8.patch
16 URL: http://turck-mmcache.sourceforge.net
17 BuildRequires: php4-devel >= 3:4.1
18 BuildRequires: rpmbuild(macros) >= 1.322
19 %{?requires_php_extension}
20 %{?requires_zend_extension}
21 Requires: %{_sysconfdir}/conf.d
23 Requires: webserver = apache
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 Turck MMCache is a PHP Accelerator & Encoder. It increases performance
28 of PHP scripts by caching them in compiled state, so that the overhead
29 of compiling is almost completely eliminated. Also it uses some
30 optimizations for speed up of scripts execution.
32 More information can be find at %{url}.
34 %description -l pl.UTF-8
35 Turck MMCache jest akceleratorem i koderem PHP. Zwiększa on
36 efektywność skryptów PHP poprzez buforowanie ich w postaci
37 skompilowanej, dzięki czemu powtórne kompilowanie jest praktycznie
38 wyeliminowane. Wykorzystywane jest także parę optymalizacji, aby
39 przyspieszyć wykonywanie skryptów.
41 Więcej informacji można znaleźć pod %{url}.
44 Summary: Standalone loader of Turck MMCache's cached files
45 Summary(pl.UTF-8): Osobny loader plików Turck MMCache
47 Requires: apache >= 1.3
48 %{?requires_php_extension}
49 %{?requires_zend_extension}
50 Provides: TurckLoader = %{epoch}:%{version}-%{release}
52 %description TurckLoader
53 TurckLoader is a standalone loader. You can use files encoded by
56 %description TurckLoader -l pl.UTF-8
57 TurckLoader jest osobnym loaderem. Można używać plików zakodowanych
58 poprzez Truck MMCache bez niego samego.
61 Summary: WEB interface for Turck MMCache
62 Summary(pl.UTF-8): Interfejs WEB dla Turck MMCache
64 Requires: %{name} = %{epoch}:%{version}-%{release}
66 %description webinterface
67 Turck MMCache can be managed through web interface script mmcache.php.
68 So you need to put this file on your web site. For security reasons it
69 is recommended to restrict the usage of this script by your local IP.
71 More information you can find at %{url}.
73 %description webinterface -l pl.UTF-8
74 Turck MMCache może być sterowany ze strony internetowej z
75 wykorzystaniem skryptu mmcache.php. Jedyne co trzeba zrobić, to
76 umieścić plik we właściwym miejscu na stronie internetowej. Z powodów
77 bezpieczeństwa zalecane jest, aby ograniczyć korzystanie ze skryptu do
80 Więcej informacji można znaleźć %{url}.
83 %setup -q -n %{_pkgname}-%{version}
89 --enable-mmcache=shared \
90 --with-php-config=%{_bindir}/php-config
97 --with-php-config=%{_bindir}/php-config
102 rm -rf $RPM_BUILD_ROOT
103 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir},%{_bindir},%{_mandir}/man1,%{_datadir}/%{name}}
105 install ./modules/mmcache.so $RPM_BUILD_ROOT%{extensionsdir}
107 install ./encoder.php $RPM_BUILD_ROOT%{_bindir}/turck-encode
108 echo '#!%{_bindir}/php4 -q' > $RPM_BUILD_ROOT%{_bindir}/turck-mmcache_password
109 cat ./mmcache_password.php >> $RPM_BUILD_ROOT%{_bindir}/turck-mmcache_password
111 install ./mmcache*.php $RPM_BUILD_ROOT%{_datadir}/%{name}
113 install ./TurckLoader/modules/TurckLoader.so $RPM_BUILD_ROOT%{extensionsdir}
114 install debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
116 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
117 ; Enable %{_modname} extension module
118 extension=%{_modname}.so
121 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/TurckLoader.ini
123 extension=TurckLoader.so
127 rm -rf $RPM_BUILD_ROOT
130 [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
131 [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
134 if [ "$1" = 0 ]; then
135 [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
136 [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
140 [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
141 [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
144 if [ "$1" = 0 ]; then
145 [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
146 [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
150 %defattr(644,root,root,755)
151 %doc CREDITS EXPERIMENTAL README TODO
152 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
153 %attr(755,root,root) %{extensionsdir}/mmcache.so
154 %attr(755,root,root) %{_bindir}/turck-encode
155 %attr(755,root,root) %{_bindir}/turck-mmcache_password
159 %defattr(644,root,root,755)
160 %doc CREDITS EXPERIMENTAL README.loader
161 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/TurckLoader.ini
162 %attr(755,root,root) %{extensionsdir}/TurckLoader.so
165 %defattr(644,root,root,755)