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