# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
go.setup github.com/digitalocean/doctl 1.29.2 v
checksums rmd160 fcc715e9fe93769283e243570af50728ab10470c \
sha256 b99c6c127b1b1408cae3ba5a18bdc748131f19df0e945d4959cab00f97a37183 \
maintainers {@kritr gmail.com:krdevmail} openmaintainer
description A command line interface for the DigitalOcean API
long_description ${description}
depends_build-append port:git
build.env-append GO111MODULE=on
build.target ${worksrcpath}/cmd/${name}
xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin
variant bash_completion {
depends_run-append path:etc/bash_completion:bash-completion
set completions_path ${destroot}${prefix}/share/bash-completion/completions
xinstall -d ${completions_path}
set completion-file [open ${completions_path}/${name} "w"]
puts ${completion-file} [exec ${destroot}${prefix}/bin/${name} completion bash]
variant zsh_completion description {Install zsh completion} {
depends_run-append path:${prefix}/bin/zsh:zsh
set site-functions ${destroot}${prefix}/share/zsh/site-functions
xinstall -d ${site-functions}
set completion-file [open ${site-functions}/_${name} "w"]
puts ${completion-file} [exec ${destroot}${prefix}/bin/${name} completion zsh]