wok-backports rev 32
Add: php & Update to 5.5.13
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Mon Jun 02 00:34:32 2014 +0200 (2014-06-02) |
parents | b9a46ac57039 |
children | e3d54049dca5 |
files | php/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/php/receipt Mon Jun 02 00:34:32 2014 +0200 1.3 @@ -0,0 +1,150 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="php" 1.7 +VERSION="5.5.13" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="PHP web programming language." 1.10 +MAINTAINER="pankso@slitaz.org" 1.11 +LICENSE="BSD" 1.12 +TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.13 +WEB_SITE="http://www.php.net/" 1.14 +WGET_URL="http://www.php.net/distributions/$TARBALL" 1.15 +PROVIDE="php:lighttpd" 1.16 +#HOST_ARCH="i486 arm" 1.17 + 1.18 +DEPENDS="php-common lighttpd zlib libxml2 sqlite libssl" 1.19 +BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev libmariadbclient mariadb-dev \ 1.20 +net-snmp-dev postgresql-dev gettext openssl-dev apache-dev apr-util-dev \ 1.21 +c-client mhash-dev libpng-dev libunixODBC unixODBC-dev openldap-dev \ 1.22 +libldap apr-dev libmcrypt-dev curl-dev cyrus-sasl-dev perl pkg-config \ 1.23 +jpeg-dev net-snmp-dev libvpx-dev apache coreutils-conditions sed re2c libtool openssl-dev" 1.24 + 1.25 +case "$ARCH" in 1.26 + i?86) 1.27 + ARCH_ARGS="\ 1.28 + --prefix=/usr \ 1.29 + --sysconfdir=/etc \ 1.30 + --infodir=/usr/share/info \ 1.31 + --mandir=/usr/share/man \ 1.32 + --enable-mbstring \ 1.33 + --enable-sockets \ 1.34 + --enable-ftp \ 1.35 + --enable-zip \ 1.36 + --enable-calendar \ 1.37 + --enable-exif \ 1.38 + --config-cache \ 1.39 + --enable-dba=shared \ 1.40 + --with-config-file-path=/etc \ 1.41 + --with-zlib \ 1.42 + --with-gettext \ 1.43 + --with-mcrypt=shared,/usr \ 1.44 + --with-mysql=shared,/usr \ 1.45 + --with-mysqli=shared \ 1.46 + --with-mysql-sock=/var/run/mysqld/mysql.sock \ 1.47 + --with-pdo-sqlite=shared,/usr \ 1.48 + --with-pgsql=shared,/usr \ 1.49 + --with-snmp=shared,/usr \ 1.50 + --enable-soap=shared,/usr \ 1.51 + --with-ldap=shared \ 1.52 + --with-imap=shared \ 1.53 + --with-imap-ssl \ 1.54 + --with-mhash \ 1.55 + --with-gd=shared \ 1.56 + --with-jpeg-dir=/usr \ 1.57 + --with-png-dir=/usr \ 1.58 + --with-vpx-dir=/usr \ 1.59 + --with-openssl=shared \ 1.60 + --with-unixODBC=shared,/usr \ 1.61 + --with-pear=/usr/share/php \ 1.62 + --with-pdo-mysql=shared \ 1.63 + --with-pdo-pgsql=shared \ 1.64 + --with-curl=shared \ 1.65 + --with-apc=shared \ 1.66 + --with-sqlite3=shared,/usr \ 1.67 + --enable-maintainer-zts" ;; 1.68 + arm*) 1.69 + BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev curl-dev" 1.70 + ARCH_ARGS="\ 1.71 + --prefix=/usr \ 1.72 + --sysconfdir=/etc \ 1.73 + --infodir=/usr/share/info \ 1.74 + --mandir=/usr/share/man \ 1.75 + --config-cache \ 1.76 + --enable-mbstring \ 1.77 + --enable-sockets \ 1.78 + --enable-ftp \ 1.79 + --enable-zip \ 1.80 + --enable-calendar \ 1.81 + --enable-exif \ 1.82 + --enable-dba=shared \ 1.83 + --enable-sqlite-utf8 \ 1.84 + --with-mhash \ 1.85 + --with-sqlite=shared \ 1.86 + --with-config-file-path=/etc \ 1.87 + --with-zlib \ 1.88 + --with-gettext \ 1.89 + --with-curl=shared \ 1.90 + --with-openssl=shared \ 1.91 + --with-jpeg-dir=/usr \ 1.92 + --with-png-dir=/usr \ 1.93 + --with-apxs2=/usr/bin/apxs" ;; 1.94 +esac 1.95 + 1.96 +# Rules to configure and make the package. 1.97 +compile_rules() 1.98 +{ 1.99 + sed -i 's/pam_start/pam_nostart/' configure 1.100 + ./configure $ARCH_ARGS $CONFIGURE_ARGS && \ 1.101 + make $MAKEFLAGS && make -j1 INSTALL_ROOT=$DESTDIR install 1.102 + ./configure $ARCH_ARGS $CONFIGURE_ARGS --with-apxs2=/usr/bin/apxs && \ 1.103 + make $MAKEFLAGS && { 1.104 + mkdir -p $DESTDIR/etc/apache 1.105 + cp /etc/apache/httpd.conf $DESTDIR/etc/apache/httpd.conf 1.106 + make -j1 INSTALL_ROOT=$DESTDIR install 1.107 + } 1.108 + # Production config file. 1.109 + mkdir -p $DESTDIR/etc 1.110 + cp $src/php.ini-production $DESTDIR/etc/php.ini || exit 1 1.111 + sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \ 1.112 + -i $DESTDIR/etc/php.ini 1.113 +} 1.114 + 1.115 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.116 +genpkg_rules() 1.117 +{ 1.118 + mkdir -p $fs/usr/bin $fs/usr/share/php 1.119 + cp -a $src/sapi/cgi/php-cgi $fs/usr/bin 1.120 +} 1.121 + 1.122 +# Post and pre install commands to stop 1.123 +# and restart Web server if needed. 1.124 +pre_install() 1.125 +{ 1.126 + if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then 1.127 + /etc/init.d/lighttpd stop 1.128 + fi 1.129 +} 1.130 + 1.131 +post_install() 1.132 +{ 1.133 + # Enable php 1.134 + if [ -f $1/etc/lighttpd/lighttpd.conf ]; then 1.135 + [ -f $1/usr/lib/lighttpd/mod_fastcgi.so ] || \ 1.136 + tazpkg get-install lighttpd-modules --root=$1/ 1.137 + sed -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \ 1.138 + -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \ 1.139 + -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \ 1.140 + -i $1/etc/lighttpd/lighttpd.conf 1.141 + grep -q mod_fastcgi $1/etc/lighttpd/lighttpd.conf || \ 1.142 + sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \ 1.143 + -i $1/etc/lighttpd/lighttpd.conf 1.144 + grep -q php3 $1/etc/lighttpd/lighttpd.conf || \ 1.145 + sed -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \ 1.146 + -i $1/etc/lighttpd/lighttpd.conf 1.147 + fi 1.148 + # Start Web server. 1.149 + if [ -z "$1" -a ! -f /var/run/lighttpd.pid \ 1.150 + -a -f /etc/init.d/lighttpd ]; then 1.151 + /etc/init.d/lighttpd start 1.152 + fi 1.153 +}