diff --git a/plugins/php/all_test.sh b/plugins/php/all_test.sh new file mode 100644 index 000000000..5b9ae13b5 --- /dev/null +++ b/plugins/php/all_test.sh @@ -0,0 +1,20 @@ +#! /bin/sh +export PATH=$PATH:/opt/local/bin:/opt/local/sbin:/opt/local/share/man:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin +DIR=$(cd "$(dirname "$0")"; pwd) + + +PHP_VER=53 +echo "php${PHP_VER} -- start" +cmd_ext=$(ls -l $DIR/versions/$PHP_VER/ |awk '{print $9}') +cd $DIR/versions/$PHP_VER && sh install.sh +for ii in $cmd_ext +do + if [ "install.sh" == "$ii" ];then + echo '' + else + cd $DIR/versions/$PHP_VER && /bin/bash $ii install $PHP_VER + fi +done +echo "php${PHP_VER} -- end" + + diff --git a/plugins/php/versions/53/apc.sh b/plugins/php/versions/53/apc.sh index 12fea1fc4..9ec03d7da 100755 --- a/plugins/php/versions/53/apc.sh +++ b/plugins/php/versions/53/apc.sh @@ -28,14 +28,16 @@ Install_lib() if [ ! -f "$extFile" ];then + _LIBNAME=$(echo $LIBNAME | tr '[a-z]' '[A-Z]') php_lib=$sourcePath/php_lib mkdir -p $php_lib + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${_LIBNAME}-${LIBV}.tgz + cd $php_lib + tar xvf ${LIBNAME}-${LIBV}.tgz + fi + cd $php_lib/${LIBNAME}-${LIBV} - _LIBNAME=$(echo $LIBNAME | tr '[a-z]' '[A-Z]') - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${_LIBNAME}-${LIBV}.tgz - - cd $php_lib && tar xvf ${LIBNAME}-${LIBV}.tgz - cd ${LIBNAME}-${LIBV} $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config make && make install && make clean diff --git a/plugins/php/versions/53/install.sh b/plugins/php/versions/53/install.sh index d2f316e6f..069f4c10a 100755 --- a/plugins/php/versions/53/install.sh +++ b/plugins/php/versions/53/install.sh @@ -10,6 +10,8 @@ sourcePath=${serverPath}/source sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl +echo $rootPath + Install_php() { #------------------------ install start ------------------------------------# diff --git a/plugins/php/versions/72/swoole.sh b/plugins/php/versions/72/swoole.sh index 5485b69ed..00bb4db45 100755 --- a/plugins/php/versions/72/swoole.sh +++ b/plugins/php/versions/72/swoole.sh @@ -31,17 +31,21 @@ Install_lib() if [ ! -f "$extFile" ];then php_lib=$sourcePath/php_lib + mkdir -p $php_lib - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - cd ${LIBNAME}-${LIBV} + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + cd $php_lib + tar xvf ${LIBNAME}-${LIBV}.tgz + fi + cd $php_lib/${LIBNAME}-${LIBV} $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-openssl --with-openssl-dir=$serverPath/lib/openssl --enable-sockets + --enable-openssl \ + --with-openssl-dir=$serverPath/lib/openssl \ + --enable-sockets make && make install && make clean - fi while [[ ! -f "$extFile" ]]; diff --git a/plugins/php/versions/74/swoole.sh b/plugins/php/versions/74/swoole.sh index 39e5d92a2..392a1ad96 100755 --- a/plugins/php/versions/74/swoole.sh +++ b/plugins/php/versions/74/swoole.sh @@ -32,14 +32,17 @@ Install_lib() php_lib=$sourcePath/php_lib mkdir -p $php_lib - wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz - cd $php_lib - tar xvf ${LIBNAME}-${LIBV}.tgz - cd ${LIBNAME}-${LIBV} + if [ ! -f $php_lib/${LIBNAME}-${LIBV}.tgz ];then + wget -O $php_lib/${LIBNAME}-${LIBV}.tgz http://pecl.php.net/get/${LIBNAME}-${LIBV}.tgz + cd $php_lib + tar xvf ${LIBNAME}-${LIBV}.tgz + fi + cd $php_lib/${LIBNAME}-${LIBV} $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config \ - --enable-openssl --with-openssl-dir=$serverPath/lib/openssl --enable-sockets + --enable-openssl --with-openssl-dir=$serverPath/lib/openssl \ + --enable-sockets make && make install && make clean fi