From bdcd66a9ecd44e6612a21c9eb4a616b07d8ab34e Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 15 Jun 2022 00:56:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=8F=E5=B0=91=E5=AE=89=E8=A3=85=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit php需要的库,转移到php插件安装过程中。 --- plugins/php/lib/freetype_new.sh | 25 ++++++++++++++++++++++++ plugins/php/lib/freetype_old.sh | 25 ++++++++++++++++++++++++ plugins/php/lib/libiconv.sh | 25 ++++++++++++++++++++++++ plugins/php/lib/libzip.sh | 31 ++++++++++++++++++++++++++++++ plugins/php/versions/52/install.sh | 3 +++ plugins/php/versions/53/install.sh | 3 +++ plugins/php/versions/54/install.sh | 3 +++ plugins/php/versions/55/install.sh | 3 +++ plugins/php/versions/56/install.sh | 3 +++ plugins/php/versions/70/install.sh | 3 +++ plugins/php/versions/71/install.sh | 3 +++ plugins/php/versions/72/install.sh | 3 +++ plugins/php/versions/73/install.sh | 3 +++ plugins/php/versions/74/install.sh | 3 +++ plugins/php/versions/80/install.sh | 3 +++ scripts/lib.sh | 12 ++++++------ 16 files changed, 145 insertions(+), 6 deletions(-) create mode 100644 plugins/php/lib/freetype_new.sh create mode 100644 plugins/php/lib/freetype_old.sh create mode 100644 plugins/php/lib/libiconv.sh create mode 100644 plugins/php/lib/libzip.sh diff --git a/plugins/php/lib/freetype_new.sh b/plugins/php/lib/freetype_new.sh new file mode 100644 index 000000000..ab8890ec6 --- /dev/null +++ b/plugins/php/lib/freetype_new.sh @@ -0,0 +1,25 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") + +# echo $rootPath + +SERVER_ROOT=$rootPath/lib +SOURCE_ROOT=$rootPath/source/lib + +if [ ! -d ${SERVER_ROOT}/freetype ];then + cd $SOURCE_ROOT + wget -O freetype-2.12.1.tar.gz --no-check-certificate https://download.savannah.gnu.org/releases/freetype/freetype-2.12.1.tar.gz -T 5 + tar zxvf freetype-2.12.1.tar.gz + cd freetype-2.12.1 + ./configure --prefix=${SERVER_ROOT}/freetype_old && make && make install + cd $SOURCE_ROOT + rm -rf freetype-2.12.1.tar.gz + rm -rf freetype-2.12.1 +fi \ No newline at end of file diff --git a/plugins/php/lib/freetype_old.sh b/plugins/php/lib/freetype_old.sh new file mode 100644 index 000000000..9f7d210c4 --- /dev/null +++ b/plugins/php/lib/freetype_old.sh @@ -0,0 +1,25 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") + +# echo $rootPath + +SERVER_ROOT=$rootPath/lib +SOURCE_ROOT=$rootPath/source/lib + +if [ ! -d ${SERVER_ROOT}/freetype_old ];then + cd $SOURCE_ROOT + wget -O freetype-2.7.1.tar.gz --no-check-certificate https://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.gz -T 5 + tar zxvf freetype-2.7.1.tar.gz + cd freetype-2.7.1 + ./configure --prefix=${SERVER_ROOT}/freetype_old && make && make install + cd $SOURCE_ROOT + rm -rf freetype-2.7.1.tar.gz + rm -rf freetype-2.7.1 +fi \ No newline at end of file diff --git a/plugins/php/lib/libiconv.sh b/plugins/php/lib/libiconv.sh new file mode 100644 index 000000000..263f09d86 --- /dev/null +++ b/plugins/php/lib/libiconv.sh @@ -0,0 +1,25 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") + +# echo $rootPath + +SERVER_ROOT=$rootPath/lib +SOURCE_ROOT=$rootPath/source/lib + +if [ ! -d ${SERVER_ROOT}/libiconv ];then + cd $SOURCE_ROOT + wget -O libiconv-1.15.tar.gz https://github.com/midoks/mdserver-web/releases/download/init/libiconv-1.15.tar.gz -T 5 + tar zxvf libiconv-1.15.tar.gz + cd libiconv-1.15 + ./configure --prefix=${SERVER_ROOT}/libiconv --enable-static + cd $SOURCE_ROOT + rm -rf libiconv-1.15 + rm -rf libiconv-1.15.tar.gz +fi \ No newline at end of file diff --git a/plugins/php/lib/libzip.sh b/plugins/php/lib/libzip.sh new file mode 100644 index 000000000..751998975 --- /dev/null +++ b/plugins/php/lib/libzip.sh @@ -0,0 +1,31 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") +rootPath=$(dirname "$rootPath") + +# echo $rootPath + +SERVER_ROOT=$rootPath/lib +SOURCE_ROOT=$rootPath/source/lib + +if [ ! -d ${SERVER_ROOT}/libiconv ];then + + cd $SOURCE_ROOT + if [ ! -f ${SOURCE_ROOT}/libzip-1.3.2.tar.gz ];then + wget -O libzip-1.3.2.tar.gz --no-check-certificate https://nih.at/libzip/libzip-1.3.2.tar.gz -T 20 + fi + + tar -zxvf libzip-1.3.2.tar.gz + cd libzip-1.3.2 + + ./configure --prefix=${SERVER_ROOT}/libzip && make && make install + + cd $SOURCE_ROOT + rm -rf libiconv-1.15 + rm -rf libiconv-1.15.tar.gz +fi \ No newline at end of file diff --git a/plugins/php/versions/52/install.sh b/plugins/php/versions/52/install.sh index bbd58b40d..3cc528f7a 100755 --- a/plugins/php/versions/52/install.sh +++ b/plugins/php/versions/52/install.sh @@ -20,6 +20,9 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_old.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh + if [ ! -d $sourcePath/php/php${PHP_VER} ];then if [ ! -f $sourcePath/php/php-${version}.tar.gz ];then wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.gz https://museum.php.net/php5/php-${version}.tar.gz diff --git a/plugins/php/versions/53/install.sh b/plugins/php/versions/53/install.sh index 3d2241ed1..084699a9f 100755 --- a/plugins/php/versions/53/install.sh +++ b/plugins/php/versions/53/install.sh @@ -20,6 +20,9 @@ echo "安装php-5.3.29 ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_old.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh + if [ ! -d $sourcePath/php/php${PHP_VER} ];then if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://museum.php.net/php5/php-${version}.tar.xz diff --git a/plugins/php/versions/54/install.sh b/plugins/php/versions/54/install.sh index db50b5a50..2c32a47e3 100755 --- a/plugins/php/versions/54/install.sh +++ b/plugins/php/versions/54/install.sh @@ -20,6 +20,9 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_old.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh + if [ ! -d $sourcePath/php/php${PHP_VER} ];then if [ ! -f $sourcePath/php/php-${version}.tar.gz ];then wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.gz https://museum.php.net/php5/php-${version}.tar.gz diff --git a/plugins/php/versions/55/install.sh b/plugins/php/versions/55/install.sh index b9a2348fc..0c9948eb9 100755 --- a/plugins/php/versions/55/install.sh +++ b/plugins/php/versions/55/install.sh @@ -19,6 +19,9 @@ echo "安装php-5.5.38 ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_old.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh + if [ ! -d $sourcePath/php/php${PHP_VER} ];then if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://museum.php.net/php5/php-${version}.tar.xz diff --git a/plugins/php/versions/56/install.sh b/plugins/php/versions/56/install.sh index 616fda475..67f94402b 100755 --- a/plugins/php/versions/56/install.sh +++ b/plugins/php/versions/56/install.sh @@ -19,6 +19,9 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_old.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh + if [ ! -d $sourcePath/php/php${PHP_VER} ];then if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://museum.php.net/php5/php-${version}.tar.xz diff --git a/plugins/php/versions/70/install.sh b/plugins/php/versions/70/install.sh index 79299c390..7a3cd08f9 100755 --- a/plugins/php/versions/70/install.sh +++ b/plugins/php/versions/70/install.sh @@ -19,6 +19,9 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_old.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh + if [ ! -d $sourcePath/php/php${PHP_VER} ];then if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz http://au1.php.net/distributions/php-${version}.tar.xz diff --git a/plugins/php/versions/71/install.sh b/plugins/php/versions/71/install.sh index 748400c51..760faf8c8 100755 --- a/plugins/php/versions/71/install.sh +++ b/plugins/php/versions/71/install.sh @@ -19,6 +19,9 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_old.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh + if [ ! -d $sourcePath/php/php${PHP_VER} ];then if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://museum.php.net/php7/php-${version}.tar.xz diff --git a/plugins/php/versions/72/install.sh b/plugins/php/versions/72/install.sh index 2ade06987..2b08744d2 100755 --- a/plugins/php/versions/72/install.sh +++ b/plugins/php/versions/72/install.sh @@ -20,6 +20,9 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_old.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh + if [ ! -d $sourcePath/php/php${PHP_VER} ];then if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then wget --no-check-certificate -O $sourcePath/php/php-${version}.tar.xz https://museum.php.net/php7/php-${version}.tar.xz diff --git a/plugins/php/versions/73/install.sh b/plugins/php/versions/73/install.sh index 7c77a26bd..88d314fad 100755 --- a/plugins/php/versions/73/install.sh +++ b/plugins/php/versions/73/install.sh @@ -20,6 +20,9 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_old.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh + if [ ! -d $sourcePath/php/php${PHP_VER} ];then if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then diff --git a/plugins/php/versions/74/install.sh b/plugins/php/versions/74/install.sh index 91a41a411..987f15011 100755 --- a/plugins/php/versions/74/install.sh +++ b/plugins/php/versions/74/install.sh @@ -20,6 +20,9 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_new.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh + if [ ! -d $sourcePath/php/php${PHP_VER} ];then if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then diff --git a/plugins/php/versions/80/install.sh b/plugins/php/versions/80/install.sh index 2c90eef01..b523da667 100755 --- a/plugins/php/versions/80/install.sh +++ b/plugins/php/versions/80/install.sh @@ -20,6 +20,9 @@ echo "安装php-${version} ..." > $install_tmp mkdir -p $sourcePath/php mkdir -p $serverPath/php +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash freetype_new.sh +cd $serverPath/mdserver-web/plugins/php/lib && /bin/bash libiconv.sh + if [ ! -d $sourcePath/php/php${PHP_VER} ];then if [ ! -f $sourcePath/php/php-${version}.tar.xz ];then diff --git a/scripts/lib.sh b/scripts/lib.sh index 63f10ff77..bc0c5bacf 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -75,7 +75,7 @@ if [ ! -d ${libPath}/libiconv ];then make && make install cd ${sourcePath} rm -rf libiconv-1.15 - rm -f libiconv-1.15.tar.gz + rm -rf libiconv-1.15.tar.gz fi echo -e "Install_Libiconv" >> ${libPath}/lib.pl #----------------------------- libiconv end -------------------------# @@ -93,7 +93,7 @@ if [ ! -d ${libPath}/freetype_old ];then make && make install cd ${sourcePath} rm -rf freetype-2.7.1.tar.gz - rm -f freetype-2.7.1.tar.gz + rm -rf freetype-2.7.1 fi echo -e "Install_Freetype_Old" >> ${libPath}/lib.pl #----------------------------- freetype end -------------------------# @@ -352,17 +352,17 @@ fi ##### common start ##### -Install_Libiconv +# Install_Libiconv # Install_Libmemcached # Install_Curl # Install_Zlib -Install_Freetype -Install_Freetype_New +# Install_Freetype +# Install_Freetype_New # Install_OpenSSL -Install_Libzip +# Install_Libzip ##### common end #####