# Arch contribution https://www.archlinux.org/packages/community/x86_64/mbedtls/ pkgname=mbedtls pkgver=2.2.1 pkgrel=1 pkgdesc="Portable cryptographic and SSL/TLS library, aka polarssl" arch=('x86_64') url="https://tls.mbed.org" license=('Apache') depends=('glibc') options=('staticlibs') source=("https://tls.mbed.org/download/mbedtls-$pkgver-gpl.tgz") sha256sums=('bb1bffa3ac5ab143be2aae3d45a7a92b36112888ef465024d83724865fe62974') prepare() { cd "$pkgname-$pkgver" # enable flags for non-embedded systems sed -i 's|//\(#define MBEDTLS_THREADING_C\)|\1|' include/mbedtls/config.h sed -i 's|//\(#define MBEDTLS_THREADING_PTHREAD\)|\1|' include/mbedtls/config.h } build() { cd "$pkgname-$pkgver" LDFLAGS+=" -I../include " make SHARED=1 no_test } check() { cd "$pkgname-$pkgver" make SHARED=1 check } package() { cd "$pkgname-$pkgver" make DESTDIR="$pkgdir/usr" install }