# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 EGO_PN="github.com/digitalocean/doctl" inherit golang-vcs-snapshot DESCRIPTION="A command line tool for DigitalOcean services" HOMEPAGE="https://digitalocean.com" SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" RESTRICT="mirror" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64 ~x86" DOCS=( {CHANGELOG,README}.md ) QA_PRESTRIPPED="usr/bin/doctl" G="${WORKDIR}/${P}" S="${G}/src/${EGO_PN}" src_compile() { export GOPATH="${G}" local mygoargs=( -v -work -x -asmflags "-trimpath=${S}" -gcflags "-trimpath=${S}" -ldflags "-s -w" ) go build "${mygoargs[@]}" ./cmd/doctl || die } src_test() { go test -v ./... || die } src_install() { dobin doctl einstalldocs }