summaryrefslogtreecommitdiff
path: root/php/Pkgfile
blob: bc4357132d872ef208db69157175ca9e7b08400e (plain)
    1 # Description: PHP interpreter, extension modules and support stuff
    2 # URL:         https://www.php.net
    3 # Maintainer:  Juergen Daubert, jue at crux dot nu
    4 # Depends on:  bzip2 libpcre2 libxml2 curl db gdbm
    5 
    6 name=php
    7 version=7.4.12
    8 release=1
    9 source=(https://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-external-pcre \
   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     
   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' {bz2,curl,openssl,dba}.so \
   51            > $PKG/etc/php/conf.d/extensions.ini
   52 }

Generated by cgit