From 6ebbfc1466731eec6df818b3be18f731ca1ec48f Mon Sep 17 00:00:00 2001
From: Noah Huppert <contact@noahh.io>
Date: Sun, 14 Jul 2019 23:21:38 -0400
Subject: [PATCH 1/6] doctl: fixed build, close #12441

---
 srcpkgs/doctl/template | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/doctl/template b/srcpkgs/doctl/template
index 5f99107191f..5bac8b4fb47 100644
--- a/srcpkgs/doctl/template
+++ b/srcpkgs/doctl/template
@@ -1,19 +1,19 @@
 # Template file for 'doctl'
 pkgname=doctl
-version=1.15.0
+version=1.21.1
 revision=1
-build_style=go
-go_import_path=github.com/digitalocean/doctl/cmd/doctl
-go_get="yes"
-go_package="github.com/digitalocean/doctl/pkg/ssh"
-hostmakedepends="git"
 short_desc="Command line tool for DigitalOcean services"
 maintainer="Noah Huppert <contact@noahh.io>"
 license="Apache-2.0"
 homepage="https://github.com/digitalocean/doctl"
-distfiles="https://github.com/digitalocean/doctl/archive/v${version}.tar.gz"
-checksum=a3c8f2e15ca93b3e91f2750b87df19207f629583c583206b6089347cc4f990a5
+
+build_style=go
+go_import_path="github.com/digitalocean/doctl/cmd/doctl"
+go_build_tags="v${version}"
+go_get="yes"
 
 post_install() {
-	vlicense LICENSE.txt
+    vlicense _build-doctl-xbps/src/github.com/digitalocean/doctl/LICENSE.txt
+
+    vbin _build-doctl-xbps/bin/doctl
 }

From 0cc97523b955ce5b990b14638cfca4459dbba520 Mon Sep 17 00:00:00 2001
From: Noah Huppert <contact@noahh.io>
Date: Sun, 14 Jul 2019 23:26:51 -0400
Subject: [PATCH 2/6] doctl: fixed template lint errors

---
 srcpkgs/doctl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/doctl/template b/srcpkgs/doctl/template
index 5bac8b4fb47..7ca6abd39b0 100644
--- a/srcpkgs/doctl/template
+++ b/srcpkgs/doctl/template
@@ -13,7 +13,7 @@ go_build_tags="v${version}"
 go_get="yes"
 
 post_install() {
-    vlicense _build-doctl-xbps/src/github.com/digitalocean/doctl/LICENSE.txt
+	       vlicense _build-doctl-xbps/src/github.com/digitalocean/doctl/LICENSE.txt
 
-    vbin _build-doctl-xbps/bin/doctl
+	       vbin _build-doctl-xbps/bin/doctl
 }

From fb5b8e064a9da61de3dccc57e81f8f8dbf3bdd7b Mon Sep 17 00:00:00 2001
From: Noah Huppert <contact@noahh.io>
Date: Sun, 14 Jul 2019 23:48:07 -0400
Subject: [PATCH 3/6] doctl: added git to hostmakedepends

---
 srcpkgs/doctl/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/doctl/template b/srcpkgs/doctl/template
index 7ca6abd39b0..75892d67b5d 100644
--- a/srcpkgs/doctl/template
+++ b/srcpkgs/doctl/template
@@ -8,6 +8,7 @@ license="Apache-2.0"
 homepage="https://github.com/digitalocean/doctl"
 
 build_style=go
+hostmakedepends="git"
 go_import_path="github.com/digitalocean/doctl/cmd/doctl"
 go_build_tags="v${version}"
 go_get="yes"

From 23edfe2a376240cb3425a3d9a44ffd0cff933234 Mon Sep 17 00:00:00 2001
From: Noah Huppert <contact@noahh.io>
Date: Sun, 14 Jul 2019 23:57:58 -0400
Subject: [PATCH 4/6] doctl: removed unneeded vbin

---
 srcpkgs/doctl/template | 2 --
 1 file changed, 2 deletions(-)

diff --git a/srcpkgs/doctl/template b/srcpkgs/doctl/template
index 75892d67b5d..d4c8edd36f0 100644
--- a/srcpkgs/doctl/template
+++ b/srcpkgs/doctl/template
@@ -15,6 +15,4 @@ go_get="yes"
 
 post_install() {
 	       vlicense _build-doctl-xbps/src/github.com/digitalocean/doctl/LICENSE.txt
-
-	       vbin _build-doctl-xbps/bin/doctl
 }

From cea00ee95a35d9332012523bf3e86061c9e8415a Mon Sep 17 00:00:00 2001
From: Noah Huppert <contact@noahh.io>
Date: Mon, 15 Jul 2019 00:05:29 -0400
Subject: [PATCH 5/6] doctl: made vlicense use GOPATH

---
 srcpkgs/doctl/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/doctl/template b/srcpkgs/doctl/template
index d4c8edd36f0..6cbc4ff05c0 100644
--- a/srcpkgs/doctl/template
+++ b/srcpkgs/doctl/template
@@ -14,5 +14,5 @@ go_build_tags="v${version}"
 go_get="yes"
 
 post_install() {
-	       vlicense _build-doctl-xbps/src/github.com/digitalocean/doctl/LICENSE.txt
+	       vlicense "$GOPATH/src/github.com/digitalocean/doctl/LICENSE.txt"
 }

From 8e38cbfd8ce5fda6d7063665a6f1fbf8c51e8137 Mon Sep 17 00:00:00 2001
From: Noah Huppert <contact@noahh.io>
Date: Mon, 15 Jul 2019 20:48:37 -0400
Subject: [PATCH 6/6] doctl: fixed ordering of options

---
 srcpkgs/doctl/template | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/srcpkgs/doctl/template b/srcpkgs/doctl/template
index 6cbc4ff05c0..1ed77fc2a35 100644
--- a/srcpkgs/doctl/template
+++ b/srcpkgs/doctl/template
@@ -2,16 +2,15 @@
 pkgname=doctl
 version=1.21.1
 revision=1
-short_desc="Command line tool for DigitalOcean services"
-maintainer="Noah Huppert <contact@noahh.io>"
-license="Apache-2.0"
-homepage="https://github.com/digitalocean/doctl"
-
 build_style=go
-hostmakedepends="git"
 go_import_path="github.com/digitalocean/doctl/cmd/doctl"
 go_build_tags="v${version}"
 go_get="yes"
+hostmakedepends="git"
+short_desc="Command line tool for DigitalOcean services"
+maintainer="Noah Huppert <contact@noahh.io>"
+license="Apache-2.0"
+homepage="https://github.com/digitalocean/doctl"
 
 post_install() {
 	       vlicense "$GOPATH/src/github.com/digitalocean/doctl/LICENSE.txt"
