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