mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
81 lines
2.2 KiB
Plaintext
81 lines
2.2 KiB
Plaintext
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=navi
|
|
pkgver=2.22.1
|
|
pkgrel=0
|
|
pkgdesc="An interactive cheatsheet tool for the command-line"
|
|
url="https://github.com/denisidoro/navi"
|
|
# s390x: fails to build nix crate
|
|
arch="all !s390x"
|
|
license="Apache-2.0"
|
|
depends="git"
|
|
makedepends="cargo"
|
|
install="$pkgname.post-install"
|
|
subpackages="
|
|
$pkgname-bash-plugin:_bash:noarch
|
|
$pkgname-fish-plugin:_fish:noarch
|
|
$pkgname-zsh-plugin:_zsh:noarch
|
|
"
|
|
source="https://github.com/denisidoro/navi/archive/v$pkgver/navi-$pkgver.tar.gz
|
|
fix-compiled_default_path.patch
|
|
config.yaml
|
|
"
|
|
|
|
[ $CARCH = "riscv64" ] && options="$options textrels"
|
|
|
|
export NAVI_CONFIG="/etc/xdg/navi/config.yaml"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
cargo fetch --target="$CTARGET" --locked
|
|
}
|
|
|
|
build() {
|
|
cargo build --frozen --release
|
|
}
|
|
|
|
check() {
|
|
cargo test --frozen
|
|
}
|
|
|
|
package() {
|
|
install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/
|
|
|
|
install -Dm644 shell/navi.plugin.bash "$pkgdir"/usr/share/bash/plugins/$pkgname/navi.plugin.sh
|
|
install -Dm644 shell/navi.plugin.fish -t "$pkgdir"/usr/share/fish/vendor_functions.d/
|
|
install -Dm644 shell/navi.plugin.zsh -t "$pkgdir"/usr/share/zsh/plugins/$pkgname/
|
|
|
|
install -D -m644 "$srcdir"/config.yaml "$pkgdir/$NAVI_CONFIG"
|
|
}
|
|
|
|
_bash() {
|
|
pkgdesc="Bash plugin for $pkgname (key bindings)"
|
|
depends=""
|
|
install_if="$pkgname=$pkgver-r$pkgrel bash"
|
|
|
|
amove usr/share/bash/plugins
|
|
}
|
|
|
|
_fish() {
|
|
pkgdesc="Fish plugin for $pkgname (key bindings)"
|
|
depends=""
|
|
install_if="$pkgname=$pkgver-r$pkgrel fish"
|
|
|
|
amove usr/share/fish
|
|
}
|
|
|
|
_zsh() {
|
|
pkgdesc="Zsh plugin for $pkgname (key bindings)"
|
|
depends=""
|
|
install_if="$pkgname=$pkgver-r$pkgrel zsh"
|
|
|
|
amove usr/share/zsh/plugins
|
|
}
|
|
|
|
sha512sums="
|
|
9f98aefde258acb8d0e9294b45e5b76bc69f658c1b703fc7c12086e3f7f08ac0b2b6287781151c62717c316f100c409269f2c7cb629a0a25d9e20a1ecb237ccd navi-2.22.1.tar.gz
|
|
a4041e1b3f2ed10a5b6ba74817c549d309aa972f40b10f3f817dab7a7ef6fbadbd6fe0a071f9fc014f3c2d627a6fd70394ea5d698c64b4867f0a4d77c4522768 fix-compiled_default_path.patch
|
|
26b48a07e7df9c7a30106dff956e4446121c998fbac481eec85a55c75721c900f006c8d7c666d231e19c1f2769a550f1fdbecca35496d82f3b409e5fe1ab24e0 config.yaml
|
|
"
|