aports/community/zoxide/APKBUILD
2023-05-08 07:28:57 +02:00

58 lines
1.6 KiB
Plaintext

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=zoxide
pkgver=0.9.1
pkgrel=0
pkgdesc="A faster way to navigate your filesystem"
url="https://github.com/ajeetdsouza/zoxide"
# s390x: https://github.com/nix-rust/nix/issues/1968
arch="all !s390x"
license="MIT"
makedepends="cargo"
checkdepends="dash bash fish shfmt zsh"
subpackages="
$pkgname-doc
$pkgname-bash-completion
$pkgname-fish-completion
$pkgname-zsh-completion
"
source="https://github.com/ajeetdsouza/zoxide/archive/v$pkgver/zoxide-$pkgver.tar.gz
exclude-shellcheck-test.patch
"
export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
[ "$CARCH" = "riscv64" ] && options="$options textrels"
prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo build --release --frozen
}
check() {
cargo test --frozen
}
package() {
cargo install --locked --offline --path . --root="$pkgdir/usr"
rm "$pkgdir"/usr/.crates*
install -Dm644 man/man1/*.1 -t "$pkgdir"/usr/share/man/man1/
cd contrib/completions
install -Dm644 zoxide.bash "$pkgdir"/usr/share/bash-completion/completions/zoxide
install -Dm644 zoxide.fish -t "$pkgdir"/usr/share/fish/completions/
install -Dm644 _zoxide -t "$pkgdir"/usr/share/zsh/site-functions/
}
sha512sums="
44d8c31c8bc34875acd59b96faf85501da4f0ecc32eb05b383be309ee418860d1c380bbc28a3bd3a77140bb218ea0377f4d0ea7971485c0d025a07a5363ea1a7 zoxide-0.9.1.tar.gz
78f53af62460aec5db610ed7a47344f4386b1a0129f05b9b392cbd588d5c8ea10a18a48c9c8ef34bc73436aeaf0e3e6eecc50c99425b3efdec266d4f862dbf78 exclude-shellcheck-test.patch
"