]> git.pld-linux.org Git - packages/php.git/blob - php.spec
- added sared modules: java and xml
[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.0b4pl1
6 Release:        1
7 Group:          Libraries
8 Group(fr):      Librairies
9 Group(pl):      Biblioteki
10 License:        GPL
11 Source0:        http://www.php.net/distributions/%{name}-%{version}.tar.gz
12 Source1:        FAQ.php
13 Source2:        php.ini
14 Source3:        zend.gif
15 Icon:           php4.gif
16 URL:            http://www.php.net/
17 BuildRequires:  apache-devel
18 BuildRequires:  zlib-devel
19 BuildRequires:  mysql-devel >= 3.22.30-2
20 BuildRequires:  kaffe-devel
21 BuildRequires:  libxml-devel >= 1.0.0
22 BuildRequires:  gd-devel
23 Requires:       apache >= 1.3.9
24 Prereq:         /usr/sbin/apxs
25 BuildRoot:      /tmp/%{name}-%{version}-root
26
27 %define         _pkglibdir      %{_libdir}/apache
28
29 %description
30 PHP is an HTML-embedded scripting language.  PHP attempts to make it easy
31 for developers to write dynamically generated web pages.  PHP also offers
32 built-in database integration for several commercial and non-commercial
33 database management systems, so writing a database-enabled web page with
34 PHP is fairly simple.  The most common use of PHP coding is probably as a
35 replacement for CGI scripts.  The mod_php module enables the Apache web
36 server to understand and process the embedded PHP language in web pages.
37 This package contains PHP version %{version}.  If you use applications which
38 specifically rely on PHP/FI (PHP v2 and earlier), you should instead install
39 the PHP/FI module contained in the phpfi package.  If you're just starting
40 with PHP, you should install this package.  You'll also need to install
41 the Apache web server.
42
43 %description -l fr
44 PHP est un langage de script embarque dans le HTM. PHP essaye de rendre
45 simple aux developpeurs d'ecrire des pages web generees dynamiquement.
46 PHP incorpore egalement une integration avec plusieurs systemes de gestion
47 de bases de donnees commerciaux et non-connerciaux, qui rent facile
48 la creation de pages web liees avec des bases de donnees. L'utilisation la
49 plus commune de PHP est probablement en remplacement de scripts CGI. Le
50 module mod_php permet au serveur web apache de comprendre et de traiter le
51 langage PHP integre dans des pages web.
52 Ce package contient PHP version %{version}. Si vous utilisez des
53 applications qui utilisent specifiquement PHP/FI, vous devrez installer le
54 module PHP/FI inclus dans le package mod_php. Si vous debutez avec PHP, vous
55 devriez installer ce package. Vous aurez egalement besoin d'installer le
56 serveur web Apache.
57
58 %description -l pl
59 PHP jest jêzykiem skryptowym, którego polecenia umieszcza siê w plikach
60 HTML.  Pakiet ten zawiera modu³ przeznaczony dla serwera HTTP (jak np.
61 Apache), który interpretuje te polecenia.  Umo¿liwia to tworzenie
62 dynamicznie stron WWW.  Spora czê¶æ sk³adni PHP zapo¿yczona zosta³a
63 z jêzyków: C, Java i Perl.
64
65 %package mysql
66 Summary:        MySQL database module for PHP4
67 Summary(pl):    Modu³ bazy danych MySQL dla PHP4
68 Group:          Libraries
69 Group(fr):      Librairies
70 Group(pl):      Biblioteki
71 Requires:       %{name} = %{version}
72
73 %description mysql
74 This is a dynamic shared object (DSO) for Apache that will add MySQL
75 database support to PHP4.  If you need back-end support for MySQL,
76 you should install this package in addition to the main %{name} package.
77
78 %package gd
79 Summary:        GD extension module for PHP4
80 Summary:        Modu³ GD dla PHP4
81 Group:          Libraries
82 Group(fr):      Librairies
83 Group(pl):      Biblioteki
84 Requires:       %{name} = %{version}
85
86 %description gd
87 This is a dynamic shared object (DSO) for Apache that will add GD
88 support to PHP4.
89
90 %description gd -l pl
91
92 %package java
93 Summary:        Java extension module for PHP4
94 Summary(pl):    Modu³ Javy dla PHP4
95 Group:          Libraries
96 Group(fr):      Librairies
97 Group(pl):      Biblioteki
98 Requires:       %{name} = %{version}
99
100 %description java
101 %description java -l pl
102
103 %package xml
104 Summary:        XML extension module for PHP4
105 Summary(pl):    Modu³ XML dla PHP4
106 Group:          Libraries
107 Group(fr):      Librairies
108 Group(pl):      Biblioteki
109 Requires:       %{name} = %{version}
110
111 %description xml
112 %description xml -l pl
113
114 %prep
115 %setup -q 
116
117 %build
118 LDFLAGS=""; export LDFLAGS
119 ./buildconf
120 %configure \
121         --with-apxs=%{_sbindir}/apxs \
122         --with-config-file-path=%{_sysconfdir}/httpd \
123         --with-exec-dir=%{_bindir} \
124         --disable-debug \
125         --enable-magic-quotes \
126         --enable-shared \
127         --enable-track-vars \
128         --enable-safe-mode \
129         --enable-trans-sid \
130         --enable-sysvsem \
131         --enable-sysvshm \
132         --enable-xml=shared \
133         --with-zlib \
134         --with-regex=system \
135         --with-gettext \
136         --with-mysql=shared \
137         --with-gd=shared \
138         --with-dbase \
139         --with-filepro \
140         --with-ftp \
141         --with-hyperwave \
142         --with-java
143 #       --with-pgsql=shared 
144 #       --with-snmp=shared 
145
146 make
147
148
149 %install
150 rm -rf $RPM_BUILD_ROOT
151 install -d $RPM_BUILD_ROOT{%{_pkglibdir}/php,%{_sysconfdir}/httpd} \
152                 $RPM_BUILD_ROOT/home/httpd/html/icons
153
154
155 install .libs/*.so      $RPM_BUILD_ROOT%{_pkglibdir}
156 install modules/*.so    $RPM_BUILD_ROOT%{_pkglibdir}/php
157
158 install %{SOURCE2}              $RPM_BUILD_ROOT%{_sysconfdir}/httpd/php.ini
159 install %{SOURCE3} php4.gif     $RPM_BUILD_ROOT/home/httpd/html/icons
160
161 strip --strip-unneeded  \
162         $RPM_BUILD_ROOT%{_pkglibdir}/*.so \
163         $RPM_BUILD_ROOT%{_pkglibdir}/php/*.so
164
165 install  %{SOURCE1}     .
166 gzip -9nf CODING_STANDARDS CREDITS FAQ* ChangeLog FUNCTION_LIST.txt \
167         MAINTAINERS MODULES_STATUS NEWS TODO*
168
169 %post
170 /usr/sbin/apxs -e -a -n php4 %{_pkglibdir}/libphp4.so 1>&2
171 if [ -f /var/lock/subsys/httpd ]; then
172         /etc/rc.d/init.d/httpd restart 1>&2
173 fi
174
175
176 %preun
177 if [ "$1" = "0" ]; then
178         /usr/sbin/apxs -e -A -n php4 %{_pkglibdir}/libphp4.so 1>&2
179         if [ -f /var/lock/subsys/httpd ]; then
180                 /etc/rc.d/init.d/httpd restart 1>&2
181         fi
182 fi
183
184 %post mysql
185 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
186         echo "activating module 'mysql.so' in /etc/httpd/php.ini" 1>&2
187         sed -e 's|^;extension=mysql.so|extension=mysql.so|g' \
188         %{_sysconfdir}/httpd/php.ini > %{_sysconfdir}/httpd/php.ini.new
189         mv %{_sysconfdir}/httpd/php.ini.new %{_sysconfdir}/httpd/php.ini
190 fi
191 if [ -f /var/lock/subsys/httpd ]; then
192         /etc/rc.d/init.d/httpd restart 1>&2
193 fi
194
195 %postun mysql
196 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
197         echo "deactivating module 'mysql.so' in /etc/httpd/php.ini" 1>&2
198         sed -e 's|^extension=mysql.so|;extension=mysql.so|g' \
199         %{_sysconfdir}/httpd/php.ini > %{_sysconfdir}/httpd/php.ini.new
200         mv %{_sysconfdir}/httpd/php.ini.new %{_sysconfdir}/httpd/php.ini
201 fi
202 if [ -f /var/lock/subsys/httpd ]; then
203         /etc/rc.d/init.d/httpd restart 1>&2
204 fi
205
206 %post gd
207 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
208         echo "activating module 'gd.so' in /etc/httpd/php.ini" 1>&2
209         sed -e 's|^;extension=gd.so|extension=gd.so|g' \
210         %{_sysconfdir}/httpd/php.ini > %{_sysconfdir}/httpd/php.ini.new
211         mv %{_sysconfdir}/httpd/php.ini.new %{_sysconfdir}/httpd/php.ini
212 fi
213 if [ -f /var/lock/subsys/httpd ]; then
214         /etc/rc.d/init.d/httpd restart 1>&2
215 fi
216
217 %postun gd
218 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
219         echo "deactivating module 'gd.so' in /etc/httpd/php.ini" 1>&2
220         sed -e 's|^extension=gd.so|;extension=gd.so|g' \
221         %{_sysconfdir}/httpd/php.ini > %{_sysconfdir}/httpd/php.ini.new
222         mv %{_sysconfdir}/httpd/php.ini.new %{_sysconfdir}/httpd/php.ini
223 fi
224 if [ -f /var/lock/subsys/httpd ]; then
225         /etc/rc.d/init.d/httpd restart 1>&2
226 fi
227
228 %post xml
229 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
230         echo "activating module 'xml.so' in /etc/httpd/php.ini" 1>&2
231         sed -e 's|^;extension=xml.so|extension=xml.so|g' \
232         %{_sysconfdir}/httpd/php.ini > %{_sysconfdir}/httpd/php.ini.new
233         mv %{_sysconfdir}/httpd/php.ini.new %{_sysconfdir}/httpd/php.ini
234 fi
235 if [ -f /var/lock/subsys/httpd ]; then
236         /etc/rc.d/init.d/httpd restart 1>&2
237 fi
238
239 %postun xml
240 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
241         echo "deactivating module 'xml.so' in /etc/httpd/php.ini" 1>&2
242         sed -e 's|^extension=xml.so|;extension=xml.so|g' \
243         %{_sysconfdir}/httpd/php.ini > %{_sysconfdir}/httpd/php.ini.new
244         mv %{_sysconfdir}/httpd/php.ini.new %{_sysconfdir}/httpd/php.ini
245 fi
246 if [ -f /var/lock/subsys/httpd ]; then
247         /etc/rc.d/init.d/httpd restart 1>&2
248 fi
249
250 %post java
251 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
252         echo "activating module 'libphp_java.so' in /etc/httpd/php.ini" 1>&2
253         sed -e 's|^;extension=libphp_java.so|extension=libphp_java.so|g' \
254         %{_sysconfdir}/httpd/php.ini > %{_sysconfdir}/httpd/php.ini.new
255         mv %{_sysconfdir}/httpd/php.ini.new %{_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 java
262 if [ -f %{_sysconfdir}/httpd/php.ini ]; then
263         echo "deactivating module 'libphp_java.so' in /etc/httpd/php.ini" 1>&2
264         sed -e 's|^extension=libphp_java.so|;extension=libphp_java.so|g' \
265         %{_sysconfdir}/httpd/php.ini > %{_sysconfdir}/httpd/php.ini.new
266         mv %{_sysconfdir}/httpd/php.ini.new %{_sysconfdir}/httpd/php.ini
267 fi
268 if [ -f /var/lock/subsys/httpd ]; then
269         /etc/rc.d/init.d/httpd restart 1>&2
270 fi
271
272 %clean
273 rm -rf $RPM_BUILD_ROOT
274
275 %files
276 %defattr(644,root,root,755)
277 %doc {CODING_STANDARDS,CREDITS,FAQ*,ChangeLog,FUNCTION_LIST.txt}.gz
278 %doc {MAINTAINERS,MODULES_STATUS,NEWS,TODO*}.gz  
279
280 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd/*
281 %dir %{_pkglibdir}/php
282
283 #%attr(755,root,root) %{_libdir}/apache/php/*.so
284
285 /home/httpd/html/icons/*
286
287 %attr(755,root,root) %{_pkglibdir}/libphp4.so
288
289 %files mysql
290 %defattr(644,root,root,755)
291 %attr(755,root,root) %{_pkglibdir}/php/mysql.so
292
293 %files gd
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_pkglibdir}/php/gd.so
296
297 %files xml
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_pkglibdir}/php/xml.so
300
301 %files java
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_pkglibdir}/php/libphp_java.so
This page took 0.04932 seconds and 4 git commands to generate.