# Description: Cryptographic library for embedded systems # URL: https://www.trustedfirmware.org/projects/mbed-tls/ # Maintainer: Tim Biermann, tbier at posteo dot de # Depends on: python3-jsonschema python3-jinja2 name=mbedtls version=4.0.0 release=1 _framework=457996474728cb8e968ed21953b72f74d2f536b2 _tfpsacrypto=609a7064cbf8b325fe2579476f69d66ffad9d106 source=(https://github.com/ARMmbed/mbedtls/archive/v$version/$name-$version.tar.gz https://github.com/Mbed-TLS/mbedtls-framework/archive/$_framework/mbedtls-framework-$_framework.tar.gz https://github.com/Mbed-TLS/TF-PSA-Crypto/archive/$_tfpsacrypto/TF-PSA-Crypto-$_tfpsacrypto.zip) build() { rm -rf $name-$version/{framework,tf-psa-crypto} cp -r mbedtls-framework-$_framework $name-$version/framework mv TF-PSA-Crypto-$_tfpsacrypto $name-$version/tf-psa-crypto rm -rf $name-$version/tf-psa-crypto/framework cp -r mbedtls-framework-$_framework $name-$version/tf-psa-crypto/framework ls $name-$version/tf-psa-crypto cmake -S $name-$version -B build -G Ninja \ -D CMAKE_INSTALL_PREFIX=/usr \ -D CMAKE_INSTALL_LIBDIR=lib \ -D CMAKE_BUILD_TYPE=Release \ -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \ -D USE_SHARED_MBEDTLS_LIBRARY=ON \ -D USE_STATIC_MBEDTLS_LIBRARY=ON \ -D INSTALL_MBEDTLS_HEADERS=ON \ -D MBEDTLS_FATAL_WARNINGS=OFF \ -D ENABLE_TESTING=OFF \ -Wno-dev cmake --build build DESTDIR=$PKG cmake --install build }