wok-current annotate php/receipt @ rev 22323

updated ympd (1.2.1 -> 1.3.0)
author Hans-G?nter Theisgen
date Thu Nov 14 17:21:02 2019 +0100 (2019-11-14)
parents ccb0caebef6f
children 84a3b4b621e1
rev   line source
pankso@18 1 # SliTaz package receipt.
pankso@18 2
pankso@18 3 PACKAGE="php"
erjo@16732 4 VERSION="5.5.13"
pankso@204 5 CATEGORY="development"
pankso@18 6 SHORT_DESC="PHP web programming language."
pankso@18 7 MAINTAINER="pankso@slitaz.org"
pascal@15198 8 LICENSE="BSD"
pankso@18 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pascal@21278 10 WEB_SITE="https://www.php.net/"
slaxemulator@14614 11 WGET_URL="http://www.php.net/distributions/$TARBALL"
pascal@1315 12 PROVIDE="php:lighttpd"
pankso@16079 13 #HOST_ARCH="i486 arm"
pankso@18 14
pankso@9864 15 DEPENDS="php-common lighttpd zlib libxml2 sqlite libssl"
pankso@9859 16 BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev libmysqlclient mysql-dev \
pankso@9859 17 net-snmp-dev postgresql-dev gettext openssl-dev apache-dev apr-util-dev \
pankso@9859 18 c-client mhash-dev libpng-dev libunixODBC unixODBC-dev openldap-dev \
pankso@9859 19 libldap apr-dev libmcrypt-dev curl-dev cyrus-sasl-dev perl pkg-config \
pascal@15630 20 jpeg-dev net-snmp-dev libvpx-dev apache coreutils-conditions sed re2c"
pankso@9859 21
pankso@16079 22 case "$ARCH" in
pankso@16079 23 i?86)
pankso@16079 24 ARCH_ARGS="\
pankso@16079 25 --prefix=/usr \
pankso@16079 26 --sysconfdir=/etc \
pankso@16079 27 --infodir=/usr/share/info \
pankso@16079 28 --mandir=/usr/share/man \
pankso@16079 29 --enable-mbstring \
pankso@16079 30 --enable-sockets \
pankso@16079 31 --enable-ftp \
pankso@16079 32 --enable-zip \
pankso@16079 33 --enable-calendar \
pankso@16079 34 --enable-exif \
pankso@16079 35 --config-cache \
pankso@16079 36 --enable-dba=shared \
pankso@16079 37 --with-config-file-path=/etc \
pankso@16079 38 --with-zlib \
pankso@16079 39 --with-gettext \
pankso@16079 40 --with-mcrypt=shared,/usr \
pankso@16079 41 --with-mysql=shared,/usr \
pankso@16079 42 --with-mysqli=shared \
erjo@16732 43 --with-mysql-sock=/var/run/mysqld/mysql.sock \
pankso@16079 44 --with-pdo-sqlite=shared,/usr \
pankso@16079 45 --with-pgsql=shared,/usr \
pankso@16079 46 --with-snmp=shared,/usr \
pankso@16079 47 --enable-soap=shared,/usr \
pankso@16079 48 --with-ldap=shared \
pankso@16079 49 --with-imap=shared \
pankso@16079 50 --with-imap-ssl \
pankso@16079 51 --with-mhash \
pankso@16079 52 --with-gd=shared \
pankso@16079 53 --with-jpeg-dir=/usr \
pankso@16079 54 --with-png-dir=/usr \
pankso@16079 55 --with-vpx-dir=/usr \
pankso@16079 56 --with-openssl=shared \
pankso@16079 57 --with-unixODBC=shared,/usr \
pankso@16079 58 --with-pear=/usr/share/php \
pankso@16079 59 --with-pdo-mysql=shared \
pankso@16079 60 --with-pdo-pgsql=shared \
pankso@16079 61 --with-curl=shared \
pankso@16079 62 --with-sqlite3=shared,/usr \
pascal@16101 63 --enable-maintainer-zts" ;;
pankso@16079 64 arm*)
pankso@16079 65 BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev curl-dev"
pankso@16079 66 ARCH_ARGS="\
pankso@16079 67 --prefix=/usr \
pankso@16079 68 --sysconfdir=/etc \
pankso@16079 69 --infodir=/usr/share/info \
pankso@16079 70 --mandir=/usr/share/man \
pankso@16079 71 --config-cache \
pankso@16079 72 --enable-mbstring \
pankso@16079 73 --enable-sockets \
pankso@16079 74 --enable-ftp \
pankso@16079 75 --enable-zip \
pankso@16079 76 --enable-calendar \
pankso@16079 77 --enable-exif \
pankso@16079 78 --enable-dba=shared \
pankso@16079 79 --enable-sqlite-utf8 \
pankso@16079 80 --with-mhash \
pankso@16079 81 --with-sqlite=shared \
pankso@16079 82 --with-config-file-path=/etc \
pankso@16079 83 --with-zlib \
pankso@16079 84 --with-gettext \
pankso@16079 85 --with-curl=shared \
pankso@16079 86 --with-openssl=shared \
pankso@16079 87 --with-jpeg-dir=/usr \
pankso@16079 88 --with-png-dir=/usr \
pankso@16079 89 --with-apxs2=/usr/bin/apxs" ;;
pankso@16079 90 esac
pankso@16079 91
pankso@18 92 # Rules to configure and make the package.
pankso@18 93 compile_rules()
pankso@18 94 {
pascal@21419 95 sed -i 's|IMG_FMT_I420|VPX_&|;s|PLANE_|VPX_&|' ext/gd/libgd/webpimg.c
pascal@2605 96 sed -i 's/pam_start/pam_nostart/' configure
pascal@16101 97 ./configure $ARCH_ARGS $CONFIGURE_ARGS && \
slaxemulator@14614 98 make $MAKEFLAGS && make -j1 INSTALL_ROOT=$DESTDIR install
pankso@16079 99 ./configure $ARCH_ARGS $CONFIGURE_ARGS --with-apxs2=/usr/bin/apxs && \
gokhlayeh@11574 100 make $MAKEFLAGS && {
pankso@9862 101 mkdir -p $DESTDIR/etc/apache
pankso@9862 102 cp /etc/apache/httpd.conf $DESTDIR/etc/apache/httpd.conf
slaxemulator@14614 103 make -j1 INSTALL_ROOT=$DESTDIR install
pascal@1315 104 }
erjo@13052 105 # Production config file.
pankso@10819 106 mkdir -p $DESTDIR/etc
erjo@13052 107 cp $src/php.ini-production $DESTDIR/etc/php.ini || exit 1
slaxemulator@10549 108 sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \
slaxemulator@10549 109 -i $DESTDIR/etc/php.ini
pankso@18 110 }
pankso@18 111
pankso@18 112 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@18 113 genpkg_rules()
pankso@18 114 {
pankso@10819 115 mkdir -p $fs/usr/bin $fs/usr/share/php
pankso@18 116 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin
pankso@18 117 }
pankso@18 118
slaxemulator@14614 119 # Post and pre install commands to stop
slaxemulator@14614 120 # and restart Web server if needed.
pankso@18 121 pre_install()
pankso@18 122 {
slaxemulator@14614 123 if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then
pankso@18 124 /etc/init.d/lighttpd stop
pankso@18 125 fi
pankso@18 126 }
pankso@9861 127
pankso@18 128 post_install()
pankso@18 129 {
pascal@1143 130 # Enable php
pascal@18730 131 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@18730 132 [ -f "$1/usr/lib/lighttpd/mod_fastcgi.so" ] || \
pascal@18730 133 tazpkg get-install lighttpd-modules --root="$1/"
pascal@1143 134 sed -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \
pascal@1143 135 -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \
pascal@1143 136 -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \
pascal@18730 137 -i "$1/etc/lighttpd/lighttpd.conf"
pascal@18730 138 grep -q mod_fastcgi "$1/etc/lighttpd/lighttpd.conf" || \
pascal@1143 139 sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \
pascal@18730 140 -i "$1/etc/lighttpd/lighttpd.conf"
pascal@18730 141 grep -q php3 "$1/etc/lighttpd/lighttpd.conf" || \
pascal@1635 142 sed -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \
pascal@18730 143 -i "$1/etc/lighttpd/lighttpd.conf"
pascal@1143 144 fi
pankso@18 145 # Start Web server.
pascal@15149 146 if [ -z "$1" -a ! -f /var/run/lighttpd.pid \
pascal@15149 147 -a -f /etc/init.d/lighttpd ]; then
pankso@18 148 /etc/init.d/lighttpd start
pankso@18 149 fi
pankso@18 150 }