blob: f15e61a04e71d7eddbbd9a5873da0930fb45a302 [file] [log] [blame]
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2.
EAPI=7
MY_PN="github.com/GoogleCloudPlatform/${PN}"
CROS_GO_SOURCE=(
"${MY_PN} v${PV}"
"github.com/toqueteos/webbrowser v1.2.0"
"github.com/docker/cli v20.10.12"
)
DESCRIPTION="Google Container Registry's Docker credential helper"
HOMEPAGE="https://github.com/GoogleCloudPlatform/docker-credential-gcr"
inherit cros-go
CROS_GO_BINARIES="${MY_PN}"
CROS_GO_VERSION="${PV}"
SRC_URI="$(cros-go_src_uri)"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="*"
IUSE=""
# Note that docker-credential-gcr depends on the head of dev-go/subcommands.
# Please update dev-go/subcommands when upgrading docker-credential-gcr.
DEPEND="app-emulation/docker
>=app-emulation/docker-credential-helpers-0.6.4
>=dev-lang/go-1.17:=
>=dev-go/errors-0.9.1
dev-go/subcommands
dev-go/net
dev-go/oauth2
"
RDEPEND="${DEPEND}"
src_compile() {
export GO111MODULE=off
GO="$(tc-getGO)"
GOPATH="$(cros-go_gopath)" ${GO} build -ldflags="-X ${MY_PN}/config.Version=${PV}" -o ${PN} ${MY_PN}
}