summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d50d6af14921575536c2161f9162865c1a53a505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# $Id$
# Maintainer: Volkan Gümüs <hallo@f1-computer.de>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgbase=php53
_pkgbase=${pkgbase%53}
pkgname=("${pkgbase}"
         "${pkgbase}-cgi"
         "${pkgbase}-apache"
         "${pkgbase}-fpm"
         "${pkgbase}-embed"
         "${pkgbase}-dblib"
         "${pkgbase}-pear"
         "${pkgbase}-enchant"
         "${pkgbase}-gd"
         "${pkgbase}-imap"
         "${pkgbase}-intl"
         "${pkgbase}-ldap"
         "${pkgbase}-mcrypt"
         "${pkgbase}-mssql"
         "${pkgbase}-odbc"
         "${pkgbase}-pgsql"
         "${pkgbase}-pspell"
         "${pkgbase}-snmp"
         "${pkgbase}-sqlite"
         "${pkgbase}-tidy"
         "${pkgbase}-xsl")
pkgver=5.3.29
_suhosinver=5.3.9-0.9.10
pkgrel=9
pkgdesc="A general-purpose scripting language that is especially suited to web development"
arch=('i686' 'x86_64')
license=('PHP')
url='http://php.net'
makedepends=('apache' 'c-client' 'postgresql-libs' 'libldap' 'smtp-forwarder'
             'sqlite' 'unixodbc' 'net-snmp' 'libzip' 'enchant' 'file' 'freetds'
             'libmcrypt' 'tidyhtml' 'aspell' 'libltdl' 'libpng' 'libjpeg' 'freetype2' 'icu'
             'curl' 'libxslt' 'openssl-1.0' 'db' 'gmp' 'systemd')

source=("http://php.net/distributions/${_pkgbase}-${pkgver}.tar.xz"
        "https://distfiles.macports.org/php5/suhosin-patch-${_suhosinver}.patch.gz"
        'php.ini.patch' 'apache.conf' 'php-fpm.conf.in.patch'
        'logrotate.d.php-fpm' 'php-fpm.service' 'php-fpm.tmpfiles'
        'suhosin.patch'
        'CVE-2014-3587.patch' 'CVE-2014-3597.patch' 'CVE-2014-3668.patch'
        'CVE-2014-3669.patch' 'CVE-2014-3670.patch' 'curl_embedded_null.patch'
        'CVE-2014-8142.patch' 'CVE-2015-0231.patch' 'CVE-2014-9705.patch'
        'CVE-2015-0273.patch' 'CVE-2015-2301.patch' 'CVE-2015-2305.patch'
        'CVE-2015-2783.patch' 'CVE-2015-2787.patch' 'CVE-2015-3330.patch'
        'CVE-2015-3329.patch')
sha1sums=('8772d7419511f9f066fb17929194b5492680ec9b'
          '7b9ef5c3e0831154df0d6290aba0989ca90138ed'
          'b42a385359f5d033748d4d8f44a9f7a0469f628a'
          '82776db01f70b9186ba455de22eb06fe193f1d30'
          '2247fb95547feefdc898fc2c01bae1817ec2dc2a'
          'ce75999f51fa780c68e1575cca1d660ea60a5e64'
          '2a3607973db41aa08f7aba11057218e2d88732b7'
          '3c011681562bb620b1717b3829cb354461dd94d5'
          '4d9fea0b7ab856c59ddbf722fe6c95b8e479af9b'
          'b5caa85fd1b76a3ece056ab5441852330989640b'
          '9f2aa7c2514cb66204f9f5c3dc5f8ebdda238c78'
          '4672c18ece397b2f99ad0c992f61220e210b2dc1'
          '454e96af5cab1f649fceca61c0afb46ae73179f5'
          '2f368143bcdaae4659a65103ffdeb71cac12c5cf'
          'ede78d11b7d4d6c304253bfd358607e160a3918a'
          'e97ea93d37ffbf6c3025281202d2e807facb4e7e'
          '0ab48f282d62058318d08c44607aac89912f78d6'
          'b535103d79ba9791c22a841d5d72497dec3dd93d'
          '7cb38769807eb7d35ff7f3eaf1cce408d8ad2676'
          '066fe3a84e1aabaf45afe26470cd769b9e3ab79a'
          '4968abe76ab18c15f85111b3e78dba0059f948ce'
          '18e3f12ad04adf4cc59aa5862628ab0d032c76ef'
          '4d9551ec6c2462cde45d0e556edf6d9e792c15b4'
          '248dc92602721c193f3906f3eb7d98cd5499ba40'
          '40fc97494110e9b312ea0f5bade8aa0b7043f40e')

