From d875562dd05b4376a6d0a2282a66a8e64e19176f Mon Sep 17 00:00:00 2001 From: akhil Date: Tue, 2 Aug 2022 19:17:52 +0530 Subject: [PATCH 1/2] New package: gum-0.2.0 Update srcpkgs/gum/template Co-authored-by: Marcin Puc --- srcpkgs/gum/template | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 srcpkgs/gum/template diff --git a/srcpkgs/gum/template b/srcpkgs/gum/template new file mode 100644 index 000000000000..f1ca0eb12cc2 --- /dev/null +++ b/srcpkgs/gum/template @@ -0,0 +1,35 @@ +# Template file for 'gum' +pkgname=gum +version=0.2.0 +revision=1 +build_style=go +build_helper=qemu +go_import_path="github.com/charmbracelet/gum" +go_ldflags="-X main.Version=v${version}" +short_desc="Tool for glamorous shell scripts" +maintainer="akhil " +license="MIT" +homepage="https://github.com/charmbracelet/gum" +changelog="https://github.com/charmbracelet/gum/releases" +distfiles="https://${go_import_path}/archive/v${version}.tar.gz" +checksum=85bf131216c5ce7fdfc1c8c72d2eca43d4a57e4ce323792f386317b6bfffb032 +_completions="bash zsh fish" + +post_build() { + # Generate completion for shells. + cli=$(find $GOPATH/bin -name $pkgname) + for shell in $_completions; do + vtargetrun $cli completion $shell > ${pkgname}.${shell} + done + vtargetrun $cli man > ${pkgname}.1 +} + +post_install() { + vlicense LICENSE + + for shell in $_completions; do + vcompletion ${pkgname}.${shell} $shell gum + done + + vman ${pkgname}.1 +} From dc9b489a655d1b92ed7b6ae6c602d4ec7bb63536 Mon Sep 17 00:00:00 2001 From: Akhil Jalagam Date: Tue, 2 Aug 2022 23:17:27 +0530 Subject: [PATCH 2/2] Update srcpkgs/gum/template Co-authored-by: classabbyamp <5366828+classabbyamp@users.noreply.github.com> --- srcpkgs/gum/template | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/srcpkgs/gum/template b/srcpkgs/gum/template index f1ca0eb12cc2..c7a872142231 100644 --- a/srcpkgs/gum/template +++ b/srcpkgs/gum/template @@ -13,23 +13,15 @@ homepage="https://github.com/charmbracelet/gum" changelog="https://github.com/charmbracelet/gum/releases" distfiles="https://${go_import_path}/archive/v${version}.tar.gz" checksum=85bf131216c5ce7fdfc1c8c72d2eca43d4a57e4ce323792f386317b6bfffb032 -_completions="bash zsh fish" - -post_build() { - # Generate completion for shells. - cli=$(find $GOPATH/bin -name $pkgname) - for shell in $_completions; do - vtargetrun $cli completion $shell > ${pkgname}.${shell} - done - vtargetrun $cli man > ${pkgname}.1 -} - post_install() { vlicense LICENSE - for shell in $_completions; do - vcompletion ${pkgname}.${shell} $shell gum + _cli=$(find $GOPATH/bin -name $pkgname) + for shell in bash fish zsh; do + vtargetrun $_cli completion $shell > ${pkgname}.${shell} + vcompletion ${pkgname}.${shell} $shell done + vtargetrun $_cli man > ${pkgname}.1 vman ${pkgname}.1 }