updated pkg descriptions for some of perl modules
[mirrors/ArchLinux-Packages.git] / php / PKGBUILD
CommitLineData
209feeb0
H
1# $Id: PKGBUILD 53281 2009-09-27 20:04:03Z pierre $
2# Maintainer: Pierre Schmitz <pierre@archlinux.de>
3
4pkgbase=php
5pkgname=('php-thttpd')
6lol=( 'php-cgi'
7 'php-apache'
8 'php-pear'
9 'php-curl'
10 'php-enchant'
11 'php-gd'
12 'php-gmp'
13 'php-intl'
14 'php-ldap'
15 'php-mcrypt'
16 'php-odbc'
17 'php-pgsql'
18 'php-pspell'
19 'php-snmp'
20 'php-sqlite'
21 'php-tidy'
22 'php-xsl')
23pkgver=5.3.0
24pkgrel=5
25_suhosinver=${pkgver}-0.9.8
26_thttpdver=2.25b
27arch=('i686' 'x86_64')
28license=('PHP')
29url='http://www.php.net'
30makedepends=('apache' 'imap' 'postgresql-libs' 'mysql' 'libldap' 'postfix'
31 'sqlite3' 'unixodbc' 'net-snmp' 'libzip' 'enchant' 'file'
32 'libmcrypt' 'tidyhtml' 'aspell' 'libtool' 'gd' 'icu'
33 'curl' 'libxslt' 'openssl' 'bzip2' 'db' 'gmp')
34options=('!makeflags')
35source=("http://www.php.net/distributions/${pkgbase}-${pkgver}.tar.bz2"
36 "http://download.suhosin.org/suhosin-patch-${_suhosinver}.patch.gz"
37 'php.ini.patch' 'apache.conf' 'db-configure.patch' 'gd-info-segfault.patch'
38 "http://www.acme.com/software/thttpd/thttpd-${_thttpdver}.tar.gz")
39
40md5sums=('846760cd655c98dfd86d6d97c3d964b0'
41 'a23a3d54e177ac0ad30f78d928ba8177'
42 '67c63d2c8a976a333bbd2216cdd60413'
43 '96ca078be6729b665be8a865535a97bf'
44 '45ecb6fb0aadfd3462097e3bab951aa5'
45 '1c1a50aae7207b12d27bdecd8967e7ce'
46 '156b249b3b0bcd48b06badd2db0d56c5')
47
48build() {
49 phpconfig="--prefix=/usr \
50 --sysconfdir=/etc/php \
51 --with-layout=GNU \
52 --with-config-file-path=/etc/php \
53 --with-config-file-scan-dir=/etc/php/conf.d \
54 --enable-inline-optimization \
55 --disable-debug \
56 --disable-rpath \
57 --disable-static \
58 --enable-shared \
59 --mandir=/usr/share/man \
60 --without-pear \
61 "
62
63 phpextensions="--enable-bcmath=shared \
64 --enable-calendar=shared \
65 --enable-dba=shared \
66 --enable-exif=shared \
67 --enable-ftp=shared \
68 --enable-gd-native-ttf \
69 --enable-intl=shared \
70 --enable-json=shared \
71 --enable-mbregex \
72 --enable-mbstring \
73 --enable-pdo=shared \
74 --enable-phar=shared \
75 --enable-posix=shared \
76 --enable-session \
77 --enable-shmop=shared \
78 --enable-soap=shared \
79 --enable-sockets=shared \
80 --enable-sqlite-utf8 \
81 --enable-sysvmsg=shared \
82 --enable-sysvsem=shared \
83 --enable-sysvshm=shared \
84 --enable-xml \
85 --enable-zip=shared \
86 --with-bz2=shared \
87 --with-curl=shared \
88 --with-db4=shared \
89 --with-enchant=shared,/usr \
90 --with-freetype-dir=shared,/usr \
91 --with-gd=shared,/usr \
92 --with-gdbm=shared \
93 --with-gettext=shared \
94 --with-gmp=shared \
95 --with-iconv=shared \
96 --with-icu-dir=/usr \
97 --with-imap-ssl=shared \
98 --with-imap=shared \
99 --with-jpeg-dir=shared,/usr \
100 --with-ldap=shared \
101 --with-mcrypt=shared \
102 --with-mysql-sock=/tmp/mysql.sock \
103 --with-mysql=shared,mysqlnd \
104 --with-mysqli=shared,mysqlnd \
105 --with-openssl=shared \
106 --with-pcre-regex=/usr \
107 --with-pdo-mysql=shared,mysqlnd \
108 --with-pdo-odbc=shared,unixODBC,/usr \
109 --with-pdo-pgsql=shared \
110 --with-pdo-sqlite=shared,/usr \
111 --with-pgsql=shared \
112 --with-png-dir=shared,/usr \
113 --with-pspell=shared \
114 --with-regex=php \
115 --with-snmp=shared \
116 --with-sqlite3=shared,/usr \
117 --with-sqlite=shared \
118 --with-tidy=shared \
119 --with-unixODBC=shared,/usr \
120 --with-xmlrpc=shared \
121 --with-xsl=shared \
122 --with-zlib \
123 --without-db2 \
124 --without-db3 \
125 "
126
127 EXTENSION_DIR=/usr/lib/php/modules
128 export EXTENSION_DIR
129 PEAR_INSTALLDIR=/usr/share/pear
130 export PEAR_INSTALLDIR
131
132 cd ${srcdir}/${pkgbase}-${pkgver}
133
134 # avoid linking against old db version
135 patch -p0 -i ${srcdir}/db-configure.patch || return 1
136
137 # apply suhosin patch
138 patch -p1 -i ${srcdir}/suhosin-patch-${_suhosinver}.patch || return 1
139
140 # adjust paths
141 patch -p0 -i ${srcdir}/php.ini.patch || return 1
142
143 # fix gd segfault; http://bugs.php.net/bug.php?id=49193
144 patch -p0 -i ${srcdir}/gd-info-segfault.patch || return 1
145
146 # php
147 mkdir ${srcdir}/build-php
148 cd ${srcdir}/build-php
149 ln -s ../${pkgbase}-${pkgver}/configure
150 ./configure --srcdir=../${pkgbase}-${pkgver} \
151 ${phpconfig} \
152 --disable-cgi \
153 --with-readline \
154 --enable-pcntl \
155 ${phpextensions} || return 1
156 make || return 1
157
158 # cgi and fcgi
159 # reuse the previous run; this will save us a lot of time
160 cp -a ${srcdir}/build-php ${srcdir}/build-cgi
161 cd ${srcdir}/build-cgi
162 ./configure --srcdir=../${pkgbase}-${pkgver} \
163 ${phpconfig} \
164 --enable-cgi \
165 --disable-cli \
166 ${phpextensions} || return 1
167 make || return 1
168
169 # apache
170 cp -a ${srcdir}/build-php ${srcdir}/build-apache
171 cd ${srcdir}/build-apache
172 ./configure --srcdir=../${pkgbase}-${pkgver} \
173 ${phpconfig} \
174 --with-apxs2 \
175 --disable-cli \
176 ${phpextensions} || return 1
177 make || return 1
178
179 # pear
180 cp -a ${srcdir}/build-php ${srcdir}/build-pear
181 cd ${srcdir}/build-pear
182 ./configure --srcdir=../${pkgbase}-${pkgver} \
183 ${phpconfig} \
184 --disable-cgi \
185 --with-readline \
186 --enable-pcntl \
187 --with-pear \
188 ${phpextensions} || return 1
189 make || return 1
190
191 # thttpd
192 cp -a ${srcdir}/build-php ${srcdir}/build-thttpd
193 cd ${srcdir}/build-thttpd
194 ./configure --srcdir=../${pkgbase}-${pkgver} \
195 ${phpconfig} \
196 --with-thttpd=${srcdir}/thttpd-${_thttpdver} \
197 --disable-cli \
198 ${phpextensions} || return 1
199 #--with-apxs2 \
200 make || return 1
201}
202
203package_php-thttpd() {
204 pkgdesc='PHP for tHTTPd'
205 depends=('php' 'thttpd' 'pcre' 'libxml2')
206 #backup=('etc/httpd/conf/extra/php5_module.conf')
207
208 return 1;
209 #install -D -m755 ${srcdir}/build-apache/libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/libphp5.so
210 #install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php5_module.conf
211}
212
213
214package_php() {
215 pkgdesc='An HTML-embedded scripting language'
216 depends=('pcre' 'libxml2' 'bzip2' 'openssl')
217 replaces=('php-fileinfo')
218 provides=('php-fileinfo')
219 conflicts=('php-fileinfo')
220 backup=('etc/php/php.ini')
221
222 cd ${srcdir}/build-php
223 make INSTALL_ROOT=${pkgdir} install || return 1
224 install -d -m755 ${pkgdir}/usr/share/pear
225 # fix broken link
226 ln -sf phar.phar $pkgdir/usr/bin/phar
227 # install php.ini
228 install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/php.ini-production ${pkgdir}/etc/php/php.ini
229 install -d -m755 ${pkgdir}/etc/php/conf.d/
230
231 # remove static modules
232 rm -f ${pkgdir}/usr/lib/php/modules/*.a
233 # remove modules provided by sub packages
234 rm -f ${pkgdir}/usr/lib/php/modules/{curl,enchant,gd,gmp,intl,ldap,mcrypt,odbc,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl}.so
235}
236
237package_php-cgi() {
238 pkgdesc='CGI and FCGI SAPI for PHP'
239 depends=('php' 'pcre' 'libxml2')
240
241 install -D -m755 ${srcdir}/build-cgi/sapi/cgi/php-cgi ${pkgdir}/usr/bin/php-cgi
242}
243
244package_php-apache() {
245 pkgdesc='Apache SAPI for PHP'
246 depends=('php' 'apache' 'pcre' 'libxml2')
247 backup=('etc/httpd/conf/extra/php5_module.conf')
248
249 install -D -m755 ${srcdir}/build-apache/libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/libphp5.so
250 install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php5_module.conf
251}
252
253package_php-pear() {
254 pkgdesc='PHP Extension and Application Repository'
255 depends=('php' 'bash')
256 backup=("etc/php/pear.conf")
257
258 cd ${srcdir}/build-pear
259 make install-pear INSTALL_ROOT=${pkgdir}
260 for i in $(find ${pkgdir}/ -name '.*'); do
261 [ -e $i ] && rm -rf $i
262 done
263}
264
265package_php-curl() {
266 depends=('php' 'curl')
267 pkgdesc="curl module for PHP"
268 install -D -m755 ${srcdir}/build-php/modules/curl.so ${pkgdir}/usr/lib/php/modules/curl.so
269}
270
271package_php-enchant() {
272 depends=('php' 'enchant')
273 pkgdesc="enchant module for PHP"
274 install -D -m755 ${srcdir}/build-php/modules/enchant.so ${pkgdir}/usr/lib/php/modules/enchant.so
275}
276
277package_php-gd() {
278 depends=('php' 'gd')
279 pkgdesc="gd module for PHP"
280 install -D -m755 ${srcdir}/build-php/modules/gd.so ${pkgdir}/usr/lib/php/modules/gd.so
281}
282
283package_php-gmp() {
284 depends=('php' 'gmp')
285 pkgdesc="gmp module for PHP"
286 install -D -m755 ${srcdir}/build-php/modules/gmp.so ${pkgdir}/usr/lib/php/modules/gmp.so
287}
288
289package_php-intl() {
290 depends=('php' 'icu')
291 pkgdesc="intl module for PHP"
292 install -D -m755 ${srcdir}/build-php/modules/intl.so ${pkgdir}/usr/lib/php/modules/intl.so
293}
294
295package_php-ldap() {
296 depends=('php' 'libldap')
297 pkgdesc="ldap module for PHP"
298 install -D -m755 ${srcdir}/build-php/modules/ldap.so ${pkgdir}/usr/lib/php/modules/ldap.so
299}
300
301package_php-mcrypt() {
302 depends=('php' 'libmcrypt' 'libtool')
303 pkgdesc="mcrypt module for PHP"
304 install -D -m755 ${srcdir}/build-php/modules/mcrypt.so ${pkgdir}/usr/lib/php/modules/mcrypt.so
305}
306
307package_php-odbc() {
308 depends=('php' 'unixodbc')
309 pkgdesc="ODBC modules for PHP"
310 install -D -m755 ${srcdir}/build-php/modules/odbc.so ${pkgdir}/usr/lib/php/modules/odbc.so
311 install -D -m755 ${srcdir}/build-php/modules/pdo_odbc.so ${pkgdir}/usr/lib/php/modules/pdo_odbc.so
312}
313
314package_php-pgsql() {
315 depends=('php' 'postgresql-libs')
316 pkgdesc="PostgreSQL modules for PHP"
317 install -D -m755 ${srcdir}/build-php/modules/pgsql.so ${pkgdir}/usr/lib/php/modules/pgsql.so
318 install -D -m755 ${srcdir}/build-php/modules/pdo_pgsql.so ${pkgdir}/usr/lib/php/modules/pdo_pgsql.so
319}
320
321package_php-pspell() {
322 depends=('php' 'aspell')
323 pkgdesc="pspell module for PHP"
324 install -D -m755 ${srcdir}/build-php/modules/pspell.so ${pkgdir}/usr/lib/php/modules/pspell.so
325}
326
327package_php-snmp() {
328 depends=('php' 'net-snmp')
329 pkgdesc="snmp module for PHP"
330 install -D -m755 ${srcdir}/build-php/modules/snmp.so ${pkgdir}/usr/lib/php/modules/snmp.so
331}
332
333package_php-sqlite() {
334 depends=('php' 'sqlite3')
335 pkgdesc="sqlite3 module for PHP"
336 install -D -m755 ${srcdir}/build-php/modules/sqlite3.so ${pkgdir}/usr/lib/php/modules/sqlite3.so
337 install -D -m755 ${srcdir}/build-php/modules/pdo_sqlite.so ${pkgdir}/usr/lib/php/modules/pdo_sqlite.so
338}
339
340package_php-tidy() {
341 depends=('php' 'tidyhtml')
342 pkgdesc="tidy module for PHP"
343 install -D -m755 ${srcdir}/build-php/modules/tidy.so ${pkgdir}/usr/lib/php/modules/tidy.so
344}
345
346package_php-xsl() {
347 depends=('php' 'libxslt')
348 pkgdesc="xsl module for PHP"
349 install -D -m755 ${srcdir}/build-php/modules/xsl.so ${pkgdir}/usr/lib/php/modules/xsl.so
350}
This page took 0.54659 seconds and 4 git commands to generate.