prepare() {
	cd ${srcdir}

	msg "Fix the suhosin patch"
	patch -l -i suhosin.patch
	sed -i 's/1997-2004/1997-2014/g' suhosin-patch-${_suhosinver}.patch
	sed -i 's/1997-2012/1997-2014/g' suhosin-patch-${_suhosinver}.patch

	cd ${srcdir}/${_pkgbase}-${pkgver}

	# TODO: some doesn't apply
	msg "Applying security patches (from Ubuntu)"
	# patch -p1 -i ../CVE-2014-3587.patch
	# patch -p1 -i ../CVE-2014-3597.patch
	patch -p1 -i ../CVE-2014-3668.patch
	patch -p1 -i ../CVE-2014-3669.patch
	patch -p1 -i ../CVE-2014-3670.patch
	patch -p1 -i ../curl_embedded_null.patch
	patch -p1 -i ../CVE-2014-8142.patch
	patch -p1 -i ../CVE-2015-0231.patch
	patch -p1 -i ../CVE-2014-9705.patch
	# patch -p1 -i ../CVE-2015-0273.patch
	patch -p1 -i ../CVE-2015-2301.patch
	patch -p1 -i ../CVE-2015-2305.patch
	patch -p1 -i ../CVE-2015-2783.patch
	patch -p1 -i ../CVE-2015-2787.patch
	patch -p1 -i ../CVE-2015-3330.patch
	patch -p1 -i ../CVE-2015-3329.patch

	msg "Applying suhosin patch"
	patch -F3 -p1 -i ${srcdir}/suhosin-patch-${_suhosinver}.patch

	msg "Adjust paths"
	patch -p0 -i ${srcdir}/php.ini.patch
	patch -p0 -i ${srcdir}/php-fpm.conf.in.patch
	# Just because our Apache 2.4 is configured with a threaded MPM by default does not mean we want to build a ZTS PHP.
	# Let's supress this behaviour and build a SAPI that works fine with the prefork MPM.
	sed '/APACHE_THREADED_MPM=/d' -i sapi/apache2handler/config.m4 -i configure

	# Allow php-tidy to compile with tidy-html5
	sed 's/buffio\.h/tidybuffio\.h/' -i ext/tidy/tidy.c

    msg "Enchant 2 fixes"
    sed -i -e 's|include/enchant|include/enchant-2|' -e 's|-lenchant|-lenchant-2|' configure

    msg "ICU fixes"
    sed -i '/U_NAMESPACE_END/a using namespace icu;' ext/intl/msgformat/msgformat_helpers.cpp
}

