aboutsummaryrefslogtreecommitdiffstats
path: root/community/mcfly/APKBUILD
blob: 4bc75fbdc5952002cc40b779c0c4907174e3189b (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=mcfly
pkgver=0.8.4
pkgrel=0
pkgdesc="Fly through your shell history"
url="https://github.com/cantino/mcfly"
arch="all"
license="MIT"
makedepends="cargo sqlite-dev cargo-auditable"
subpackages="
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
source="https://github.com/cantino/mcfly/archive/v$pkgver/mcfly-$pkgver.tar.gz"

_cargo_opts="--frozen --no-default-features"

# Reduce size of the mcfly binary.
export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build $_cargo_opts --release
}

check() {
	cargo test $_cargo_opts
}

package() {
	install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/

	install -Dm 644 mcfly.bash "$pkgdir"/usr/share/bash-completion/completions/mcfly
	install -Dm 644 mcfly.fish "$pkgdir"/usr/share/fish/vendor_completions.d/mcfly.fish
	install -Dm 644 mcfly.zsh "$pkgdir"/usr/share/zsh/site-functions/_mcfly
}

sha512sums="
079b56f6fdb519d5e3cfd36dae468964333dc78cb50d597d363731dece324474b61cbf6349c5771294b6514c76879ed670da80b8092d92ace7eef98ff35228c1  mcfly-0.8.4.tar.gz
"