svn: /pear/ci/phpfarm/trunk/src/ compile.sh

From: Date: Sat, 15 Aug 2009 09:13:55 +0000
Subject: svn: /pear/ci/phpfarm/trunk/src/ compile.sh
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-57144@lists.php.net to get a copy of this message
cweiske Sat, 15 Aug 2009 09:13:55 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=287317 Log: compilation and installation works so far Changed paths: U pear/ci/phpfarm/trunk/src/compile.sh Modified: pear/ci/phpfarm/trunk/src/compile.sh =================================================================== --- pear/ci/phpfarm/trunk/src/compile.sh 2009-08-15 08:56:33 UTC (rev 287316) +++ pear/ci/phpfarm/trunk/src/compile.sh 2009-08-15 09:13:55 UTC (rev 287317) @@ -1,7 +1,9 @@ -#!/bin/sh +#!/bin/bash version=$1 #directory of this file. all php srces are extrated in it basedir="dirname "$0"" +cd "$basedir" +basedir=pwd #directory of php sources of specific version srcdir="php-$version" #directory with source archives @@ -10,10 +12,9 @@ instbasedir="$basedir/../inst" #directory this specific version gets installed into instdir="$instbasedir/php-$version" +#directory where all bins are symlinked +shbindir="$instbasedir/bin" - -cd "$basedir" - #we need a php version if [ "x$version" = 'x' ]; then echo 'Please specify php version' @@ -36,19 +37,48 @@ fi -source 'options.sh' +source 'options.sh' $version cd "$srcdir" #configuring #TODO: do not configure when config.nice exists ./configure \ --prefix="$instdir" \ --exec-prefix="$instdir" \ - --program-suffix="$version" \ + --program-suffix="-$version" \ --enable-debug \ --disable-short-tags \ + --without-pear \ $configoptions -#TODO: source other options -#TODO: check if configure worked -#TODO: make -#TODO: make test + +if [ $? -gt 0 ]; then + echo configure.sh failed. + exit 3 +fi + +#compile sources +#make clean +make + +if [ "$?" -gt 0 ]; then + echo make failed. + exit 4 +fi + #TODO: make install +make install +if [ "$?" -gt 0 ]; then + echo make install failed. + exit 5 +fi + +#create bin +[ ! -d "$shbindir" ] && mkdir "$shbindir" +if [ ! -d "$shbindir" ]; then + echo "Cannot create shared bin dir" + exit 6 +fi +#symlink all files +ln -s "$instdir/bin/php-$version" "$shbindir/" +ln -s "$instdir/bin/php-cgi-$version" "$shbindir/" +ln -s "$instdir/bin/php-config-$version" "$shbindir/" +ln -s "$instdir/bin/phpize-$version" "$shbindir/"

« previous php.pear.cvs (#57144) next »