summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cd320a039df62b4299c606743261d6f73be83397 (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
48
# Maintainer: Charles Dong <chardon_cs@proton.me>

pkgname=phasher
pkgver=0.2.0
pkgrel=1
pkgdesc="Simple CLI program hashing passwords into PHC strings"
arch=("x86_64" "aarch64")
url="https://github.com/chardoncs/phasher"
license=('MIT')
groups=()
depends=()
makedepends=(
	rust
    cargo
)
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=()
noextract=()
sha256sums=()
validpgpkeys=()

_srcroot="${pkgname}-${pkgver}-${pkgrel}"

build() {
	local srcroot="$srcdir/$_srcroot"

	if [ ! -d $srcroot ]; then
		mkdir $srcroot
	fi

	pushd $srcroot

	cargo install ${pkgname}@${pkgver} --locked --target-dir $srcroot/ --root $srcroot/
}

package() {
	local srcroot="$srcdir/$_srcroot"

	install -Dm755 $srcroot/bin/$pkgname ${pkgdir}/usr/bin/$pkgname
}