From cfdf26fc9b2094980c295ff6382f62489866ad9d Mon Sep 17 00:00:00 2001 From: Karel Balej Date: Fri, 14 Jun 2024 18:34:22 +0200 Subject: [PATCH] darkman: update to 2.0.1., add shell completions --- srcpkgs/darkman/template | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/srcpkgs/darkman/template b/srcpkgs/darkman/template index 9b73ad81d86241..d064c55aec2680 100644 --- a/srcpkgs/darkman/template +++ b/srcpkgs/darkman/template @@ -1,8 +1,9 @@ # Template file for 'darkman' pkgname=darkman -version=1.5.4 -revision=2 +version=2.0.1 +revision=1 build_style=go +build_helper=qemu go_import_path="gitlab.com/WhyNotHugo/darkman" go_package="${go_import_path}/cmd/darkman" go_ldflags="-X main.Version=${version}" @@ -14,7 +15,15 @@ license="ISC" homepage="https://darkman.whynothugo.nl/" changelog="https://gitlab.com/WhyNotHugo/darkman/-/raw/main/CHANGELOG.md" distfiles="https://gitlab.com/WhyNotHugo/darkman/-/archive/v${version}/darkman-v${version}.tar" -checksum=c19b33a62a90120df53ccfa823eb69da24429bb63101d57e9604e36eb3de9e38 +checksum=8bfcf0884c8a71b523d675f47037c5e4f51dcb52ef59a3b7d538a82c3cf41fbe +_completions="zsh bash fish" + +post_build() { + local _bin="`find ${GOPATH}/bin -name darkman`" + for _shell in ${_completions}; do + vtargetrun "${_bin}" completion ${_shell} > darkman.${_shell} + done +} post_install() { vmkdir usr/share/dbus-1/services @@ -28,4 +37,8 @@ post_install() { vman darkman.1 vlicense LICENCE + + for _shell in ${_completions}; do + vcompletion darkman.${_shell} ${_shell} + done }