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