| # |
| # Copyright 2023 Google LLC |
| # |
| # This program is free software; you can redistribute it and/or |
| # modify it under the terms of the GNU General Public License |
| # version 2 as published by the Free Software Foundation. |
| # |
| # This program is distributed in the hope that it will be useful, |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| # GNU General Public License for more details. |
| # |
| EAPI=7 |
| EGO_PN=github.com/docker/distribution |
| inherit golang-vcs-snapshot toolchain-funcs |
| |
| DESCRIPTION="docker registry for docker integration tests" |
| HOMEPAGE="https://www.docker.com/" |
| MY_PV="${PV/_/-}" |
| SRC_URI="https://github.com/distribution/distribution/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" |
| |
| |
| LICENSE="Apache-2.0" |
| SLOT="0" |
| KEYWORDS="*" |
| |
| S="${WORKDIR}/${P}/src/${EGO_PN}" |
| |
| src_compile(){ |
| export GO111MODULE=off |
| export GOPATH="${WORKDIR}/${P}" |
| export GOPATH="${S}"/Godeps/_workspace:"${GOPATH}" |
| |
| # use go cross-compiler |
| GO="$(tc-getGO)" |
| ${GO} build -o "${S}"/build/registry-v2 -v "${S}"/cmd/registry |
| } |
| |
| src_install(){ |
| TESTS_DIR=/usr/local/tests |
| exeinto "${TESTS_DIR}"/docker |
| doexe "${S}/build/registry-v2" |
| } |