blob: 79e806f36d8d429a5d9cdee8ff2886d8c8722e6a (
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
40
41
42
43
44
|
# Maintainer: Thorben Günther <echo YWRtaW5AeGVucm94Lm5ldAo= | base64 -d>
pkgname=steamguard-cli
pkgver=0.4.5
pkgrel=1
pkgdesc="A linux utility for generating 2FA codes for Steam and managing Steam trade confirmations."
arch=('x86_64')
url='https://github.com/dyc3/steamguard-cli'
license=('GPL3')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::https://github.com/dyc3/$pkgname/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('d31f5b5915b02191802cf83f2417717b8f5238cb9698027ec7bd5ab1516cb472')
options=(!lto)
prepare() {
cd "$srcdir/$pkgname-$pkgver"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$srcdir/$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
# completion
"target/release/$pkgname" completion --shell bash > "$srcdir/$pkgname-$pkgver/$pkgname"
"target/release/$pkgname" completion --shell zsh > "$srcdir/$pkgname-$pkgver/_$pkgname"
}
check() {
cd "$srcdir/$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}
package() {
cd "$srcdir/$pkgname-$pkgver"
# NOTE: Install as steamguard, otherwise completions won't work
install -Dm0755 "target/release/$pkgname" "$pkgdir/usr/bin/steamguard"
install -Dm0644 -t "$pkgdir/usr/share/bash-completion/completions/" "$pkgname"
install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions/" "_$pkgname"
}
|