summaryrefslogtreecommitdiff
path: root/php/Pkgfile
blob: 77a6c7703f6820185944589c78da68c321b9ec5a (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=8.2.1
    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 	ln -sf phar.phar $PKG/usr/bin/phar
   43 
   44 	sed -i '/^extension_dir/s|=.*$|= "/usr/lib/php/extensions"|' php.ini-*
   45 	install -d $PKG/etc/php/conf.d
   46 	install -m 644 php.ini-* $PKG/etc/php
   47 
   48 	printf 'extension=%s\n' {bz2,curl,openssl,dba}.so \
   49 		> $PKG/etc/php/conf.d/extensions.ini
   50 }

Generated by cgit