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