| # Copyright 2019 The Chromium OS Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| EAPI=7 | |
| inherit toolchain-funcs | |
| DESCRIPTION="CLI for container runtime interface (CRI)" | |
| HOMEPAGE="https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/crictl.md" | |
| SRC_URI="https://github.com/kubernetes-sigs/cri-tools/archive/v${PV}.tar.gz -> ${P}.tar.gz" | |
| # This includes the licenses of dependencies as the binary is statically linked. | |
| # | |
| # If LICENSE contains BSD, ISC, or MIT, then chromite will scan the source for | |
| # copyright attribution. If the package vendors its dependencies or includes a | |
| # THIRD_PARTY_LICENSES/ directory, then chromite will properly attribute all | |
| # dependencies in about_os_credits.html. | |
| # | |
| # This list was determined by inspecting the output of: | |
| # go-licenses csv github.com/kubernetes-sigs/cri-tools/cmd/crictl | |
| # inside a clone of the package repo. | |
| # https://github.com/google/go-licenses | |
| LICENSE="Apache-2.0 BSD-2 BSD ISC MIT" | |
| SLOT="0" | |
| KEYWORDS="*" | |
| PATCHES=( | |
| "${FILESDIR}"/1.23.0-update-vendor-dependencies-to-be-golang-compatible.patch | |
| "${FILESDIR}"/1.25.0-update-golang-packages-go-mod.patch | |
| "${FILESDIR}"/1.25.0-update-golang-packages-related-code-changes.patch | |
| ) | |
| src_prepare() { | |
| default | |
| sed -i -e "s/git describe --match.*$/echo ${PV})/" Makefile || die | |
| } | |
| src_compile() { | |
| emake GO="$(tc-getGO)" crictl | |
| } | |
| src_install() { | |
| dobin build/bin/crictl | |
| insinto /etc | |
| doins "${FILESDIR}"/crictl.yaml | |
| } |