summaryrefslogtreecommitdiff
path: root/php/Pkgfile
blob: 7b015c7cd6de06afe650a413c709b9dc6f48383b (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:  readline libpcre libxml2 curl db gdbm xz
    5 
    6 name=php
    7 version=5.6.30
    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 --mandir=/usr/share/man \
   16     --with-config-file-path=/etc/php \
   17     --with-config-file-scan-dir=/etc/php/conf.d \
   18     --with-zlib \
   19     --with-pcre-regex=/usr \
   20     --disable-static --disable-debug \
   21     --without-sqlite3 --without-pdo-sqlite \
   22     --without-pear"
   23 
   24     local PHP_SHARED="
   25     --enable-dba=shared --with-gdbm --with-db4 \
   26     --with-bz2=shared \
   27     --with-curl=shared \
   28     --with-openssl=shared \
   29     --enable-zip=shared \
   30     --enable-mbstring=shared"
   31 
   32     EXTENSION_DIR=/usr/lib/php/extensions \
   33     ./configure \
   34         $PHP_CONFIG \
   35         $PHP_SHARED \
   36         --enable-cli \
   37         --disable-cgi \
   38         --with-readline
   39 
   40     make
   41     make -j1 INSTALL_ROOT=$PKG install
   42     rm $PKG/usr/lib/php/extensions/*.a
   43     ln -sf phar.phar $PKG/usr/bin/phar
   44 
   45     sed -i '/^extension_dir/s|=.*$|= "/usr/lib/php/extensions"|' php.ini-*
   46     install -d $PKG/etc/php/conf.d
   47     install -m 644 php.ini-* $PKG/etc/php
   48 
   49     # order matters !
   50     printf 'extension=%s\n' {zip,bz2,curl,openssl,dba,mbstring}.so \
   51            > $PKG/etc/php/conf.d/extensions.ini
   52 }

Generated by cgit