build() {
	local _phpconfig="--srcdir=../${_pkgbase}-${pkgver} \
		--prefix=/usr \
		--sysconfdir=/etc/${pkgbase} \
		--localstatedir=/var \
		--libdir=/usr/lib/${pkgbase} \
		--datadir=/usr/share/${pkgbase} \
		--program-suffix=${pkgbase#php} \
		--with-layout=GNU \
		--with-config-file-path=/etc/${pkgbase} \
		--with-config-file-scan-dir=/etc/${pkgbase}/conf.d \
		--enable-inline-optimization \
		--disable-debug \
		--disable-rpath \
		--disable-static \
		--enable-shared \
		--mandir=/usr/share/man \
		--without-pear \
		"

	local _phpextensions="--enable-bcmath=shared \
		--enable-calendar=shared \
		--enable-dba=shared \
		--enable-exif=shared \
		--enable-ftp=shared \
		--enable-gd-native-ttf \
		--enable-intl=shared \
		--enable-json=shared \
		--enable-mbregex \
		--enable-mbstring \
		--enable-pdo \
		--enable-phar=shared \
		--enable-posix=shared \
		--enable-session \
		--enable-shmop=shared \
		--enable-soap=shared \
		--enable-sockets=shared \
		--enable-sqlite-utf8 \
		--enable-sysvmsg=shared \
		--enable-sysvsem=shared \
		--enable-sysvshm=shared \
		--enable-xml \
		--enable-zip=shared \
		--with-bz2=shared \
		--with-curl=shared \
		--with-enchant=shared,/usr \
		--with-freetype-dir=shared,/usr \
		--with-gd=shared \
		--with-gdbm=shared \
		--with-gettext=shared \
		--with-gmp=shared \
		--with-iconv=shared \
		--with-icu-dir=/usr \
		--with-imap-ssl=shared,/usr \
		--with-imap=shared,/usr \
		--with-kerberos=/usr \
		--with-jpeg-dir=shared,/usr \
		--with-ldap=shared \
		--with-ldap-sasl \
		--with-mcrypt=shared \
		--with-mhash \
		--with-mssql=shared \
		--with-mysql-sock=/run/mysqld/mysqld.sock \
		--with-mysql=shared,mysqlnd \
		--with-mysqli=shared,mysqlnd \
		--with-openssl=shared \
		--with-pcre-regex=/usr \
		--with-pdo-dblib=shared,/usr \
		--with-pdo-mysql=shared,mysqlnd \
		--with-pdo-odbc=shared,unixODBC,/usr \
		--with-pdo-pgsql=shared \
		--with-pdo-sqlite=shared,/usr \
		--with-pgsql=shared \
		--with-png-dir=shared,/usr \
		--with-pspell=shared \
		--with-regex=php \
		--with-snmp=shared \
		--with-sqlite3=shared,/usr \
		--with-sqlite=shared \
		--with-tidy=shared \
		--with-unixODBC=shared,/usr \
		--with-xmlrpc=shared \
		--with-xsl=shared \
		--with-zlib \
		--without-db2 \
		--without-db3 \
		"

	export EXTENSION_DIR=/usr/lib/${pkgbase}/modules
	export PEAR_INSTALLDIR=/usr/share/${pkgbase}/pear
	export PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig

	cd ${srcdir}/${_pkgbase}-${pkgver}

	# -D_FORTIFY_SOURCE=2 will generate a warning, which will fail the configure script
	unset CPPFLAGS
	# To workaround c-client linking problem
	export IMAP_SHARED_LIBADD="-lssl"

	# php
	mkdir -p ${srcdir}/build-php
	cd ${srcdir}/build-php
	ln -sf ../${_pkgbase}-${pkgver}/configure
	./configure ${_phpconfig} \
		--disable-cgi \
		--with-readline \
		--enable-pcntl \
		${_phpextensions}
	sed -i '/^IMAP_SHARED_LIBADD =/ s#-lssl -lcrypto#-Wl,/usr/lib/libssl.so -Wl,/usr/lib/libcrypto.so#' Makefile
	make

	# cgi and fcgi
	# reuse the previous run; this will save us a lot of time
	cp -Ta ${srcdir}/build-php ${srcdir}/build-cgi
	cd ${srcdir}/build-cgi
	./configure ${_phpconfig} \
		--disable-cli \
		--enable-cgi \
		${_phpextensions}
	make

	# apache
	cp -Ta ${srcdir}/build-php ${srcdir}/build-apache
	cd ${srcdir}/build-apache
	./configure ${_phpconfig} \
		--disable-cli \
		--with-apxs2 \
		${_phpextensions}
	make

	# fpm
	cp -Ta ${srcdir}/build-php ${srcdir}/build-fpm
	cd ${srcdir}/build-fpm
	./configure ${_phpconfig} \
		--disable-cli \
		--enable-fpm \
		--with-fpm-user=http \
		--with-fpm-group=http \
		${_phpextensions}
	make

	# embed
	cp -Ta ${srcdir}/build-php ${srcdir}/build-embed
	cd ${srcdir}/build-embed
	./configure ${_phpconfig} \
		--disable-cli \
		--enable-embed=shared \
		${_phpextensions}
	make

	# pear
	sed -i 's#@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d#@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -p $(bindir)/php$(program_suffix) -d#' ${srcdir}/php-${pkgver}/pear/Makefile.frag
	cp -Ta ${srcdir}/build-php ${srcdir}/build-pear
	cd ${srcdir}/build-pear
	./configure ${_phpconfig} \
		--disable-cgi \
		--with-readline \
		--enable-pcntl \
		--with-pear \
		${_phpextensions}
	make
}

