commit:     c5395fce031042c596d762409150c0b806bdcf07
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  7 20:49:04 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun  7 20:51:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5395fce

app-admin/doctl: add 1.76.2

Closes: https://bugs.gentoo.org/828145
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-admin/doctl/Manifest            |  1 +
 app-admin/doctl/doctl-1.76.2.ebuild | 42 +++++++++++++++++++++++++++++++++++++
 app-admin/doctl/doctl-9999.ebuild   | 15 +++++++------
 3 files changed, 50 insertions(+), 8 deletions(-)

diff --git a/app-admin/doctl/Manifest b/app-admin/doctl/Manifest
index 4515e82ef222..ebce50b74af6 100644
--- a/app-admin/doctl/Manifest
+++ b/app-admin/doctl/Manifest
@@ -1,2 +1,3 @@
 DIST doctl-1.57.0.tar.gz 5195498 BLAKE2B 
17273e9f8f63464aa2ba6c6d48dfabd78b0bdeb7156dc315d1970fb0052710c7a4b37f1d5e2a7a60211f2ab166c0926de438959d853639a8c329ec39b3ee0577
 SHA512 
0c868c5732a48367a93bf2b884689dbd917ba6690c82516495862546bc31d58d44aab192bd3b3543f951e9fa9b7289e99fbdf828c017af68496b84f1585a5f6b
 DIST doctl-1.68.0.tar.gz 5514572 BLAKE2B 
e44be00e1b7451e84d3d6dc5a19dc04fcb5dab2c8a5c1923c0c0f99058a1938f9567d63681989e869341957586cdf549842cd45ca82503007039ae989664e8ff
 SHA512 
d81799c227c071793af74f78e54d8348782caf158b28e0a12b92adf17b6c78c787a82abbdf3aa340a960f26c929b00f38015725e6e629aad7615096270d19c10
+DIST doctl-1.76.2.tar.gz 5648377 BLAKE2B 
1ec89adb5ad187ccc6b66d077dda57ca4065bc1a5981a0f2549913532f6bcc6d1f48c3cc56c100c1b6c55f698ffcf3f2c639888ccaab30948384ce800181b332
 SHA512 
d7efc587843cd87f3ac17b974858ea688377ca6f0cd3d4b7430c47a1e8b825cc05f4d9107d7062f5e52fe3c267ec6bbd19a8b1d773a15f1d7ab653087ce13bba

diff --git a/app-admin/doctl/doctl-1.76.2.ebuild 
b/app-admin/doctl/doctl-1.76.2.ebuild
new file mode 100644
index 000000000000..5aae02dd1956
--- /dev/null
+++ b/app-admin/doctl/doctl-1.76.2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo bash-completion-r1 go-module
+
+DESCRIPTION="A command line tool for DigitalOcean services"
+HOMEPAGE="https://github.com/digitalocean/doctl";
+SRC_URI="https://github.com/digitalocean/${PN}/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="Apache-2.0 MIT BSD BSD-2 ISC MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+src_compile() {
+       LDFLAGS="-X github.com/digitalocean/doctl.Major=$(ver_cut 1)
+               -X github.com/digitalocean/doctl.Minor=$(ver_cut 2)
+               -X github.com/digitalocean/doctl.Patch=$(ver_cut 3-)
+               -X github.com/digitalocean/doctl.Label=release"
+       GOFLAGS="-v -x -mod=vendor" ego build -ldflags "${LDFLAGS}" ./cmd/...
+
+       local completion
+       for completion in bash zsh fish ; do
+               edo ./doctl completion ${completion} > doctl.${completion} || 
die "completion for ${completion} failed"
+       done
+}
+
+src_test() {
+       GOFLAGS="-v -x -mod=vendor" ego test -work ./do/... ./pkg/... .
+}
+
+src_install() {
+       einstalldocs
+       dobin doctl
+
+       newbashcomp doctl.bash doctl
+       insinto /usr/share/zsh/site-functions
+       newins doctl.zsh _doctl
+       insinto /usr/share/fish/completion
+       newins doctl.fish doctl
+}

diff --git a/app-admin/doctl/doctl-9999.ebuild 
b/app-admin/doctl/doctl-9999.ebuild
index 264b5170d915..03b7027f041b 100644
--- a/app-admin/doctl/doctl-9999.ebuild
+++ b/app-admin/doctl/doctl-9999.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 EGIT_REPO_URI="https://github.com/digitalocean/${PN}.git";
 
-inherit bash-completion-r1 git-r3 go-module
+inherit edo bash-completion-r1 git-r3 go-module
 
 DESCRIPTION="A command line tool for DigitalOcean services"
 HOMEPAGE="https://github.com/digitalocean/doctl";
@@ -22,17 +22,16 @@ src_unpack() {
 src_compile() {
        LDFLAGS="-X github.com/digitalocean/doctl.Build=$(git rev-parse --short 
HEAD)
                -X github.com/digitalocean/doctl.Label=dev"
-       GOFLAGS="-v -x -mod=vendor" \
-               go build -ldflags "$LDFLAGS" ./cmd/... || die "build failed"
+       GOFLAGS="-v -x -mod=vendor" go build -ldflags "$LDFLAGS" ./cmd/...
 
-       ./doctl completion bash > doctl.bash || die "completion for bash failed"
-       ./doctl completion zsh > doctl.zsh || die "completion for sh failed"
-       ./doctl completion fish > doctl.fish || die "completion for fish failed"
+       local completion
+       for completion in bash zsh fish ; do
+               edo ./doctl completion ${completion} > doctl.${completion} || 
die "completion for ${completion} failed"
+       done
 }
 
 src_test() {
-       GOFLAGS="-v -x -mod=vendor" \
-               go test -work ./do/... ./pkg/... . || die "test failed"
+       GOFLAGS="-v -x -mod=vendor" ego test -work ./do/... ./pkg/... .
 }
 
 src_install() {

Reply via email to