From 4a8c51dfd7a4d43c68df20bc6c92049534015f6e Mon Sep 17 00:00:00 2001 From: longfeng Date: Mon, 17 Feb 2025 11:34:38 +0800 Subject: [PATCH] add openssl-3.4.0 Signed-off-by: longfeng --- thirdparty/openssl-3.4.0/HPKBUILD | 102 +++++++++++++++++++++ thirdparty/openssl-3.4.0/README.OpenSource | 11 +++ thirdparty/openssl-3.4.0/SHA512SUM | 1 + 3 files changed, 114 insertions(+) create mode 100644 thirdparty/openssl-3.4.0/HPKBUILD create mode 100644 thirdparty/openssl-3.4.0/README.OpenSource create mode 100644 thirdparty/openssl-3.4.0/SHA512SUM diff --git a/thirdparty/openssl-3.4.0/HPKBUILD b/thirdparty/openssl-3.4.0/HPKBUILD new file mode 100644 index 00000000..7b0f4f96 --- /dev/null +++ b/thirdparty/openssl-3.4.0/HPKBUILD @@ -0,0 +1,102 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Contributor: Feng Long +# Maintainer: Feng Long + +pkgname=openssl-3.4.0 +pkgver=3.4.0 +pkgrel=0 +pkgdesc="OpenSSL is a robust, commercial-grade, full-featured Open Source Toolkit for the Transport Layer Security (TLS) protocol formerly known as the Secure Sockets Layer (SSL) protocol." +url="https://www.openssl.org/" +archs=("arm64-v8a" "x86_64") +license=("OpenSSL License","Original SSLeay License") +depends=() +makedepends=() + +# 官方下载地址https://github.com/openssl/openssl/release/download/$pkgname/$pkgname.tar.gz受网络影响可能存在下载失败的情况,现使用gitee镜像可以与官方仓库保持同步 +source="https://gitee.com/mirrors/openssl/repository/archive/$pkgname.tar.gz" + +autounpack=true +downloadpackage=true +buildtools="configure" + +builddir=openssl-${pkgname} +packagename=$builddir.tar.gz + +source envset.sh + +host= +prepare() { + unset MAKE + mkdir -p $builddir/$ARCH-build + if [ $ARCH == "armeabi-v7a" ] + then + setarm32ENV + host=linux-generic32 + elif [ $ARCH == "arm64-v8a" ] + then + setarm64ENV + host=linux-aarch64 + elif [ $ARCH == "x86_64" ] + then + setx86_64ENV + host=linux-x86_64 + else + echo "${ARCH} not support" + return -1 + fi +} + +#参数1 +build() { + cd $builddir/$ARCH-build + ../Configure "$@" $host no-shared > `pwd`/build.log 2>&1 + make -j4 >> `pwd`/build.log 2>&1 + ret=$? + cd $OLDPWD + return $ret +} + +package() { + cd $builddir/$ARCH-build + make install >> `pwd`/build.log 2>&1 + cd $OLDPWD +} + +check() { + cd $builddir/$ARCH-build + make depend >> `pwd`/build.log 2>&1 + cd $OLDPWD + unset host + if [ $ARCH == "armeabi-v7a" ] + then + unsetarm32ENV + elif [ $ARCH == "arm64-v8a" ] + then + unsetarm64ENV + elif [ $ARCH == "x86_64" ] + then + unsetx86_64ENV + else + echo "${ARCH} not support" + return -1 + fi + echo "The test must be on an OpenHarmony device!" +} + +# 清理环境 +cleanbuild() { + rm -rf ${PWD}/$builddir ${PWD}/$packagename +} + diff --git a/thirdparty/openssl-3.4.0/README.OpenSource b/thirdparty/openssl-3.4.0/README.OpenSource new file mode 100644 index 00000000..b006cb85 --- /dev/null +++ b/thirdparty/openssl-3.4.0/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "openssl", + "License": "OpenSSL License and Original SSLeay License", + "License File": "https://www.openssl.org/source/license-openssl-ssleay.txt", + "Version Number": "3.4.0", + "Owner": "xiafeng@huawei.com", + "Upstream URL": "https://gitee.com/mirrors/openssl/repository/archive/openssl-3.4.0.tar.gz", + "Description": "OpenSSL is a robust, commercial-grade, full-featured Open Source Toolkit for the Transport Layer Security (TLS) protocol formerly known as the Secure Sockets Layer (SSL) protocol." + } +] diff --git a/thirdparty/openssl-3.4.0/SHA512SUM b/thirdparty/openssl-3.4.0/SHA512SUM new file mode 100644 index 00000000..87870ed4 --- /dev/null +++ b/thirdparty/openssl-3.4.0/SHA512SUM @@ -0,0 +1 @@ +66e6b79bb0227cb1c8b337f769ccca4b44b1ad909752187e7049d29d8c72492c037af6e599b16c747f21f11e0ab6875e94817808eb86d7b7a50e8de9cef845cf openssl-openssl-3.4.0.tar.gz -- Gitee