blob: f24e22dd232c53405177c8f1f4ad3f480d70d8d9 [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-containers/docker
>=app-containers/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() {
cros_go build -ldflags="-X ${MY_PN}/config.Version=${PV}" \
-o "$(cros-go_out_dir)/${PN}" "${MY_PN}"
}