blob: 21abcbfa5d02d6f46302343006f9d36885a2ccb4 (
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
45
46
47
|
# Maintainer: Dominik Nakamura <dnaka91@gmail.com>
# https://github.com/dnaka91/pkgbuilds
pkgname=otti
pkgver=0.2.7
pkgrel=2
pkgdesc="The one-time password manager for the terminal, with interactive and fancy TUI"
arch=('aarch64' 'i686' 'x86_64')
url="https://github.com/dnaka91/otti"
license=('AGPL-3.0-only')
depends=('gcc-libs')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
b2sums=('4dffb7c6564622a227a32cbf0dc435d20f5a5c699f5ddb0f8f46df972cbc08732f9ad91f474ba69e00b738daa9a9bd1589fd2e58ff06dbbba6000942c9f39c46')
prepare() {
cd "$pkgname-$pkgver"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}
check() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}
package() {
cd "$pkgname-$pkgver"
install -Dm 755 target/release/"$pkgname" -t "$pkgdir"/usr/bin
install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"
install -Dm 644 README.md -t "$pkgdir"/usr/share/doc/"$pkgname"
install -dm 755 "$pkgdir"/usr/share/{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}/
./target/release/"$pkgname" completions bash > "$pkgdir"/usr/share/bash-completion/completions/"$pkgname"
./target/release/"$pkgname" completions fish > "$pkgdir"/usr/share/fish/vendor_completions.d/"$pkgname".fish
./target/release/"$pkgname" completions zsh > "$pkgdir"/usr/share/zsh/site-functions/_"$pkgname"
install -dm 755 "$pkgdir"/usr/share/man/man1/
./target/release/"$pkgname" manpages "$pkgdir"/usr/share/man/man1
}
|