blob: 25e0bfb0c2d435b4b1068d24bf17e8dee14314f2 (
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
49
50
51
52
53
|
# Maintainer: Kuba Ellwart <kuba@hop.io>
pkgname=hop-cli
pkgver=0.1.46
pkgrel=1
makedepends=('rust' 'cargo')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
pkgdesc="Interact with Hop in your terminal"
url="https://hop.io"
license=('MPL-2.0')
source=("hop_cli-$pkgver.tar.gz::https://github.com/hopinc/hop_cli/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=("224bcfbe228dfc01078ba4b18cb3769f249912b9e7b5efd018430980c0d6312a")
prepare() {
cd "$srcdir/hop_cli-$pkgver"
cargo fetch --locked --target "$CARCH-unknown-linux-musl"
}
build() {
cd "$srcdir/hop_cli-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release
}
check() {
cd "$srcdir/hop_cli-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --release
}
package() {
cd "$srcdir/hop_cli-$pkgver"
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/hop"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/hop"
# generate completions
mkdir -p "$pkgdir/usr/share/bash-completion/completions"
"$pkgdir"/usr/bin/hop completions bash > "$pkgdir/usr/share/bash-completion/completions/hop"
chmod 644 "$pkgdir/usr/share/bash-completion/completions/hop"
mkdir -p "$pkgdir/usr/share/fish/completions"
"$pkgdir"/usr/bin/hop completions fish > "$pkgdir/usr/share/fish/completions/hop.fish"
chmod 644 $pkgdir/usr/share/fish/completions/hop.fish
mkdir -p "$pkgdir/usr/share/zsh/site-functions"
"$pkgdir"/usr/bin/hop completions zsh > "$pkgdir/usr/share/zsh/site-functions/_hop"
chmod 644 $pkgdir/usr/share/zsh/site-functions/_hop
}
|