]> git.pld-linux.org Git - packages/php.git/blob - php.spec
- added --enable-versoning in %configure
[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 echo "There were some conflicts with mod_magic module."
226 echo "If you ecounter problems with running .php files"
227 echo "try turn off it in httpd.conf before using php4."
228 if [ -f /var/lock/subsys/httpd ]; then
229         /etc/rc.d/init.d/httpd restart 1>&2
230 fi
231
232 %postun
233 perl -pi -e 's|^AddType application/x-httpd-php .php|#AddType application/x-httpd-php .php|'
234 if [ -f /var/lock/subsys/httpd ]; then
235       /etc/rc.d/init.d/httpd restart 1>&2
236 fi
237
238 %preun
239 if [ "$1" = "0" ]; then
240         %{_sbindir}/apxs -e -A -n php4 %{_pkglibdir}/libphp4.so 1>&2
241         if [ -f /var/lock/subsys/httpd ]; then
242                 /etc/rc.d/init.d/httpd restart 1>&2
243         fi
244 fi
245
246 #%post mysql
247 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
248 #       echo "activating module 'mysql.so' in /etc/httpd/php.ini" 1>&2
249 #       perl -pi -e 's|^;extension=mysql.so|extension=mysql.so|g' \
250 #       %{_sysconfdir}/httpd/php.ini
251 #fi
252 #if [ -f /var/lock/subsys/httpd ]; then
253 #       /etc/rc.d/init.d/httpd restart 1>&2
254 #fi
255 #
256 #%postun mysql
257 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
258 #       echo "deactivating module 'mysql.so' in /etc/httpd/php.ini" 1>&2
259 #       perl -pi -e 's|^extension=mysql.so|;extension=mysql.so|g' \
260 #       %{_sysconfdir}/httpd/php.ini
261 #fi
262 #if [ -f /var/lock/subsys/httpd ]; then
263 #       /etc/rc.d/init.d/httpd restart 1>&2
264 #fi
265 #
266 #%post pgsql
267 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
268 #       echo "activating module 'pgsql.so' in /etc/httpd/php.ini" 1>&2
269 #       perl -pi -e 's|^;extension=pgsql.so|extension=pgsql.so|g' \
270 #       %{_sysconfdir}/httpd/php.ini
271 #fi
272 #if [ -f /var/lock/subsys/httpd ]; then
273 #       /etc/rc.d/init.d/httpd restart 1>&2
274 #fi
275 #
276 #%postun pgsql
277 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
278 #       echo "deactivating module 'pgsql.so' in /etc/httpd/php.ini" 1>&2
279 #       perl -pi -e 's|^extension=pgsql.so|;extension=pgsql.so|g' \
280 #       %{_sysconfdir}/httpd/php.ini
281 #fi
282 #if [ -f /var/lock/subsys/httpd ]; then
283 #       /etc/rc.d/init.d/httpd restart 1>&2
284 #fi
285 #
286 #%post gd
287 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
288 #       echo "activating module 'gd.so' in /etc/httpd/php.ini" 1>&2
289 #       perl -pi -e 's|^;extension=gd.so|extension=gd.so|g' \
290 #       %{_sysconfdir}/httpd/php.ini
291 #fi
292 #if [ -f /var/lock/subsys/httpd ]; then
293 #       /etc/rc.d/init.d/httpd restart 1>&2
294 #fi
295 #
296 #%postun gd
297 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
298 #       echo "deactivating module 'gd.so' in /etc/httpd/php.ini" 1>&2
299 #       perl -pi -e 's|^extension=gd.so|;extension=gd.so|g' \
300 #       %{_sysconfdir}/httpd/php.ini
301 #fi
302 #if [ -f /var/lock/subsys/httpd ]; then
303 #       /etc/rc.d/init.d/httpd restart 1>&2
304 #fi
305
306 %post xml
307 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
308         echo "activating module 'xml.so' in /etc/httpd/php.ini" 1>&2
309         perl -pi -e 's|^;extension=xml.so|extension=xml.so|g' \
310         %{_sysconfdir}/httpd/php.ini
311 fi
312 if [ -f /var/lock/subsys/httpd ]; then
313         /etc/rc.d/init.d/httpd restart 1>&2
314 fi
315
316 %postun xml
317 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
318         echo "deactivating module 'xml.so' in /etc/httpd/php.ini" 1>&2
319         perl -pi -e 's|^extension=xml.so|;extension=xml.so|g' \
320         %{_sysconfdir}/httpd/php.ini
321 fi
322 if [ -f /var/lock/subsys/httpd ]; then
323         /etc/rc.d/init.d/httpd restart 1>&2
324 fi
325
326 %post java
327 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
328         echo "activating module 'libphp_java.so' in /etc/httpd/php.ini" 1>&2
329         perl -pi -e 's|^;extension=libphp_java.so|extension=libphp_java.so|g' \
330         %{_sysconfdir}/httpd/php.ini
331 fi
332 if [ -f /var/lock/subsys/httpd ]; then
333         /etc/rc.d/init.d/httpd restart 1>&2
334 fi
335
336 %postun java
337 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
338         echo "deactivating module 'libphp_java.so' in /etc/httpd/php.ini" 1>&2
339         perl -pi -e 's|^extension=libphp_java.so|;extension=libphp_java.so|g' \
340         %{_sysconfdir}/httpd/php.ini
341 fi
342 if [ -f /var/lock/subsys/httpd ]; then
343         /etc/rc.d/init.d/httpd restart 1>&2
344 fi
345
346 %clean
347 rm -rf $RPM_BUILD_ROOT
348
349 %files
350 %defattr(644,root,root,755)
351 %doc {CODING_STANDARDS,CREDITS,ChangeLog,FUNCTION_LIST.txt,Zend/ZEND_CHANGES}.gz
352 %doc {LICENSE,Zend/LICENSE,MAINTAINERS,MODULES_STATUS,NEWS,TODO*}.gz  
353
354 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/*
355 %dir %{_pkglibdir}/php
356
357 #%attr(755,root,root) %{_libdir}/apache/php/*.so
358
359 /home/httpd/html/icons/*
360
361 %attr(755,root,root) %{_pkglibdir}/libphp4.so
362
363 #%files mysql
364 #%defattr(644,root,root,755)
365 #%attr(755,root,root) %{_pkglibdir}/php/mysql.so
366 #
367 #%files pgsql
368 #%defattr(644,root,root,755)
369 #%attr(755,root,root) %{_pkglibdir}/php/pgsql.so
370 #
371 #%files gd
372 #%defattr(644,root,root,755)
373 #%attr(755,root,root) %{_pkglibdir}/php/gd.so
374
375 %files xml
376 %defattr(644,root,root,755)
377 %attr(755,root,root) %{_pkglibdir}/php/xml.so
378
379 %files java
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_pkglibdir}/php/libphp_java.so
382
383 %files doc
384 /home/httpd/html/docs/php4-doc
This page took 0.057254 seconds and 4 git commands to generate.