# Contributor: Leo # Maintainer: Will Sinatra pkgname=libfido2 pkgver=1.13.0 pkgrel=1 pkgdesc="library for FIDO 2.0 functionality" url="https://github.com/Yubico/libfido2" arch="all" license="BSD-2-Clause" install="$pkgname.pre-install" makedepends="cmake libcbor-dev openssl-dev>3 zlib-dev eudev-dev linux-headers samurai" subpackages="$pkgname-dev $pkgname-doc fido2:fido" source="$pkgname-$pkgver.tar.gz::https://github.com/Yubico/libfido2/archive/refs/tags/$pkgver.tar.gz" build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi cmake -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=MinSizeRel \ $CMAKE_CROSSOPTS . cmake --build build } check() { cd build CTEST_OUTPUT_ON_FAILURE=TRUE ctest -j4 } package() { DESTDIR="$pkgdir" cmake --install build install -Dm644 -t "$pkgdir"/lib/udev/rules.d/ "$builddir"/udev/70-u2f.rules } fido() { pkgdesc="commandline utilities for FIDO 2.0" amove usr/bin } sha512sums=" 90f8452cee4c9cc72241478e697c5c692ccff5ab27752f2f296c3623ee297d1f80a85a359b4d0656c67790084c116aac921894e762eb52d3a79056e5014c03e7 libfido2-1.13.0.tar.gz "