summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c48b908759c5aa988bdf7796326a09822a831ca8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Maintainer: Karol Babioch <karol@babioch.de

pkgname=libfido2-git
_pkgname=${pkgname%-git}
pkgver=1.3.0.r108.daeb325
pkgrel=1
pkgdesc="Provides library functionality for FIDO 2.0, including communication with a device over USB"
arch=('x86_64')
url="https://developers.yubico.com/libfido2/"
license=('BSD')
depends=('openssl' 'libcbor' 'hidapi')
makedepends=('git' 'cmake')
conflicts=('libfido2')
source=("git+https://github.com/Yubico/libfido2.git")
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/${_pkgname}"
    git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir/${_pkgname}"
  mkdir build
}

build() {
    cd "$srcdir/${_pkgname}/build"
    cmake .. \
       -DCMAKE_INSTALL_PREFIX=/usr \
       -DCMAKE_INSTALL_LIBDIR=lib
    make
}

package() {
    cd "$srcdir/${_pkgname}/build"
    make DESTDIR="$pkgdir/" install
    install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}