blob: 37505e2fe3a2739c8a1db51980e1f790c37663c1 (
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
|
# Maintainer: orhun <orhunparmaksiz@gmail.com>
# https://github.com/orhun/pkgbuilds
pkgname=hf
pkgver=0.3.6
pkgrel=1
pkgdesc="Cross-platform hidden file library and utility"
arch=('x86_64')
url="https://github.com/sorairolake/hf"
license=('MIT' 'Apache-2.0' 'CC-BY-4.0')
depends=('gcc-libs')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('3eba16b6d7b5741bec8af81011a7e64e190b76ae36815afdcb39e6d8e1b382c786c256569d8fc4154de81f0e8befd8ce2c09fac92b884e324a93edd525dbac04')
prepare() {
cd "$pkgname-$pkgver"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
mkdir completions
}
build() {
cd "$pkgname-$pkgver"
cargo build --release # --frozen
local compgen="target/release/$pkgname --generate-completion"
$compgen bash >"completions/$pkgname"
$compgen fish >"completions/$pkgname.fish"
$compgen zsh >"completions/_$pkgname"
}
check() {
cd "$pkgname-$pkgver"
cargo test # --frozen
}
package() {
cd "$pkgname-$pkgver"
install -Dm 755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
install -Dm 644 LICENSES/MIT.txt -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dm 644 LICENSES/CC-BY-4.0.txt -t "$pkgdir/usr/share/licenses/$pkgname"
install -Dm 644 "completions/$pkgname" -t "$pkgdir/usr/share/bash-completion/completions/"
install -Dm 644 "completions/$pkgname.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d/"
install -Dm 644 "completions/_$pkgname" -t "$pkgdir/usr/share/zsh/site-functions/"
}
|