summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6cc6892879fdae189063ce83410f8602efdc492a (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
# Maintainer: iamawacko <iamawacko@protonmail.com>
pkgname=kipr
pkgver=0.4.1
pkgrel=1
pkgdesc='Command Line Password Manager'
url='https://github.com/grahamking/kipr'
license=('MIT')
arch=('any')
source=("https://github.com/grahamking/kipr/archive/refs/tags/v${pkgver}.tar.gz")
makedepends=(cargo)
depends=("gnupg")
optdepends=('xclip: Clipoard functionality')
sha256sums=('cf0640d82e1b88da0d8cf04a5cea61c5953b99bbf5123602adfac62612cecb82')

prepare() {
	cd "$pkgname-$pkgver"
	cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
	cd "$pkgname-$pkgver"
	export RUSTUP_TOOLCHAIN=stable
	export CARGO_TARGET_DIR=target
	cargo build --frozen --release
}

check() {
	cd "$pkgname-$pkgver"
	export RUSTUP_TOOLCHAIN=stable
	cargo test --frozen
}

package() {
	cd "$pkgname-$pkgver"
	install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
	install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}