# Contributor: Holger Jaekel # Maintainer: pkgname=aws-c-http pkgver=0.7.11 pkgrel=1 pkgdesc="AWS C99 implementation of the HTTP/1.1 and HTTP/2 specifications" url="https://github.com/awslabs/aws-c-http" # s390x: aws-c-common # arm*, ppc64le: aws-c-io arch="all !armhf !armv7 !ppc64le !s390x" license="Apache-2.0" makedepends=" aws-c-cal-dev aws-c-common-dev aws-c-compression-dev aws-c-io-dev cmake s2n-tls-dev samurai " subpackages="$pkgname-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/awslabs/aws-c-http/archive/refs/tags/v$pkgver.tar.gz" options="net" # needed for tests to get connections 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() { timeout 600 \ 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-http } sha512sums=" c6c30f50a25306e536742802fa75002a62e44a6569de7272468546679d8f85e170c885e5eb1f873145d9ac01b37b668860a26df97bf1315f4a01e9f1e44cf2b8 aws-c-http-0.7.11.tar.gz "