]> git.pld-linux.org Git - packages/php.git/blob - php.spec
- changed all BuildRoot definitons
[packages/php.git] / php.spec
1 Summary:        The PHP HTML-embedded scripting language for use with Apache.
2 Summary(fr):    Le langage de script embarque-HTML PHP pour Apache.
3 Summary(pl):    Jêzyk skryptowy PHP -- u¿ywany wraz z serwerem Apache.
4 Name:           php
5 Version:        4.0b4pl1
6 Release:        1
7 Group:          Libraries
8 Group(fr):      Librairies
9 Group(pl):      Biblioteki
10 License:        GPL
11 Source0:        http://www.php.net/distributions/%{name}-%{version}.tar.gz
12 Source1:        FAQ.php
13 Source2:        php.ini
14 Source3:        zend.gif
15 Source4:        http://www.php.net/distributions/manual.tar.gz
16 Icon:           php4.gif
17 URL:            http://www.php.net/
18 BuildRequires:  apache(EAPI)-devel
19 BuildRequires:  zlib-devel
20 BuildRequires:  mysql-devel >= 3.22.30-2
21 BuildRequires:  kaffe-devel
22 BuildRequires:  libxml-devel >= 1.0.0
23 BuildRequires:  postgresql-devel
24 BuildRequires:  gd-devel
25 Requires:       apache(EAPI) >= 1.3.9
26 Prereq:         /usr/sbin/apxs
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _pkglibdir      %{_libdir}/apache
30
31 %description
32 PHP is an HTML-embedded scripting language.  PHP attempts to make it easy
33 for developers to write dynamically generated web pages.  PHP also offers
34 built-in database integration for several commercial and non-commercial
35 database management systems, so writing a database-enabled web page with
36 PHP is fairly simple.  The most common use of PHP coding is probably as a
37 replacement for CGI scripts.  The mod_php module enables the Apache web
38 server to understand and process the embedded PHP language in web pages.
39 This package contains PHP version %{version}.  If you use applications which
40 specifically rely on PHP/FI (PHP v2 and earlier), you should instead install
41 the PHP/FI module contained in the phpfi package.  If you're just starting
42 with PHP, you should install this package.  You'll also need to install
43 the Apache web server.
44
45 %description -l fr
46 PHP est un langage de script embarque dans le HTM. PHP essaye de rendre
47 simple aux developpeurs d'ecrire des pages web generees dynamiquement.
48 PHP incorpore egalement une integration avec plusieurs systemes de gestion
49 de bases de donnees commerciaux et non-connerciaux, qui rent facile
50 la creation de pages web liees avec des bases de donnees. L'utilisation la
51 plus commune de PHP est probablement en remplacement de scripts CGI. Le
52 module mod_php permet au serveur web apache de comprendre et de traiter le
53 langage PHP integre dans des pages web.
54 Ce package contient PHP version %{version}. Si vous utilisez des
55 applications qui utilisent specifiquement PHP/FI, vous devrez installer le
56 module PHP/FI inclus dans le package mod_php. Si vous debutez avec PHP, vous
57 devriez installer ce package. Vous aurez egalement besoin d'installer le
58 serveur web Apache.
59
60 %description -l pl
61 PHP jest jêzykiem skryptowym, którego polecenia umieszcza siê w plikach
62 HTML. Pakiet ten zawiera modu³ przeznaczony dla serwera HTTP (jak np.
63 Apache), który interpretuje te polecenia.  Umo¿liwia to tworzenie
64 dynamicznie stron WWW. Spora czê¶æ sk³adni PHP zapo¿yczona zosta³a
65 z jêzyków: C, Java i Perl.
66
67 %package mysql
68 Summary:        MySQL database module for PHP4
69 Summary(pl):    Modu³ bazy danych MySQL dla PHP4
70 Group:          Libraries
71 Group(fr):      Librairies
72 Group(pl):      Biblioteki
73 Requires:       %{name} = %{version}
74
75 %description mysql
76 This is a dynamic shared object (DSO) for Apache that will add MySQL
77 database support to PHP4.  If you need back-end support for MySQL,
78 you should install this package in addition to the main %{name} package.
79
80 %description mysql -l pl
81
82 %package pgsql
83 Summary:        PostgreSQL database module for PHP4
84 Summary(pl):    Modu³ bazy danych PostgreSQL dla PHP4
85 Group:          Libraries
86 Group(fr):      Librairies
87 Group(pl):      Biblioteki
88 Requires:       %{name} = %{version}
89
90 %description pgsql
91 This is a dynamic shared object (DSO) for Apache that will add PostgreSQL
92 database support to PHP4.  If you need back-end support for PostgreSQL,
93 you should install this package in addition to the main %{name} package.
94
95 %description pgsql -l pl
96
97 %package gd
98 Summary:        GD extension module for PHP4
99 Summary:        Modu³ GD dla PHP4
100 Group:          Libraries
101 Group(fr):      Librairies
102 Group(pl):      Biblioteki
103 Requires:       %{name} = %{version}
104
105 %description gd
106 This is a dynamic shared object (DSO) for Apache that will add GD
107 support to PHP4. You should install this package in addition to the main
108 %{name} package if you want to create and manipulate images with PHP.
109
110 %description gd -l pl
111
112 %package java
113 Summary:        Java extension module for PHP4
114 Summary(pl):    Modu³ Javy dla PHP4
115 Group:          Libraries
116 Group(fr):      Librairies
117 Group(pl):      Biblioteki
118 Requires:       %{name} = %{version}
119
120 %description java
121 This is a dynamic shared object (DSO) for Apache that will add JAVA
122 support to PHP4. This extension provides a simple and effective means
123 for creating and invoking methods on Java objects from PHP.
124
125 %description java -l pl
126
127 %package xml
128 Summary:        XML extension module for PHP4
129 Summary(pl):    Modu³ XML dla PHP4
130 Group:          Libraries
131 Group(fr):      Librairies
132 Group(pl):      Biblioteki
133 Requires:       %{name} = %{version}
134
135 %description xml
136 This is a dynamic shared object (DSO) for Apache that will add XML
137 support to PHP4. This extension lets you create XML parsers and then
138 define handlers for different XML events. If you want to be able to parse
139 XML documents you should install this package in addition to the main 
140 %{name} package.
141
142 %description xml -l pl
143
144 %package doc
145 Summary:     Online manual for PHP4
146 Summary(pl): Dokumentacja dla PHP4
147 Group:       Networking/Daemons
148
149 %description doc
150 Comprehensive documentation for PHP4, viewable through your web server, too!
151
152 %description doc -l pl
153 Dokumentacja dla pakietu PHP4.  Mo¿na j± równie¿ ogl±daæ poprzez serwer WWW.
154
155 %prep
156 %setup -q 
157
158 %build
159 LDFLAGS=""; export LDFLAGS
160 CFLAGS="$RPM_OPT_FLAGS -DEAPI"; export CFLAGS
161 ./buildconf
162 %configure \
163         --with-apxs=%{_sbindir}/apxs \
164         --with-config-file-path=%{_sysconfdir}/httpd \
165         --with-exec-dir=%{_bindir} \
166         --disable-debug \
167         --enable-magic-quotes \
168         --enable-shared \
169         --enable-track-vars \
170         --enable-safe-mode \
171         --enable-trans-sid \
172         --enable-sysvsem \
173         --enable-sysvshm \
174         --enable-xml=shared \
175         --with-zlib \
176         --with-regex=system \
177         --with-gettext \
178         --with-mysql=shared \
179         --with-gd=shared \
180         --with-dbase \
181         --with-filepro \
182         --with-ftp \
183         --with-hyperwave \
184         --with-java \
185         --with-pgsql=shared,/usr
186
187 #       --with-snmp=shared 
188
189 make
190
191 %install
192 rm -rf $RPM_BUILD_ROOT
193 install -d $RPM_BUILD_ROOT{%{_pkglibdir}/php,%{_sysconfdir}/httpd} \
194                 $RPM_BUILD_ROOT/home/httpd/html/{icons,docs,docs/php4-doc}
195
196 install .libs/*.so      $RPM_BUILD_ROOT%{_pkglibdir}
197 install modules/*.so    $RPM_BUILD_ROOT%{_pkglibdir}/php
198
199 install %{SOURCE2}              $RPM_BUILD_ROOT%{_sysconfdir}/httpd/php.ini
200 install %{SOURCE3} php4.gif     $RPM_BUILD_ROOT/home/httpd/html/icons
201
202 cd $RPM_BUILD_ROOT/home/httpd/html/docs/php4-doc
203 tar zxf %{SOURCE4}
204 ln -s manual.html index.html
205 cd -
206
207 strip --strip-unneeded  \
208         $RPM_BUILD_ROOT%{_pkglibdir}/*.so \
209         $RPM_BUILD_ROOT%{_pkglibdir}/php/*.so
210
211 install  %{SOURCE1}     .
212 gzip -9nf CODING_STANDARDS CREDITS FAQ* ChangeLog FUNCTION_LIST.txt \
213         MAINTAINERS MODULES_STATUS NEWS TODO*
214
215 %post
216 /usr/sbin/apxs -e -a -n php4 %{_pkglibdir}/libphp4.so 1>&2
217 if [ -f /var/lock/subsys/httpd ]; then
218         /etc/rc.d/init.d/httpd restart 1>&2
219 fi
220
221 %preun
222 if [ "$1" = "0" ]; then
223         /usr/sbin/apxs -e -A -n php4 %{_pkglibdir}/libphp4.so 1>&2
224         if [ -f /var/lock/subsys/httpd ]; then
225                 /etc/rc.d/init.d/httpd restart 1>&2
226         fi
227 fi
228
229 %post mysql
230 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
231         echo "activating module 'mysql.so' in /etc/httpd/php.ini" 1>&2
232         perl -pi -e 's|^;extension=mysql.so|extension=mysql.so|g' \
233         %{_sysconfdir}/httpd/php.ini
234 fi
235 if [ -f /var/lock/subsys/httpd ]; then
236         /etc/rc.d/init.d/httpd restart 1>&2
237 fi
238
239 %postun mysql
240 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
241         echo "deactivating module 'mysql.so' in /etc/httpd/php.ini" 1>&2
242         perl -pi -e 's|^extension=mysql.so|;extension=mysql.so|g' \
243         %{_sysconfdir}/httpd/php.ini
244 fi
245 if [ -f /var/lock/subsys/httpd ]; then
246         /etc/rc.d/init.d/httpd restart 1>&2
247 fi
248
249 %post pgsql
250 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
251         echo "activating module 'pgsql.so' in /etc/httpd/php.ini" 1>&2
252         perl -pi -e 's|^;extension=pgsql.so|extension=pgsql.so|g' \
253         %{_sysconfdir}/httpd/php.ini
254 fi
255 if [ -f /var/lock/subsys/httpd ]; then
256         /etc/rc.d/init.d/httpd restart 1>&2
257 fi
258
259 %postun pgsql
260 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
261         echo "deactivating module 'pgsql.so' in /etc/httpd/php.ini" 1>&2
262         perl -pi -e 's|^extension=pgsql.so|;extension=pgsql.so|g' \
263         %{_sysconfdir}/httpd/php.ini
264 fi
265 if [ -f /var/lock/subsys/httpd ]; then
266         /etc/rc.d/init.d/httpd restart 1>&2
267 fi
268
269 %post gd
270 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
271         echo "activating module 'gd.so' in /etc/httpd/php.ini" 1>&2
272         perl -pi -e 's|^;extension=gd.so|extension=gd.so|g' \
273         %{_sysconfdir}/httpd/php.ini
274 fi
275 if [ -f /var/lock/subsys/httpd ]; then
276         /etc/rc.d/init.d/httpd restart 1>&2
277 fi
278
279 %postun gd
280 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
281         echo "deactivating module 'gd.so' in /etc/httpd/php.ini" 1>&2
282         perl -pi -e 's|^extension=gd.so|;extension=gd.so|g' \
283         %{_sysconfdir}/httpd/php.ini
284 fi
285 if [ -f /var/lock/subsys/httpd ]; then
286         /etc/rc.d/init.d/httpd restart 1>&2
287 fi
288
289 %post xml
290 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
291         echo "activating module 'xml.so' in /etc/httpd/php.ini" 1>&2
292         perl -pi -e 's|^;extension=xml.so|extension=xml.so|g' \
293         %{_sysconfdir}/httpd/php.ini
294 fi
295 if [ -f /var/lock/subsys/httpd ]; then
296         /etc/rc.d/init.d/httpd restart 1>&2
297 fi
298
299 %postun xml
300 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
301         echo "deactivating module 'xml.so' in /etc/httpd/php.ini" 1>&2
302         perl -pi -e 's|^extension=xml.so|;extension=xml.so|g' \
303         %{_sysconfdir}/httpd/php.ini
304 fi
305 if [ -f /var/lock/subsys/httpd ]; then
306         /etc/rc.d/init.d/httpd restart 1>&2
307 fi
308
309 %post java
310 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
311         echo "activating module 'libphp_java.so' in /etc/httpd/php.ini" 1>&2
312         perl -pi -e 's|^;extension=libphp_java.so|extension=libphp_java.so|g' \
313         %{_sysconfdir}/httpd/php.ini
314 fi
315 if [ -f /var/lock/subsys/httpd ]; then
316         /etc/rc.d/init.d/httpd restart 1>&2
317 fi
318
319 %postun java
320 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
321         echo "deactivating module 'libphp_java.so' in /etc/httpd/php.ini" 1>&2
322         perl -pi -e 's|^extension=libphp_java.so|;extension=libphp_java.so|g' \
323         %{_sysconfdir}/httpd/php.ini
324 fi
325 if [ -f /var/lock/subsys/httpd ]; then
326         /etc/rc.d/init.d/httpd restart 1>&2
327 fi
328
329 %clean
330 rm -rf $RPM_BUILD_ROOT
331
332 %files
333 %defattr(644,root,root,755)
334 %doc {CODING_STANDARDS,CREDITS,FAQ*,ChangeLog,FUNCTION_LIST.txt}.gz
335 %doc {MAINTAINERS,MODULES_STATUS,NEWS,TODO*}.gz  
336
337 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/*
338 %dir %{_pkglibdir}/php
339
340 #%attr(755,root,root) %{_libdir}/apache/php/*.so
341
342 /home/httpd/html/icons/*
343
344 %attr(755,root,root) %{_pkglibdir}/libphp4.so
345
346 %files mysql
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_pkglibdir}/php/mysql.so
349
350 %files pgsql
351 %defattr(644,root,root,755)
352 %attr(755,root,root) %{_pkglibdir}/php/pgsql.so
353
354 %files gd
355 %defattr(644,root,root,755)
356 %attr(755,root,root) %{_pkglibdir}/php/gd.so
357
358 %files xml
359 %defattr(644,root,root,755)
360 %attr(755,root,root) %{_pkglibdir}/php/xml.so
361
362 %files java
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{_pkglibdir}/php/libphp_java.so
365
366 %files doc
367 /home/httpd/html/docs/php4-doc
This page took 0.063506 seconds and 3 git commands to generate.