# Contributor: Holger Jaekel # Maintainer: pkgname=aws-c-cal pkgver=0.6.1 pkgrel=1 pkgdesc="AWS Crypto Abstraction Layer: Cross-Platform, C99 wrapper for cryptography primitives" url="https://github.com/awslabs/aws-c-cal" # s390x: aws-c-common arch="all !s390x" license="Apache-2.0" makedepends=" aws-c-common-dev cmake openssl-dev samurai " subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/awslabs/aws-c-cal/archive/refs/tags/v$pkgver.tar.gz" build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi CFLAGS="$CFLAGS -flto=auto" \ CXXFLAGS="$CXXFLAGS -flto=auto" \ cmake -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=/usr/lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=None \ -DBUILD_TESTING="$(want_check && echo ON || echo OFF)" \ $CMAKE_CROSSOPTS cmake --build build } check() { ctest --test-dir build --output-on-failure -j${JOBS:-2} } package() { DESTDIR="$pkgdir" cmake --install build # just test binaries # shellcheck disable=2115 rm -rf "$pkgdir"/usr/bin/ } dev() { default_dev amove usr/lib/aws-c-cal } sha512sums=" 3f0b3f85faa857b00af81c3339c8016f50d2ce9e2fa4d2a7be079feb40fc37ab1589d7dbbca2813416bb2c175ccf66dbe4718f2ce42909a507432cfb19133ec6 aws-c-cal-0.6.1.tar.gz "