From 1d42f8ebb6e879f02699511a76eb5ed851b38ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Wed, 10 Jun 2020 04:30:01 -0300 Subject: [PATCH] starship: update to 0.42.0, add completions. - Completions are generated similar to the ones for rustup. --- srcpkgs/starship/template | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/srcpkgs/starship/template b/srcpkgs/starship/template index 71771a2cf6fa3c..ba484a500349ae 100644 --- a/srcpkgs/starship/template +++ b/srcpkgs/starship/template @@ -1,6 +1,6 @@ # Template file for 'starship' pkgname=starship -version=0.41.3 +version=0.42.0 revision=1 build_style=cargo build_helper="rust" @@ -11,8 +11,25 @@ maintainer="Aluísio Augusto Silva Gonçalves " license="ISC" homepage="https://starship.rs" distfiles="https://github.com/starship/starship/archive/v${version}.tar.gz" -checksum=ce2c86e3f3a7d8cd2e1a204e7ef491473fdd93c41bb43a4718fdd66039f7bc99 +checksum=cf7b5848949bc1e61dc771ef2a429e4ccb8d339e1ca705bdf521fc4a4fc96309 + +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" starship" +fi post_install() { + STARSHIP="target/${RUST_TARGET}/release/starship" + if [ "$CROSS_BUILD" ]; then + STARSHIP=starship + fi + # generate shell completions + ${STARSHIP} completions zsh > starship.zsh + ${STARSHIP} completions bash > starship.bash + ${STARSHIP} completions fish > starship.fish + + vinstall starship.zsh 0644 usr/share/zsh/site-functions/ _starship + vinstall starship.bash 0644 usr/share/bash-completion/completions/ starship + vinstall starship.fish 0644 usr/share/fish/vendor_completions.d/ + vlicense LICENSE }