Add mbedtls for tls support on Linux
This commit is contained in:
parent
93719c1a54
commit
45a49a0a52
1 changed files with 28 additions and 0 deletions
28
scripts.d/50-mbedtls.sh
Executable file
28
scripts.d/50-mbedtls.sh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
MBEDTLS_REPO="https://github.com/ARMmbed/mbedtls.git"
|
||||||
|
# HEAD of development_2.x
|
||||||
|
MBEDTLS_COMMIT="766edb847696c6e0755b0e07b7161ccb9a33c948"
|
||||||
|
|
||||||
|
ffbuild_enabled() {
|
||||||
|
[[ $TARGET == win* ]] && return -1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ffbuild_dockerbuild() {
|
||||||
|
git-mini-clone "$MBEDTLS_REPO" "$MBEDTLS_COMMIT" mbedtls
|
||||||
|
cd mbedtls
|
||||||
|
|
||||||
|
mkdir build && cd build
|
||||||
|
|
||||||
|
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
|
||||||
|
-DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF \
|
||||||
|
-DUSE_STATIC_MBEDTLS_LIBRARY=ON -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DINSTALL_MBEDTLS_HEADERS=ON \
|
||||||
|
..
|
||||||
|
make -j$(nproc)
|
||||||
|
make install
|
||||||
|
}
|
||||||
|
|
||||||
|
ffbuild_configure() {
|
||||||
|
echo --enable-mbedtls
|
||||||
|
}
|
Loading…
Reference in a new issue