termux-packages/packages/mbedtls/build.sh

36 lines
970 B
Bash
Raw Normal View History

2018-08-09 23:33:57 +02:00
TERMUX_PKG_HOMEPAGE=https://tls.mbed.org/
TERMUX_PKG_DESCRIPTION="Light-weight cryptographic and SSL/TLS library"
2019-01-21 13:53:58 +01:00
TERMUX_PKG_LICENSE="Apache-2.0"
2020-01-18 13:15:31 +01:00
TERMUX_PKG_VERSION=2.20.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_BREAKS="mbedtls-dev"
TERMUX_PKG_REPLACES="mbedtls-dev"
2019-12-21 19:32:59 +01:00
2018-08-09 23:33:57 +02:00
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DUSE_STATIC_MBEDTLS_LIBRARY=OFF
2018-08-09 23:33:57 +02:00
-DUSE_SHARED_MBEDTLS_LIBRARY=ON
-DENABLE_TESTING=OFF
-DENABLE_PROGRAMS=OFF
"
2019-12-21 19:32:59 +01:00
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/* .
}