| # 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.0" |
| "github.com/docker/cli v20.10.6" |
| ) |
| |
| |
| 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/go-subcommands. |
| # Please update dev-go/go-subcommands when upgrading docker-credential-gcr. |
| DEPEND="app-emulation/docker |
| >=app-emulation/docker-credential-helpers-0.6.3 |
| >=dev-lang/go-1.14:= |
| >=dev-go/errors-0.8.1 |
| dev-go/subcommands |
| dev-go/net |
| dev-go/oauth2 |
| " |
| RDEPEND="${DEPEND}" |
| |
| src_compile() { |
| GO="$(tc-getGO)" |
| GOPATH="$(cros-go_gopath)" ${GO} build -ldflags="-X ${MY_PN}/config.Version=${PV}" -o ${PN} ${MY_PN} |
| } |