wok-6.x annotate php/receipt @ rev 20018

Add pixiewps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Aug 11 18:07:57 2017 +0200 (2017-08-11)
parents 1a1b4f47c3d1
children ccb0caebef6f
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"
pankso@18 10 WEB_SITE="http://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@2605 95 sed -i 's/pam_start/pam_nostart/' configure
pascal@16101 96 ./configure $ARCH_ARGS $CONFIGURE_ARGS && \
slaxemulator@14614 97 make $MAKEFLAGS && make -j1 INSTALL_ROOT=$DESTDIR install
pankso@16079 98 ./configure $ARCH_ARGS $CONFIGURE_ARGS --with-apxs2=/usr/bin/apxs && \
gokhlayeh@11574 99 make $MAKEFLAGS && {
pankso@9862 100 mkdir -p $DESTDIR/etc/apache
pankso@9862 101 cp /etc/apache/httpd.conf $DESTDIR/etc/apache/httpd.conf
slaxemulator@14614 102 make -j1 INSTALL_ROOT=$DESTDIR install
pascal@1315 103 }
erjo@13052 104 # Production config file.
pankso@10819 105 mkdir -p $DESTDIR/etc
erjo@13052 106 cp $src/php.ini-production $DESTDIR/etc/php.ini || exit 1
slaxemulator@10549 107 sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \
slaxemulator@10549 108 -i $DESTDIR/etc/php.ini
pankso@18 109 }
pankso@18 110
pankso@18 111 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@18 112 genpkg_rules()
pankso@18 113 {
pankso@10819 114 mkdir -p $fs/usr/bin $fs/usr/share/php
pankso@18 115 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin
pankso@18 116 }
pankso@18 117
slaxemulator@14614 118 # Post and pre install commands to stop
slaxemulator@14614 119 # and restart Web server if needed.
pankso@18 120 pre_install()
pankso@18 121 {
slaxemulator@14614 122 if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then
pankso@18 123 /etc/init.d/lighttpd stop
pankso@18 124 fi
pankso@18 125 }
pankso@9861 126
pankso@18 127 post_install()
pankso@18 128 {
pascal@1143 129 # Enable php
pascal@18730 130 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@18730 131 [ -f "$1/usr/lib/lighttpd/mod_fastcgi.so" ] || \
pascal@18730 132 tazpkg get-install lighttpd-modules --root="$1/"
pascal@1143 133 sed -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \
pascal@1143 134 -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \
pascal@1143 135 -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \
pascal@18730 136 -i "$1/etc/lighttpd/lighttpd.conf"
pascal@18730 137 grep -q mod_fastcgi "$1/etc/lighttpd/lighttpd.conf" || \
pascal@1143 138 sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \
pascal@18730 139 -i "$1/etc/lighttpd/lighttpd.conf"
pascal@18730 140 grep -q php3 "$1/etc/lighttpd/lighttpd.conf" || \
pascal@1635 141 sed -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \
pascal@18730 142 -i "$1/etc/lighttpd/lighttpd.conf"
pascal@1143 143 fi
pankso@18 144 # Start Web server.
pascal@15149 145 if [ -z "$1" -a ! -f /var/run/lighttpd.pid \
pascal@15149 146 -a -f /etc/init.d/lighttpd ]; then
pankso@18 147 /etc/init.d/lighttpd start
pankso@18 148 fi
pankso@18 149 }