# Contributor: Leo # Maintainer: Will Sinatra pkgname=libfido2 pkgver=1.8.0 pkgrel=2 pkgdesc="library for FIDO 2.0 functionality" url="https://github.com/Yubico/libfido2" arch="all" license="BSD-2-Clause" makedepends="cmake libcbor-dev openssl1.1-compat-dev zlib-dev eudev-dev linux-headers" 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 \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=None \ $CMAKE_CROSSOPTS . cmake --build build } check() { cd build CTEST_OUTPUT_ON_FAILURE=TRUE ctest } 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=" dbea52a80068323e9945ef7a6e93ab1438bc4347390fc91694a94669900d4ce4abe95e1b6df90fe8b6b2dde6b5d28d9dc0c6b022c24ccb661f28c30c33417999 libfido2-1.8.0.tar.gz "