opt/php/Pkgfile
Juergen Daubert 74d9e91151 [notify] php: update to 5.4.12
besides the version bump this release of opt/php* introduces some
changes which might require extra attention:

- sqlite3 is no longer a build-in driver but can be found in
  opt/php-sqlite3 now
- the mbstring extension is now part of opt/php, the contrib port
  php-mbstring is no longer required and will be removed
- opt/php-mysql includes the native and the PDO driver for mysql,
  the contrib port php-pdo-mysql is no longer required and will be
  removed
2013-02-25 13:00:36 +01:00

53 lines
1.4 KiB
Plaintext

# Description: PHP interpreter, extension modules and support stuff
# URL: http://www.php.net
# Maintainer: Juergen Daubert, jue at crux dot nu
# Depends on: readline libpcre libxml2 curl db gdbm zip
name=php
version=5.4.12
release=1
source=(http://www.php.net/distributions/php-$version.tar.bz2
extensions.ini)
build () {
cd php-$version
local PHP_CONFIG="
--prefix=/usr --mandir=/usr/man \
--with-config-file-path=/etc/php \
--with-config-file-scan-dir=/etc/php/conf.d \
--with-zlib \
--with-pcre-regex=/usr \
--disable-static --disable-debug \
--without-sqlite3 --without-pdo-sqlite \
--without-pear"
local PHP_SHARED="
--enable-dba=shared --with-gdbm --with-db4 \
--with-bz2=shared \
--with-curl=shared \
--with-openssl=shared \
--enable-zip=shared \
--enable-mbstring=shared"
EXTENSION_DIR=/usr/lib/php/extensions \
./configure \
$PHP_CONFIG \
$PHP_SHARED \
--enable-cli \
--disable-cgi \
--with-readline
make
make -j1 INSTALL_ROOT=$PKG install
rm $PKG/usr/lib/php/extensions/*.a
sed -i '/^extension_dir/s|=.*$|= "/usr/lib/php/extensions"|' php.ini-*
install -d $PKG/etc/php/conf.d
install -m 644 php.ini-* $PKG/etc/php
# order matters !
printf 'extension=%s\n' {zip,bz2,curl,openssl,dba,mbstring}.so \
> $PKG/etc/php/conf.d/extensions.ini
}