From b88b0d360d918908cdfd21ffb1d2edf97524b945 Mon Sep 17 00:00:00 2001 From: chengkan Date: Thu, 31 Aug 2023 16:50:50 +0800 Subject: [PATCH] modify openldap Signed-off-by: chengkan --- thirdparty/openldap/HPKBUILD | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/thirdparty/openldap/HPKBUILD b/thirdparty/openldap/HPKBUILD index fabfd127..0927580a 100644 --- a/thirdparty/openldap/HPKBUILD +++ b/thirdparty/openldap/HPKBUILD @@ -12,17 +12,43 @@ makedepends=() source="https://mirror-hk.koddos.net/OpenLDAP/$pkgname-release/$pkgname-$pkgver.tgz" -autounpack=true -downloadpackage=true +autounpack=false +downloadpackage=false buildtools="configure" patchflag=true builddir=$pkgname-${pkgver} packagename=$builddir.tgz +downloadsouce=true +ispackageunzip=true + source envset.sh host= prepare() { + if [ -s $packagename ]; then + if $ispackageunzip; then + ispackageunzip=false + echo $packagename",存在" + tar -xvf $packagename > /dev/null + fi + else + # 本地无法验证官网的CA证书,导致本地不能下载,这里使用不校验的方式下载源码包 + if $downloadsouce; then + res=0 + curl -f -L -k $source > $packagename + res=$? + + if [ $res -ne 0 ]; then + echo "download $source fail" + return $res + fi + tar -xvf $packagename > /dev/null + ispackageunzip=false + downloadsouce=false + fi + fi + if $patchflag then cd $builddir -- Gitee