archrelease: copy trunk to community-any
[ArchLinux/community.git] / age-plugin-yubikey / trunk / PKGBUILD
blob0a4490444f0a0ebfcc5d48ade7e3d7b7e62156db
1 # Maintainer: Caleb Maclennan <caleb@alerque.com>
2 # Contributor: Daniel Peukert <daniel@peukert.cc>
4 pkgname=age-plugin-yubikey
5 pkgver=0.4.0
6 pkgrel=1
7 pkgdesc='Yubikey plugin for age'
8 arch=(x86_64 i686 arm armv6h armv7h aarch64)
9 url="https://github.com/str4d/$pkgname"
10 license=(Apache MIT)
11 depends=(pcsclite)
12 makedepends=(cargo)
13 optdepends=('age: for use with age'
14             'rust-rage: for use with rage')
15 _archive="$pkgname-$pkgver"
16 source=("$url/archive/v$pkgver/$_archive.tar.gz")
17 sha256sums=('721c2fd08fe8b7228ea43398475b954a8f0bc259b3a152f6f3b0dc66022df55e')
19 prepare() {
20         cd "$_archive"
21         cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
24 build() {
25         cd "$_archive"
26         cargo build --frozen --release --all-features
29 check() {
30         cd "$_archive"
31         cargo test --frozen --all-features
34 package() {
35         cd "$_archive"
36         install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
37         install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE-MIT