desktop/mbedtls/PKGBUILD
2017-01-14 13:39:12 +00:00

36 lines
906 B
Bash

# Arch contribution https://www.archlinux.org/packages/community/x86_64/mbedtls/
pkgname=mbedtls
pkgver=2.4.0
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=('80eff0e0028f969355d6e34ffdd3dbf4eb2a9367b07ff2f3f70e6d75beee9e3f')
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
}