package_php53() {
	pkgdesc='An HTML-embedded scripting language - Legacy 5.3 version'
	depends=('pcre' 'libxml2' 'curl' 'libzip' 'openssl-1.0')
	backup=("etc/${pkgbase}/php.ini")
	provides=("${_pkgbase}=$pkgver")

	cd ${srcdir}/build-php
	make -j1 INSTALL_ROOT=${pkgdir} install

	# install php.ini
	install -D -m644 ${srcdir}/${_pkgbase}-${pkgver}/php.ini-production ${pkgdir}/etc/${pkgbase}/php.ini
	install -d -m755 ${pkgdir}/etc/${pkgbase}/conf.d/

	# remove static modules
	rm -f ${pkgdir}/usr/lib/${pkgbase}/modules/*.a
	# remove modules provided by sub packages
	rm -f ${pkgdir}/usr/lib/${pkgbase}/modules/{enchant,gd,imap,intl,ldap,mcrypt,mssql,odbc,pdo_odbc,pgsql,pdo_pgsql,pspell,snmp,sqlite3,pdo_sqlite,tidy,xsl,pdo_dblib}.so

	# remove empty directory
	rmdir ${pkgdir}/usr/include/php/include

	# move include directory
	mv ${pkgdir}/usr/include/php ${pkgdir}/usr/include/${pkgbase}

	# fix phar symlink
	rm ${pkgdir}/usr/bin/phar
	ln -sf phar.${pkgbase/php/phar} ${pkgdir}/usr/bin/${pkgbase/php/phar}

	# rename executables
	mv ${pkgdir}/usr/bin/phar.{phar,${pkgbase/php/phar}}

	# fix paths in executables
	sed -i "/^includedir=/c \includedir=/usr/include/${pkgbase}" ${pkgdir}/usr/bin/${pkgbase/php/phpize}
	sed -i "/^include_dir=/c \include_dir=/usr/include/${pkgbase}" ${pkgdir}/usr/bin/${pkgbase/php/php-config}

	# make phpize use php-config53
	sed -i "/^\[  --with-php-config=/c \[  --with-php-config=PATH  Path to php-config [${pkgbase/php/php-config}]], ${pkgbase/php/php-config}, no)" ${pkgdir}/usr/lib/${pkgbase}/build/phpize.m4
}

package_php53-cgi() {
	pkgdesc='CGI and FCGI SAPI for PHP'
	depends=("${pkgbase}")
	provides=("${_pkgbase}-cgi=$pkgver")

	install -D -m755 ${srcdir}/build-cgi/sapi/cgi/php-cgi ${pkgdir}/usr/bin/${pkgbase}-cgi
}

package_php53-apache() {
	pkgdesc='Apache SAPI for PHP'
	depends=("${pkgbase}" 'apache')
	provides=("${_pkgbase}-apache=$pkgver")
	backup=("etc/httpd/conf/extra/${pkgbase}_module.conf")
	install='php-apache.install'

	install -D -m755 ${srcdir}/build-apache/libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/lib${pkgbase}.so
	install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/${pkgbase}_module.conf
}

package_php53-fpm() {
	pkgdesc='FastCGI Process Manager for PHP'
	depends=("${pkgbase}" 'systemd')
	provides=("${_pkgbase}-fpm=$pkgver")
	backup=("etc/${pkgbase}/php-fpm.conf")
	install='php-fpm.install'

	install -d -m755 ${pkgdir}/usr/bin
	install -D -m755 ${srcdir}/build-fpm/sapi/fpm/php-fpm ${pkgdir}/usr/bin/${pkgbase}-fpm

	install -D -m644 ${srcdir}/build-fpm/sapi/fpm/php-fpm.8 ${pkgdir}/usr/share/man/man8/${pkgbase}-fpm.8
	install -D -m644 ${srcdir}/build-fpm/sapi/fpm/php-fpm.conf ${pkgdir}/etc/${pkgbase}/php-fpm.conf

	install -d -m755 ${pkgdir}/etc/${pkgbase}/fpm.d
	install -D -m644 ${srcdir}/php-fpm.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/${pkgbase}-fpm.conf
	install -D -m644 ${srcdir}/php-fpm.service ${pkgdir}/usr/lib/systemd/system/${pkgbase}-fpm.service

	install -d -m755 ${pkgdir}/etc/logrotate.d
	install -D -m644 ${srcdir}/logrotate.d.php-fpm ${pkgdir}/etc/logrotate.d/${pkgbase}-fpm
}

package_php53-embed() {
	pkgdesc='Embedded PHP SAPI library'
	depends=("${pkgbase}")
	provides=("${_pkgbase}-embed=$pkgver")

	install -D -m755 ${srcdir}/build-embed/libs/libphp5.so ${pkgdir}/usr/lib/libphp53.so
	install -D -m644 ${srcdir}/${_pkgbase}-${pkgver}/sapi/embed/php_embed.h ${pkgdir}/usr/include/${pkgbase}/sapi/embed/php_embed.h
}

package_php53-dblib() {
	pkgdesc='dblib module for PHP'
	depends=("${pkgbase}")
	provides=("${_pkgbase}-dblib=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/pdo_dblib.so ${pkgdir}/usr/lib/${pkgbase}/modules/pdo_dblib.so
}

package_php53-pear() {
	pkgdesc='PHP Extension and Application Repository'
	depends=("${pkgbase}")
	provides=("${_pkgbase}-pear=$pkgver")
	backup=("etc/${pkgbase}/pear.conf")

	cd ${srcdir}/build-pear
	make -j1 install-pear INSTALL_ROOT=${pkgdir}
	rm -rf ${pkgdir}{/usr/share/${pkgbase}/pear,}/.{channels,depdb,depdblock,filemap,lock,registry}

	mv ${pkgdir}/usr/bin/{pear,${pkgbase/php/pear}}
	mv ${pkgdir}/usr/bin/{peardev,${pkgbase/php/peardev}}
	mv ${pkgdir}/usr/bin/{pecl,${pkgbase/php/pecl}}
}

package_php53-enchant() {
	pkgdesc='enchant module for PHP'
	depends=("${pkgbase}" 'enchant')
	provides=("${_pkgbase}-enchant=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/enchant.so ${pkgdir}/usr/lib/${pkgbase}/modules/enchant.so
}

package_php53-gd() {
	pkgdesc='gd module for PHP'
	depends=("${pkgbase}" 'libpng' 'libjpeg' 'freetype2')
	provides=("${_pkgbase}-gd=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/gd.so ${pkgdir}/usr/lib/${pkgbase}/modules/gd.so
}

package_php53-imap() {
	pkgdesc='imap module for PHP'
	depends=("${pkgbase}" 'c-client')
	provides=("${_pkgbase}-imap=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/imap.so ${pkgdir}/usr/lib/${pkgbase}/modules/imap.so
}

package_php53-intl() {
	pkgdesc='intl module for PHP'
	depends=("${pkgbase}" 'icu')
	provides=("${_pkgbase}-intl=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/intl.so ${pkgdir}/usr/lib/${pkgbase}/modules/intl.so
}

package_php53-ldap() {
	pkgdesc='ldap module for PHP'
	depends=("${pkgbase}" 'libldap')
	provides=("${pkgbase}-ldap=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/ldap.so ${pkgdir}/usr/lib/${pkgbase}/modules/ldap.so
}

package_php53-mcrypt() {
	pkgdesc='mcrypt module for PHP'
	depends=("${pkgbase}" 'libmcrypt' 'libltdl')
	provides=("${_pkgbase}-mcrypt=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/mcrypt.so ${pkgdir}/usr/lib/${pkgbase}/modules/mcrypt.so
}

package_php53-mssql() {
	pkgdesc='mssql module for PHP'
	depends=("${pkgbase}" 'freetds')
	provides=("${_pkgbase}-mssql=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/mssql.so ${pkgdir}/usr/lib/${pkgbase}/modules/mssql.so
}

package_php53-odbc() {
	pkgdesc='ODBC modules for PHP'
	depends=("${pkgbase}" 'unixodbc')
	provides=("${_pkgbase}-odbc=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/odbc.so ${pkgdir}/usr/lib/${pkgbase}/modules/odbc.so
	install -D -m755 ${srcdir}/build-php/modules/pdo_odbc.so ${pkgdir}/usr/lib/${pkgbase}/modules/pdo_odbc.so
}

package_php53-pgsql() {
	pkgdesc='PostgreSQL modules for PHP'
	depends=("${pkgbase}" 'postgresql-libs')
	provides=("${_pkgbase}-pgsql=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/pgsql.so ${pkgdir}/usr/lib/${pkgbase}/modules/pgsql.so
	install -D -m755 ${srcdir}/build-php/modules/pdo_pgsql.so ${pkgdir}/usr/lib/${pkgbase}/modules/pdo_pgsql.so
}

package_php53-pspell() {
	pkgdesc='pspell module for PHP'
	depends=("${pkgbase}" 'aspell')
	provides=("${_pkgbase}-pspell=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/pspell.so ${pkgdir}/usr/lib/${pkgbase}/modules/pspell.so
}

package_php53-snmp() {
	pkgdesc='snmp module for PHP'
	depends=("${pkgbase}" 'net-snmp')
	provides=("${_pkgbase}-snmp=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/snmp.so ${pkgdir}/usr/lib/${pkgbase}/modules/snmp.so
}

package_php53-sqlite() {
	pkgdesc='sqlite module for PHP'
	depends=("${pkgbase}" 'sqlite')
	provides=("${_pkgbase}-sqlite=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/sqlite3.so ${pkgdir}/usr/lib/${pkgbase}/modules/sqlite3.so
	install -D -m755 ${srcdir}/build-php/modules/pdo_sqlite.so ${pkgdir}/usr/lib/${pkgbase}/modules/pdo_sqlite.so
}

package_php53-tidy() {
	pkgdesc='tidy module for PHP'
	depends=("${pkgbase}" 'tidyhtml')
	provides=("${_pkgbase}-tidy=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/tidy.so ${pkgdir}/usr/lib/${pkgbase}/modules/tidy.so
}

package_php53-xsl() {
	pkgdesc='xsl module for PHP'
	depends=("${pkgbase}" 'libxslt')
	provides=("${_pkgbase}-xsl=$pkgver")

	install -D -m755 ${srcdir}/build-php/modules/xsl.so ${pkgdir}/usr/lib/${pkgbase}/modules/xsl.so
}