# -*- 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 PortSystem 1.0 PortGroup golang 1.0 go.setup github.com/digitalocean/doctl 1.117.0 v github.tarball_from archive revision 0 categories www devel license Apache-2 maintainers {@kritr gmail.com:krdevmail} \ {@judaew judaew} \ openmaintainer description A command line interface for the DigitalOcean API long_description ${description} checksums rmd160 a4be64e8f161e79dc8978bd7eb8f6dc5820e49b7 \ sha256 2ff734465d45a95a1e31032ea607d05c2582ef28406d7f64142705339a58f3da \ size 8173803 set doctl_ver [split ${version} "."] set doctl_major [lindex ${doctl_ver} 0] set doctl_minor [lindex ${doctl_ver} 1] set doctl_patch [lindex ${doctl_ver} 2] set base_flag "-X ${go.package}" set ld_flags "${base_flag}.Label=release" append ld_flags " ${base_flag}.Major=${doctl_major}" append ld_flags " ${base_flag}.Minor=${doctl_minor}" append ld_flags " ${base_flag}.Patch=${doctl_patch}" build.cmd-append " -ldflags \"${ld_flags}\"" build.cmd-append " -o ${name}" build.env-delete GO111MODULE=off build.env-append GO111MODULE=on \ CGO_ENABLED=0 build.target ${worksrcpath}/cmd/${name} destroot { xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin set bash_completion ${prefix}/share/bash-completion/completions xinstall -d ${destroot}${bash_completion} exec ${destroot}${prefix}/bin/${name} completion bash >> \ ${destroot}${bash_completion}/${name} set zsh_completion ${prefix}/share/zsh/site-functions xinstall -d ${destroot}${zsh_completion} exec ${destroot}${prefix}/bin/${name} completion zsh >> \ ${destroot}${zsh_completion}/_${name} set fish_completion ${prefix}/share/fish/vendor_completions.d xinstall -d ${destroot}${fish_completion} exec ${destroot}${prefix}/bin/${name} completion fish >> \ ${destroot}${fish_completion}/${name}.fish }