]> git.pld-linux.org Git - packages/php.git/blob - php.spec
- Changed location where php looks for mysql socket to match mysql*rpm
[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:        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:        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 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 ChangeLog 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 echo "There were some conflicts with mod_magic module."
233 echo "If you ecounter problems with running .php files"
234 echo "try turn off it in httpd.conf before using php4."
235 if [ -f /var/lock/subsys/httpd ]; then
236         /etc/rc.d/init.d/httpd restart 1>&2
237 fi
238
239 %postun
240 perl -pi -e 's|^AddType application/x-httpd-php .php|#AddType application/x-httpd-php .php|'
241 if [ -f /var/lock/subsys/httpd ]; then
242       /etc/rc.d/init.d/httpd restart 1>&2
243 fi
244
245 %preun
246 if [ "$1" = "0" ]; then
247         %{_sbindir}/apxs -e -A -n php4 %{_pkglibdir}/libphp4.so 1>&2
248         if [ -f /var/lock/subsys/httpd ]; then
249                 /etc/rc.d/init.d/httpd restart 1>&2
250         fi
251 fi
252
253 #%post mysql
254 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
255 #       echo "activating 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 #%postun mysql
264 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
265 #       echo "deactivating module 'mysql.so' in /etc/httpd/php.ini" 1>&2
266 #       perl -pi -e 's|^extension=mysql.so|;extension=mysql.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 #%post pgsql
274 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
275 #       echo "activating 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 #%postun pgsql
284 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
285 #       echo "deactivating module 'pgsql.so' in /etc/httpd/php.ini" 1>&2
286 #       perl -pi -e 's|^extension=pgsql.so|;extension=pgsql.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 #%post gd
294 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
295 #       echo "activating 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 #%postun gd
304 #if [ -f %{_sysconfdir}/httpd/php.ini ]; then
305 #       echo "deactivating module 'gd.so' in /etc/httpd/php.ini" 1>&2
306 #       perl -pi -e 's|^extension=gd.so|;extension=gd.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 %post xml
314 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
315         echo "activating 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 %postun xml
324 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
325         echo "deactivating module 'xml.so' in /etc/httpd/php.ini" 1>&2
326         perl -pi -e 's|^extension=xml.so|;extension=xml.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 %post java
334 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
335         echo "activating 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 %postun java
344 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
345         echo "deactivating module 'libphp_java.so' in /etc/httpd/php.ini" 1>&2
346         perl -pi -e 's|^extension=libphp_java.so|;extension=libphp_java.so|g' \
347         %{_sysconfdir}/httpd/php.ini
348 fi
349 if [ -f /var/lock/subsys/httpd ]; then
350         /etc/rc.d/init.d/httpd restart 1>&2
351 fi
352
353 %clean
354 rm -rf $RPM_BUILD_ROOT
355
356 %files
357 %defattr(644,root,root,755)
358 %doc {CODING_STANDARDS,CREDITS,ChangeLog,FUNCTION_LIST.txt,Zend/ZEND_CHANGES}.gz
359 %doc {LICENSE,Zend/LICENSE,MAINTAINERS,MODULES_STATUS,NEWS,TODO*}.gz  
360
361 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/*
362 %dir %{_pkglibdir}/php
363
364 #%attr(755,root,root) %{_libdir}/apache/php/*.so
365
366 /home/httpd/html/icons/*
367
368 %attr(755,root,root) %{_pkglibdir}/libphp4.so
369
370 #%files mysql
371 #%defattr(644,root,root,755)
372 #%attr(755,root,root) %{_pkglibdir}/php/mysql.so
373 #
374 #%files pgsql
375 #%defattr(644,root,root,755)
376 #%attr(755,root,root) %{_pkglibdir}/php/pgsql.so
377 #
378 #%files gd
379 #%defattr(644,root,root,755)
380 #%attr(755,root,root) %{_pkglibdir}/php/gd.so
381
382 %files xml
383 %defattr(644,root,root,755)
384 %attr(755,root,root) %{_pkglibdir}/php/xml.so
385
386 %files java
387 %defattr(644,root,root,755)
388 %attr(755,root,root) %{_pkglibdir}/php/libphp_java.so
389
390 %files doc
391 /home/httpd/html/docs/php4-doc
This page took 0.114281 seconds and 3 git commands to generate.