]> git.pld-linux.org Git - packages/php.git/blob - php.spec
- removed warning about incopatibilities with mod_magic --
[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    --enable-versioning \
184         --with-gd \
185         --with-dbase \
186         --with-filepro \
187         --with-ftp \
188         --with-hyperwave \
189         --with-pdflib \
190         --with-java \
191         --with-pgsql=/usr
192
193 #       --with-snmp=shared  \
194
195 make
196
197 %install
198 rm -rf $RPM_BUILD_ROOT
199 install -d $RPM_BUILD_ROOT{%{_pkglibdir}/php,%{_sysconfdir}/httpd} \
200                 $RPM_BUILD_ROOT/home/httpd/html/{icons,docs,docs/php4-doc}
201
202 install .libs/*.so      $RPM_BUILD_ROOT%{_pkglibdir}
203 install modules/*.so    $RPM_BUILD_ROOT%{_pkglibdir}/php
204
205 install %{SOURCE2}              $RPM_BUILD_ROOT%{_sysconfdir}/httpd/php.ini
206 install %{SOURCE3} php4.gif     $RPM_BUILD_ROOT/home/httpd/html/icons
207
208 cd $RPM_BUILD_ROOT/home/httpd/html/docs/php4-doc
209 tar zxf %{SOURCE4}
210 ln -s manual.html index.html
211 cd -
212
213 strip --strip-unneeded  \
214         $RPM_BUILD_ROOT%{_pkglibdir}/*.so \
215         $RPM_BUILD_ROOT%{_pkglibdir}/php/*.so
216
217 install %{SOURCE1} .
218 gzip -9nf CODING_STANDARDS CREDITS ChangeLog FUNCTION_LIST.txt \
219       MAINTAINERS MODULES_STATUS NEWS TODO* LICENSE Zend/LICENSE \
220       Zend/ZEND_CHANGES
221
222 %post
223 %{_sbindir}/apxs -e -a -n php4 %{_pkglibdir}/libphp4.so 1>&2
224 perl -pi -e 's|^#AddType application/x-httpd-php .php|AddType application/x-httpd-php .php|'
225 if [ -f /var/lock/subsys/httpd ]; then
226         /etc/rc.d/init.d/httpd restart 1>&2
227 fi
228
229 %postun
230 perl -pi -e 's|^AddType application/x-httpd-php .php|#AddType application/x-httpd-php .php|'
231 if [ -f /var/lock/subsys/httpd ]; then
232       /etc/rc.d/init.d/httpd restart 1>&2
233 fi
234
235 %preun
236 if [ "$1" = "0" ]; then
237         %{_sbindir}/apxs -e -A -n php4 %{_pkglibdir}/libphp4.so 1>&2
238         if [ -f /var/lock/subsys/httpd ]; then
239                 /etc/rc.d/init.d/httpd restart 1>&2
240         fi
241 fi
242
243 #%post mysql
244 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
245 #       echo "activating module 'mysql.so' in /etc/httpd/php.ini" 1>&2
246 #       perl -pi -e 's|^;extension=mysql.so|extension=mysql.so|g' \
247 #       %{_sysconfdir}/httpd/php.ini
248 #fi
249 #if [ -f /var/lock/subsys/httpd ]; then
250 #       /etc/rc.d/init.d/httpd restart 1>&2
251 #fi
252 #
253 #%postun mysql
254 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
255 #       echo "deactivating module 'mysql.so' in /etc/httpd/php.ini" 1>&2
256 #       perl -pi -e 's|^extension=mysql.so|;extension=mysql.so|g' \
257 #       %{_sysconfdir}/httpd/php.ini
258 #fi
259 #if [ -f /var/lock/subsys/httpd ]; then
260 #       /etc/rc.d/init.d/httpd restart 1>&2
261 #fi
262 #
263 #%post pgsql
264 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
265 #       echo "activating module 'pgsql.so' in /etc/httpd/php.ini" 1>&2
266 #       perl -pi -e 's|^;extension=pgsql.so|extension=pgsql.so|g' \
267 #       %{_sysconfdir}/httpd/php.ini
268 #fi
269 #if [ -f /var/lock/subsys/httpd ]; then
270 #       /etc/rc.d/init.d/httpd restart 1>&2
271 #fi
272 #
273 #%postun pgsql
274 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
275 #       echo "deactivating module 'pgsql.so' in /etc/httpd/php.ini" 1>&2
276 #       perl -pi -e 's|^extension=pgsql.so|;extension=pgsql.so|g' \
277 #       %{_sysconfdir}/httpd/php.ini
278 #fi
279 #if [ -f /var/lock/subsys/httpd ]; then
280 #       /etc/rc.d/init.d/httpd restart 1>&2
281 #fi
282 #
283 #%post gd
284 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
285 #       echo "activating module 'gd.so' in /etc/httpd/php.ini" 1>&2
286 #       perl -pi -e 's|^;extension=gd.so|extension=gd.so|g' \
287 #       %{_sysconfdir}/httpd/php.ini
288 #fi
289 #if [ -f /var/lock/subsys/httpd ]; then
290 #       /etc/rc.d/init.d/httpd restart 1>&2
291 #fi
292 #
293 #%postun gd
294 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
295 #       echo "deactivating module 'gd.so' in /etc/httpd/php.ini" 1>&2
296 #       perl -pi -e 's|^extension=gd.so|;extension=gd.so|g' \
297 #       %{_sysconfdir}/httpd/php.ini
298 #fi
299 #if [ -f /var/lock/subsys/httpd ]; then
300 #       /etc/rc.d/init.d/httpd restart 1>&2
301 #fi
302
303 %post xml
304 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
305         echo "activating module 'xml.so' in /etc/httpd/php.ini" 1>&2
306         perl -pi -e 's|^;extension=xml.so|extension=xml.so|g' \
307         %{_sysconfdir}/httpd/php.ini
308 fi
309 if [ -f /var/lock/subsys/httpd ]; then
310         /etc/rc.d/init.d/httpd restart 1>&2
311 fi
312
313 %postun xml
314 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
315         echo "deactivating module 'xml.so' in /etc/httpd/php.ini" 1>&2
316         perl -pi -e 's|^extension=xml.so|;extension=xml.so|g' \
317         %{_sysconfdir}/httpd/php.ini
318 fi
319 if [ -f /var/lock/subsys/httpd ]; then
320         /etc/rc.d/init.d/httpd restart 1>&2
321 fi
322
323 %post java
324 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
325         echo "activating module 'libphp_java.so' in /etc/httpd/php.ini" 1>&2
326         perl -pi -e 's|^;extension=libphp_java.so|extension=libphp_java.so|g' \
327         %{_sysconfdir}/httpd/php.ini
328 fi
329 if [ -f /var/lock/subsys/httpd ]; then
330         /etc/rc.d/init.d/httpd restart 1>&2
331 fi
332
333 %postun java
334 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
335         echo "deactivating module 'libphp_java.so' in /etc/httpd/php.ini" 1>&2
336         perl -pi -e 's|^extension=libphp_java.so|;extension=libphp_java.so|g' \
337         %{_sysconfdir}/httpd/php.ini
338 fi
339 if [ -f /var/lock/subsys/httpd ]; then
340         /etc/rc.d/init.d/httpd restart 1>&2
341 fi
342
343 %clean
344 rm -rf $RPM_BUILD_ROOT
345
346 %files
347 %defattr(644,root,root,755)
348 %doc {CODING_STANDARDS,CREDITS,ChangeLog,FUNCTION_LIST.txt,Zend/ZEND_CHANGES}.gz
349 %doc {LICENSE,Zend/LICENSE,MAINTAINERS,MODULES_STATUS,NEWS,TODO*}.gz  
350
351 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/*
352 %dir %{_pkglibdir}/php
353
354 #%attr(755,root,root) %{_libdir}/apache/php/*.so
355
356 /home/httpd/html/icons/*
357
358 %attr(755,root,root) %{_pkglibdir}/libphp4.so
359
360 #%files mysql
361 #%defattr(644,root,root,755)
362 #%attr(755,root,root) %{_pkglibdir}/php/mysql.so
363 #
364 #%files pgsql
365 #%defattr(644,root,root,755)
366 #%attr(755,root,root) %{_pkglibdir}/php/pgsql.so
367 #
368 #%files gd
369 #%defattr(644,root,root,755)
370 #%attr(755,root,root) %{_pkglibdir}/php/gd.so
371
372 %files xml
373 %defattr(644,root,root,755)
374 %attr(755,root,root) %{_pkglibdir}/php/xml.so
375
376 %files java
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_pkglibdir}/php/libphp_java.so
379
380 %files doc
381 /home/httpd/html/docs/php4-doc
This page took 0.120968 seconds and 4 git commands to generate.