wok annotate php-cherokee/receipt @ rev 15181

First receipt for php-cherokee
author Stanislas Leduc <stanislas.leduc@balinor.net>
date Wed Aug 21 13:52:26 2013 +0200 (2013-08-21)
parents
children 78cb1e930abd
rev   line source
stanislas@15181 1 # SliTaz package receipt.
stanislas@15181 2
stanislas@15181 3 PACKAGE="php-cherokee"
stanislas@15181 4 VERSION="5.4.13"
stanislas@15181 5 CATEGORY="development"
stanislas@15181 6 SHORT_DESC="PHP module for cherokee."
stanislas@15181 7 MAINTAINER="shann@slitaz.org"
stanislas@15181 8 DEPENDS="php-common cherokee libxml2 zlib"
stanislas@15181 9 WEB_SITE="http://www.php.net/"
stanislas@15181 10 WANTED="php"
stanislas@15181 11 PROVIDE="php:cherokee"
stanislas@15181 12
stanislas@15181 13 # Rules to gen a SliTaz package suitable for Tazpkg.
stanislas@15181 14 genpkg_rules()
stanislas@15181 15 {
stanislas@15181 16 mkdir -p $fs/usr/bin $fs/usr/share/php
stanislas@15181 17 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin
stanislas@15181 18 }
stanislas@15181 19
stanislas@15181 20 # Post and pre install commands to stop
stanislas@15181 21 # and restart Web server if needed.
stanislas@15181 22 pre_install()
stanislas@15181 23 {
stanislas@15181 24 if [ -z "$1" -a ! -f "/var/run/cherokee.pid" ]; then
stanislas@15181 25 /etc/init.d/cherokee stop
stanislas@15181 26 fi
stanislas@15181 27 }
stanislas@15181 28
stanislas@15181 29 post_install()
stanislas@15181 30 {
stanislas@15181 31 # Enable php
stanislas@15181 32 # if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
stanislas@15181 33 # [ -f $1/usr/lib/lighttpd/mod_fastcgi.so ] || \
stanislas@15181 34 # tazpkg get-install lighttpd-modules --root=$1/
stanislas@15181 35 # sed -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \
stanislas@15181 36 # -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \
stanislas@15181 37 # -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \
stanislas@15181 38 # -i $1/etc/lighttpd/lighttpd.conf
stanislas@15181 39 # grep -q mod_fastcgi $1/etc/lighttpd/lighttpd.conf || \
stanislas@15181 40 # sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \
stanislas@15181 41 # -i $1/etc/lighttpd/lighttpd.conf
stanislas@15181 42 # grep -q php3 $1/etc/lighttpd/lighttpd.conf || \
stanislas@15181 43 # sed -e 's|for PHP.*|for PHP.\nfastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )|' \
stanislas@15181 44 # -i $1/etc/lighttpd/lighttpd.conf
stanislas@15181 45 # fi
stanislas@15181 46
stanislas@15181 47
stanislas@15181 48 # Start Web server.
stanislas@15181 49 if [ -z "$1" -a ! -f /var/run/cherokee.pid \
stanislas@15181 50 -a -f /etc/init.d/cherokee ]; then
stanislas@15181 51 /etc/init.d/cherokee start
stanislas@15181 52 fi
stanislas@15181 53 }