mbedtls: use new termux_git_clone_src function, specify git branch

This commit is contained in:
Henrik Grimler 2020-07-17 14:18:16 +02:00
parent efb56e7e2e
commit eb84d04e21

View File

@ -1,7 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://tls.mbed.org/
TERMUX_PKG_DESCRIPTION="Light-weight cryptographic and SSL/TLS library"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_SRCURL=https://github.com/ARMmbed/mbedtls.git
TERMUX_PKG_VERSION=2.22.0
TERMUX_PKG_GIT_BRANCH=mbedtls-$TERMUX_PKG_VERSION
TERMUX_PKG_BREAKS="mbedtls-dev"
TERMUX_PKG_REPLACES="mbedtls-dev"
@ -11,24 +13,3 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DENABLE_TESTING=OFF
-DENABLE_PROGRAMS=OFF
"
termux_step_extract_package() {
local CHECKED_OUT_FOLDER=$TERMUX_PKG_CACHEDIR/checkout-$TERMUX_PKG_VERSION
if [ ! -d $CHECKED_OUT_FOLDER ]; then
local TMP_CHECKOUT=$TERMUX_PKG_TMPDIR/tmp-checkout
rm -Rf $TMP_CHECKOUT
mkdir -p $TMP_CHECKOUT
git clone --depth 1 \
--branch mbedtls-$TERMUX_PKG_VERSION \
https://github.com/ARMmbed/mbedtls.git \
$TMP_CHECKOUT
cd $TMP_CHECKOUT
git submodule update --init # --depth 1
mv $TMP_CHECKOUT $CHECKED_OUT_FOLDER
fi
mkdir $TERMUX_PKG_SRCDIR
cd $TERMUX_PKG_SRCDIR
cp -Rf $CHECKED_OUT_FOLDER/* .
}