]> git.pld-linux.org Git - SPECS.git/blob - php4-mmcache.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / php4-mmcache.spec
1 %define         _modname                mmcache
2 %define         _pkgname        turck-mmcache
3 %define         _sysconfdir     /etc/php4
4 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
5
6 Summary:        Turck MMCache extension module for PHP
7 Summary(pl.UTF-8):      Moduł Turck MMCache dla PHP
8 Name:           php4-%{_modname}
9 Version:        2.4.6
10 Release:        9
11 License:        GPL
12 Group:          Libraries
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
22 Requires:       php(zlib)
23 Requires:       webserver = apache
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %description
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.
31
32 More information can be find at %{url}.
33
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.
40
41 Więcej informacji można znaleźć pod %{url}.
42
43 %package TurckLoader
44 Summary:        Standalone loader of Turck MMCache's cached files
45 Summary(pl.UTF-8):      Osobny loader plików Turck MMCache
46 Group:          Libraries
47 Requires:       apache >= 1.3
48 %{?requires_php_extension}
49 %{?requires_zend_extension}
50 Provides:       TurckLoader = %{epoch}:%{version}-%{release}
51
52 %description TurckLoader
53 TurckLoader is a standalone loader. You can use files encoded by
54 without it.
55
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.
59
60 %package webinterface
61 Summary:        WEB interface for Turck MMCache
62 Summary(pl.UTF-8):      Interfejs WEB dla Turck MMCache
63 Group:          Libraries
64 Requires:       %{name} = %{epoch}:%{version}-%{release}
65
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.
70
71 More information you can find at %{url}.
72
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
78 lokalnego adresu.
79
80 Więcej informacji można znaleźć %{url}.
81
82 %prep
83 %setup -q -n %{_pkgname}-%{version}
84 %patch0 -p1
85
86 %build
87 phpize
88 %configure \
89         --enable-mmcache=shared \
90         --with-php-config=%{_bindir}/php-config
91 %{__make}
92
93 cd TurckLoader
94 ./create_links
95 phpize
96 %configure \
97         --with-php-config=%{_bindir}/php-config
98 %{__make}
99 cd ..
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir},%{_bindir},%{_mandir}/man1,%{_datadir}/%{name}}
104
105 install ./modules/mmcache.so $RPM_BUILD_ROOT%{extensionsdir}
106
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
110
111 install ./mmcache*.php $RPM_BUILD_ROOT%{_datadir}/%{name}
112
113 install ./TurckLoader/modules/TurckLoader.so $RPM_BUILD_ROOT%{extensionsdir}
114 install debian/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
115
116 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
117 ; Enable %{_modname} extension module
118 extension=%{_modname}.so
119 EOF
120
121 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/TurckLoader.ini
122 ; Enable TurckLoader
123 extension=TurckLoader.so
124 EOF
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %post
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
132
133 %postun
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
137 fi
138
139 %post TurckLoader
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
142
143 %postun TurckLoader
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
147 fi
148
149 %files
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
156 %{_mandir}/man1/*
157
158 %files TurckLoader
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
163
164 %files webinterface
165 %defattr(644,root,root,755)
166 %{_datadir}/%{name}
This page took 0.06363 seconds and 3 git commands to generate.