From e14e3381612096bd8f36a0bdc17f44ab9d50d95c Mon Sep 17 00:00:00 2001 From: Daniel Lewan Date: Sun, 10 Jul 2022 14:37:50 +0200 Subject: [PATCH 1/2] New package: nats-0.0.33 --- srcpkgs/nats/template | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 srcpkgs/nats/template diff --git a/srcpkgs/nats/template b/srcpkgs/nats/template new file mode 100644 index 000000000000..4b9f6e044755 --- /dev/null +++ b/srcpkgs/nats/template @@ -0,0 +1,22 @@ +# Template file for 'nats' +pkgname=nats +version=0.0.33 +revision=1 +wrksrc="natscli-${version}" +build_style=go +build_helper=qemu +go_import_path=github.com/nats-io/natscli/nats +short_desc="Command line utility to interact with and manage NATS" +maintainer="Daniel Lewan " +license="Apache-2.0" +homepage="https://nats.io/" +distfiles="https://github.com/nats-io/natscli/archive/refs/tags/v${version}.tar.gz" +checksum=7aa0d09eeb7a411bcdd6958a2957baec6bcac1faadb7477d5d2adf47c9c5819c + +post_install() { + for shell in bash zsh + do + vtargetrun $GOPATH/bin/nats --completion-script-$shell >completion.$shell + vcompletion completion.$shell $shell + done +} From a51728acbe097ea4e3afca813fc17ac3ddd08ea4 Mon Sep 17 00:00:00 2001 From: Daniel Lewan Date: Sun, 10 Jul 2022 14:37:52 +0200 Subject: [PATCH 2/2] New package: nats-server-2.8.4 --- srcpkgs/nats-server/template | 12 ++++++++++++ srcpkgs/nats/template | 12 +++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/nats-server/template diff --git a/srcpkgs/nats-server/template b/srcpkgs/nats-server/template new file mode 100644 index 000000000000..691dc9b0527b --- /dev/null +++ b/srcpkgs/nats-server/template @@ -0,0 +1,12 @@ +# Template file for 'nats-server' +pkgname=nats-server +version=2.8.4 +revision=1 +build_style=go +go_import_path=github.com/nats-io/nats-server/v2 +short_desc="Server for NATS messaging system" +maintainer="Daniel Lewan " +license="Apache-2.0" +homepage="https://nats.io/" +distfiles="https://github.com/nats-io/nats-server/archive/v${version}.tar.gz" +checksum=172c5d04c3867adcb6b2322d87d7f7029b63e9465fffffcf99d4ca652820635f diff --git a/srcpkgs/nats/template b/srcpkgs/nats/template index 4b9f6e044755..291e40eaf08b 100644 --- a/srcpkgs/nats/template +++ b/srcpkgs/nats/template @@ -4,19 +4,25 @@ version=0.0.33 revision=1 wrksrc="natscli-${version}" build_style=go -build_helper=qemu go_import_path=github.com/nats-io/natscli/nats +go_ldflags="-X main.version=v${version}" short_desc="Command line utility to interact with and manage NATS" maintainer="Daniel Lewan " license="Apache-2.0" homepage="https://nats.io/" -distfiles="https://github.com/nats-io/natscli/archive/refs/tags/v${version}.tar.gz" +distfiles="https://github.com/nats-io/natscli/archive/v${version}.tar.gz" checksum=7aa0d09eeb7a411bcdd6958a2957baec6bcac1faadb7477d5d2adf47c9c5819c +post_build() { + for shell in bash zsh + do + CGO_ENABLED=0 GOARCH='' go run nats/main.go --completion-script-$shell >completion.$shell + done +} + post_install() { for shell in bash zsh do - vtargetrun $GOPATH/bin/nats --completion-script-$shell >completion.$shell vcompletion completion.$shell $shell done }