# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 EGO_PN="github.com/miguelmota/${PN}" inherit golang-vcs-snapshot DESCRIPTION="A terminal based UI application for tracking cryptocurrencies" HOMEPAGE="https://github.com/miguelmota/cointop" SRC_URI="https://${EGO_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" RESTRICT="mirror" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~amd64" IUSE="" DOCS=( README.md ) QA_PRESTRIPPED="usr/bin/cointop" 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" -o ./bin/${PN} ) go build "${mygoargs[@]}" || die } src_test() { go test -v ./... || die } src_install() { dobin bin/cointop einstalldocs }