forked from xkpasswd/xkpasswd-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPKGBUILD
38 lines (34 loc) · 931 Bytes
/
PKGBUILD
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
# Maintainer: Thanh Nguyen <[email protected]>
pkgname=xkpasswd
pkgver=1.0.1
pkgrel=1
pkgdesc='XKCD password generator'
arch=(x86_64)
url='https://github.com/xkpasswd/xkpasswd-rs'
license=(GPL-3.0)
depends=()
makedepends=(cargo)
_src_dir=("$pkgname-$pkgver")
source=("$_src_dir.tar.gz::https://github.com/xkpasswd/xkpasswd-rs/archive/v$pkgver.tar.gz")
sha512sums=('31de9a2652c4857b2b21579438ce07597d89d1f35a79f7a72fa57113f5199dd13906c5d9cbdc4e8c5940148d44d13cb9696117650916206b89003c32a589ed22')
prepare() {
mv "$pkgname-rs-$pkgver" "$_src_dir"
cd "$_src_dir"
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$_src_dir"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
make clean
make build-cli
}
check() {
cd "$_src_dir"
export RUSTUP_TOOLCHAIN=stable
make test-cli
}
package() {
cd "$_src_dir"
install -Dm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
}