blob: 37e9642f73ccf19ee7598434f5cd10bf51bf212e (
plain)
1 # Description: PHP interpreter, extension modules and support stuff
2 # URL: http://www.php.net
3 # Maintainer: Juergen Daubert, jue at crux dot nu
4 # Depends on: libpcre libxml2 curl db gdbm
5
6 name=php
7 version=7.2.18
8 release=1
9 source=(http://php.net/distributions/php-$version.tar.xz)
10
11 build () {
12 cd php-$version
13
14 local PHP_CONFIG="
15 --prefix=/usr \
16 --mandir=/usr/share/man \
17 --localstatedir=/var \
18 --with-config-file-path=/etc/php \
19 --with-config-file-scan-dir=/etc/php/conf.d \
20 --with-zlib \
21 --with-pcre-regex=/usr \
22 --disable-static --disable-debug \
23 --without-sqlite3 --without-pdo-sqlite \
24 --without-pear"
25
26 local PHP_SHARED="
27 --enable-dba=shared --with-gdbm --with-db4 \
28 --with-bz2=shared \
29 --with-curl=shared \
30 --with-openssl=shared \
31 --enable-zip=shared \
32 --enable-mbstring=shared"
33
34 EXTENSION_DIR=/usr/lib/php/extensions \
35 ./configure \
36 $PHP_CONFIG \
37 $PHP_SHARED \
38 --enable-cli \
39 --disable-cgi \
40 --with-readline
41
42 make
43 make -j1 INSTALL_ROOT=$PKG install
44 rm $PKG/usr/lib/php/extensions/*.a
45 ln -sf phar.phar $PKG/usr/bin/phar
46
47 sed -i '/^extension_dir/s|=.*$|= "/usr/lib/php/extensions"|' php.ini-*
48 install -d $PKG/etc/php/conf.d
49 install -m 644 php.ini-* $PKG/etc/php
50
51 # order matters !
52 printf 'extension=%s\n' {zip,bz2,curl,openssl,dba,mbstring}.so \
53 > $PKG/etc/php/conf.d/extensions.ini
54 }
|