From f2854d3310c74c584fff00e63da0641827eef835 Mon Sep 17 00:00:00 2001 From: Gabriel Sanches Date: Wed, 19 May 2021 22:28:42 -0300 Subject: [PATCH] New package: talosctl-0.10.2 --- srcpkgs/talosctl/template | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 srcpkgs/talosctl/template diff --git a/srcpkgs/talosctl/template b/srcpkgs/talosctl/template new file mode 100644 index 000000000000..a1bad99a5a29 --- /dev/null +++ b/srcpkgs/talosctl/template @@ -0,0 +1,31 @@ +# Template file for 'talosctl' +pkgname=talosctl +version=0.10.2 +revision=1 +wrksrc="talos-${version}" +build_style=go +build_helper=qemu +go_import_path="github.com/talos-systems/talos/cmd/talosctl" +go_ldflags="-s -w + -X github.com/talos-systems/talos/pkg/version.Name=Talos + -X github.com/talos-systems/talos/pkg/version.Tag=v${version}" +short_desc="CLI tool for Talos (OS for Kubernetes)" +maintainer="Gabriel Sanches " +license="MPL-2.0" +homepage="https://talos.dev/" +distfiles="https://github.com/talos-systems/talos/archive/refs/tags/v${version}.tar.gz" +checksum=c13b4faa39225335f6eb60a95cd4c79d7341b7d63c6e10ff98705f83af4a4491 +_completions="bash zsh" + +post_build() { + talosctl=$(find $GOPATH/bin -name $pkgname) + for shell in $_completions; do + vtargetrun $talosctl completion $shell > ${pkgname}.${shell} + done +} + +post_install() { + for shell in $_completions; do + vcompletion ${pkgname}.${shell} $shell + done +}