void-packages/srcpkgs/starship/template
2021-07-17 00:12:29 -03:00

36 lines
1 KiB
Bash

# Template file for 'starship'
pkgname=starship
version=0.56.0
revision=1
build_style=cargo
build_helper=qemu
hostmakedepends="libgit2-devel pkg-config"
makedepends="libgit2-devel openssl-devel"
depends="git"
checkdepends="git fish-shell"
short_desc="Minimal, fast and customizable cross-shell prompt"
maintainer="cinerea0 <cinerea0@protonmail.com>"
license="ISC"
homepage="https://starship.rs"
distfiles="https://github.com/starship/starship/archive/refs/tags/v${version}.tar.gz"
checksum=ab038a2cc1ea0b6c6ebbf064f531f22448ee1ed8d04b5f25b327ead1ad22cca5
post_build() {
STARSHIP="target/${RUST_TARGET}/release/starship"
vtargetrun ${STARSHIP} completions zsh >starship.zsh
vtargetrun ${STARSHIP} completions bash >starship.bash
vtargetrun ${STARSHIP} completions fish >starship.fish
}
do_check() {
mkdir -p fake-home
HOME="${wrksrc}/fake-home" cargo test --release --target ${RUST_TARGET}
}
post_install() {
vcompletion starship.bash bash
vcompletion starship.fish fish
vcompletion starship.zsh zsh
vlicense LICENSE
}