wok-6.x diff php/receipt @ rev 123

Set BUILD_DEPENDS for gnome-icon-theme
author Christophe Lincoln <pankso@slitaz.org>
date Sat Jan 05 23:54:27 2008 +0100 (2008-01-05)
parents
children 4959e5789caa
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/php/receipt	Sat Jan 05 23:54:27 2008 +0100
     1.3 @@ -0,0 +1,77 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="php"
     1.7 +VERSION="5.2.4"
     1.8 +CATEGORY="extra"
     1.9 +SHORT_DESC="PHP web programming language."
    1.10 +MAINTAINER="pankso@slitaz.org"
    1.11 +DEPENDS="lighttpd"
    1.12 +TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.13 +WEB_SITE="http://www.php.net/"
    1.14 +WGET_URL="http://us2.php.net/distributions/$TARBALL"
    1.15 +
    1.16 +# Rules to configure and make the package.
    1.17 +compile_rules()
    1.18 +{
    1.19 +	cd $src
    1.20 +	./configure --prefix=/usr --sysconfdir=/etc \
    1.21 +	--infodir=/usr/share/info --mandir=/usr/share/man \
    1.22 +	$CONFIGURE_ARGS \
    1.23 +	--enable-fastcgi \
    1.24 +	--enable-discard-path \
    1.25 +	--enable-force-cgi-redirect \
    1.26 +	--enable-mbstring \
    1.27 +	--with-config-file-path=/etc \
    1.28 +	--with-zlib \
    1.29 +	--disable-cli
    1.30 +	# to get a 2 Mb php-cgi binary.
    1.31 +	#
    1.32 +	#--disable-libxml \
    1.33 +	#--disable-all
    1.34 +	make
    1.35 +}
    1.36 +
    1.37 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.38 +genpkg_rules()
    1.39 +{
    1.40 +	mkdir -p $fs/usr/bin $fs/etc $fs/usr/share
    1.41 +	cp -a $src/sapi/cgi/php-cgi $fs/usr/bin
    1.42 +	strip -s $fs/usr/bin/*
    1.43 +	# Recommended config file, phpinfo and pixmaps.
    1.44 +	cp $src/php.ini-recommended $fs/etc/php.ini
    1.45 +	cp -a stuff/phpinfo $fs/usr/share
    1.46 +	cp -a stuff/pixmaps $fs/usr/share
    1.47 +}
    1.48 +
    1.49 +# Post and pre install commans to stop
    1.50 +# and restart Web server if needed.
    1.51 +pre_install()
    1.52 +{
    1.53 +	local root
    1.54 +	root=$1
    1.55 +	if [ -f "$1/var/run/lighttpd.pid" ]; then
    1.56 +		/etc/init.d/lighttpd stop
    1.57 +	fi
    1.58 +	# Backup existing php.ini
    1.59 +	if [ -f "$1/etc/php.ini" ]; then
    1.60 +		echo -n "Creating php.ini backup..."
    1.61 +		cp $1/etc/php.ini $1/etc/php.ini.bak
    1.62 +		status
    1.63 +	fi
    1.64 +}
    1.65 +post_install()
    1.66 +{
    1.67 +	local root
    1.68 +	root=$1
    1.69 +	# Restore original php.ini
    1.70 +	if [ -f "$1/etc/php.ini.bak" ]; then
    1.71 +		echo -n "Restoring php.ini backup..."
    1.72 +		mv -f $1/etc/php.ini.bak $1/etc/php.ini 
    1.73 +		status
    1.74 +	fi
    1.75 +	# Start Web server.
    1.76 +	if [ ! -f "/var/run/lighttpd.pid" ]; then
    1.77 +		/etc/init.d/lighttpd start
    1.78 +	fi
    1.79 +}
    1.80 +