wok annotate php/receipt @ rev 14626

Up: cups to 1.6.2.
author Christopher Rogers <slaxemulator@gmail.com>
date Sat Jun 01 12:06:52 2013 +0000 (2013-06-01)
parents f9732678756f
children 7f6b04cd013a
rev   line source
pankso@18 1 # SliTaz package receipt.
pankso@18 2
pankso@18 3 PACKAGE="php"
slaxemulator@14614 4 VERSION="5.4.13"
pankso@204 5 CATEGORY="development"
pankso@18 6 SHORT_DESC="PHP web programming language."
pankso@18 7 MAINTAINER="pankso@slitaz.org"
pankso@18 8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pankso@18 9 WEB_SITE="http://www.php.net/"
slaxemulator@14614 10 WGET_URL="http://www.php.net/distributions/$TARBALL"
pascal@1315 11 PROVIDE="php:lighttpd"
pankso@18 12
pankso@9864 13 DEPENDS="php-common lighttpd zlib libxml2 sqlite libssl"
pankso@9859 14 BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev libmysqlclient mysql-dev \
pankso@9859 15 net-snmp-dev postgresql-dev gettext openssl-dev apache-dev apr-util-dev \
pankso@9859 16 c-client mhash-dev libpng-dev libunixODBC unixODBC-dev openldap-dev \
pankso@9859 17 libldap apr-dev libmcrypt-dev curl-dev cyrus-sasl-dev perl pkg-config \
slaxemulator@14614 18 jpeg-dev net-snmp-dev libvpx-dev apache"
pankso@9859 19
pankso@18 20 # Rules to configure and make the package.
pankso@18 21 compile_rules()
pankso@18 22 {
pankso@18 23 cd $src
pascal@1315 24 COMMON_ARGS="\
pascal@1315 25 --prefix=/usr \
pascal@1315 26 --sysconfdir=/etc \
pascal@1315 27 --infodir=/usr/share/info \
pascal@1315 28 --mandir=/usr/share/man \
pascal@1315 29 --enable-mbstring \
pascal@3239 30 --enable-sockets \
pascal@3767 31 --enable-ftp \
pascal@3767 32 --enable-zip \
pascal@3767 33 --enable-calendar \
pascal@3767 34 --enable-exif \
slaxemulator@14614 35 --config-cache \
pascal@3768 36 --enable-dba=shared \
pascal@1315 37 --with-config-file-path=/etc \
pascal@1315 38 --with-zlib \
pascal@1315 39 --with-gettext \
erjo@4407 40 --with-mcrypt=shared,/usr \
pascal@1324 41 --with-mysql=shared,/usr \
pankso@11658 42 --with-mysqli=shared \
erjo@13461 43 --with-mysql-sock=/var/mysql/mysql.sock \
slaxemulator@14614 44 --with-pdo-sqlite=shared,/usr \
pascal@1324 45 --with-pgsql=shared,/usr \
pascal@3230 46 --with-snmp=shared,/usr \
pascal@7740 47 --enable-soap=shared,/usr \
pascal@1315 48 --with-ldap=shared \
pascal@1324 49 --with-imap=shared --with-imap-ssl \
slaxemulator@14614 50 --with-mhash \
pascal@1326 51 --with-gd=shared \
pascal@3729 52 --with-jpeg-dir=/usr \
pascal@3729 53 --with-png-dir=/usr \
slaxemulator@14614 54 --with-vpx-dir=/usr \
erjo@2671 55 --with-openssl=shared \
pascal@1832 56 --with-unixODBC=shared,/usr \
pascal@1779 57 --with-pear=/usr/share/php \
pankso@4427 58 --with-pdo-mysql=shared \
pankso@4427 59 --with-pdo-pgsql=shared \
jozee@5520 60 --with-curl=shared \
slaxemulator@14614 61 --enable-sqlite-utf8 \
slaxemulator@14614 62 --with-sqlite3=shared,/usr \
slaxemulator@14614 63 --with-sqlite=shared \
pascal@1779 64 "
pascal@2605 65 sed -i 's/pam_start/pam_nostart/' configure
slaxemulator@14614 66 ./configure $COMMON_ARGS $CONFIGURE_ARGS && \
slaxemulator@14614 67 make $MAKEFLAGS && make -j1 INSTALL_ROOT=$DESTDIR install
slaxemulator@14614 68 ./configure $COMMON_ARGS $CONFIGURE_ARGS --with-apxs2=/usr/bin/apxs && \
gokhlayeh@11574 69 make $MAKEFLAGS && {
pankso@9862 70 mkdir -p $DESTDIR/etc/apache
pankso@9862 71 cp /etc/apache/httpd.conf $DESTDIR/etc/apache/httpd.conf
slaxemulator@14614 72 make -j1 INSTALL_ROOT=$DESTDIR install
pascal@1315 73 }
erjo@13052 74 # Production config file.
pankso@10819 75 mkdir -p $DESTDIR/etc
erjo@13052 76 cp $src/php.ini-production $DESTDIR/etc/php.ini || exit 1
slaxemulator@10549 77 sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \
slaxemulator@10549 78 -i $DESTDIR/etc/php.ini
pankso@18 79 }
pankso@18 80
pankso@18 81 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@18 82 genpkg_rules()
pankso@18 83 {
pankso@10819 84 mkdir -p $fs/usr/bin $fs/usr/share/php
pankso@18 85 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin
pankso@18 86 }
pankso@18 87
slaxemulator@14614 88 # Post and pre install commands to stop
slaxemulator@14614 89 # and restart Web server if needed.
pankso@18 90 pre_install()
pankso@18 91 {
slaxemulator@14614 92 if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then
pankso@18 93 /etc/init.d/lighttpd stop
pankso@18 94 fi
pankso@18 95 }
pankso@9861 96
pankso@18 97 post_install()
pankso@18 98 {
pascal@1143 99 # Enable php
pascal@1143 100 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
pascal@1143 101 [ -f $1/usr/lib/lighttpd/mod_fastcgi.so ] || \
pascal@1143 102 tazpkg get-install lighttpd-modules --root=$1/
pascal@1143 103 sed -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \
pascal@1143 104 -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \
pascal@1143 105 -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \
pascal@1143 106 -i $1/etc/lighttpd/lighttpd.conf
pascal@1143 107 grep -q mod_fastcgi $1/etc/lighttpd/lighttpd.conf || \
pascal@1143 108 sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \
pascal@1143 109 -i $1/etc/lighttpd/lighttpd.conf
pascal@1349 110 grep -q php3 $1/etc/lighttpd/lighttpd.conf || \
pascal@1635 111 sed -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \
pascal@1583 112 -i $1/etc/lighttpd/lighttpd.conf
pascal@1143 113 fi
pankso@18 114 # Start Web server.
pascal@1137 115 if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then
pankso@18 116 /etc/init.d/lighttpd start
pankso@18 117 fi
pankso@18 118 }