From b2506fd950bb7723cd7459d5c5d3e774c008d648 Mon Sep 17 00:00:00 2001 From: shimun Date: Thu, 3 Sep 2020 14:17:26 +0200 Subject: [PATCH] detect current version --- PKGBUILD | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..4b0bf5a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,24 @@ +# Maintainer: shimunn +pkgname=fido2luks +pkgver=0.2.12 +pkgrel=1 +makedepends=('rust' 'cargo' 'cryptsetup' 'clang') +depends=('cryptsetup') +arch=('i686' 'x86_64' 'armv6h' 'armv7h') +pkgdesc="Decrypt your LUKS partition using a FIDO2 compatible authenticator" +url="https://github.com/shimunn/fido2luks" +license=('MPL-2.0') + +pkgver() { + # Use tag version if possible otherwise concat project version and git ref + git describe --exact-match --tags HEAD 2> /dev/null || \ + echo "$(cargo pkgid | cut -d':' -f3).$(git describe --always)" +} + +build() { + cargo build --release --locked --all-features --target-dir=target +} + +package() { + install -Dm 755 target/release/${pkgname} -t "${pkgdir}/usr/bin" +}