wok-next diff php/receipt @ rev 1143
Add php-mysql
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jul 25 08:39:27 2008 +0000 (2008-07-25) |
parents | 10710b8535bc |
children | 443dbfefc6bf |
line diff
1.1 --- a/php/receipt Thu Jul 24 12:27:06 2008 +0000 1.2 +++ b/php/receipt Fri Jul 25 08:39:27 2008 +0000 1.3 @@ -6,7 +6,7 @@ 1.4 SHORT_DESC="PHP web programming language." 1.5 MAINTAINER="pankso@slitaz.org" 1.6 DEPENDS="lighttpd zlib libxml2 sqlite" 1.7 -BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev" 1.8 +BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev mysql-dev" 1.9 TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.10 WEB_SITE="http://www.php.net/" 1.11 WGET_URL="http://us2.php.net/distributions/$TARBALL" 1.12 @@ -26,9 +26,11 @@ 1.13 --enable-mbstring \ 1.14 --with-config-file-path=/etc \ 1.15 --with-zlib \ 1.16 + --with-mysql=shared,usr \ 1.17 --disable-cli \ 1.18 $CONFIGURE_ARGS 1.19 make 1.20 + make INSTALL_ROOT=$PWD/_pkg install 1.21 } 1.22 1.23 # Rules to gen a SliTaz package suitable for Tazpkg. 1.24 @@ -38,15 +40,19 @@ 1.25 cp -a $src/sapi/cgi/php-cgi $fs/usr/bin 1.26 # Recommended config file and phpinfo. 1.27 cp $src/php.ini-recommended $fs/etc/php.ini 1.28 + sed -e 's|extension_dir = "./"|extension_dir = "/usr/share/php/"|' \ 1.29 + -i $fs/etc/php.ini 1.30 cp -a stuff/phpinfo $fs/usr/share 1.31 + for i in $(cd $WOK; ls -d php-*) 1.32 + do 1.33 + tazwok cook $i 1.34 + done 1.35 } 1.36 1.37 # Post and pre install commans to stop 1.38 # and restart Web server if needed. 1.39 pre_install() 1.40 { 1.41 - local root 1.42 - root=$1 1.43 if [ -f "$1/var/run/lighttpd.pid" ]; then 1.44 /etc/init.d/lighttpd stop 1.45 fi 1.46 @@ -65,6 +71,18 @@ 1.47 mv -f $1/etc/php.ini.bak $1/etc/php.ini 1.48 status 1.49 fi 1.50 + # Enable php 1.51 + if [ -f $1/etc/lighttpd/lighttpd.conf ]; then 1.52 + [ -f $1/usr/lib/lighttpd/mod_fastcgi.so ] || \ 1.53 + tazpkg get-install lighttpd-modules --root=$1/ 1.54 + sed -e 's|#fastcgi.server = ( ".php"|fastcgi.server = ( ".php"|' \ 1.55 + -e 's|#"bin-path" => "/usr/bin/php-cgi"|"bin-path" => "/usr/bin/php-cgi"|' \ 1.56 + -e 's|#"socket" => "/tmp/php.socket"|"socket" => "/tmp/php.socket"\n )))|' \ 1.57 + -i $1/etc/lighttpd/lighttpd.conf 1.58 + grep -q mod_fastcgi $1/etc/lighttpd/lighttpd.conf || \ 1.59 + sed -e 's|server.modules = (|server.modules = (\n "mod_fastcgi",|' \ 1.60 + -i $1/etc/lighttpd/lighttpd.conf 1.61 + fi 1.62 # Start Web server. 1.63 if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then 1.64 /etc/init.d/lighttpd start