| # |
| # 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 |
| inherit go-module |
| |
| # update this on every bump |
| GIT_COMMIT=7c76691c |
| |
| DESCRIPTION="terminal based UI to manage kubernetes clusters" |
| HOMEPAGE="https://k9scli.io" |
| SRC_URI="https://github.com/derailed/k9s/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
| SRC_URI+=" gs://chromeos-localmirror/distfiles/k9s-${PV}-vendor.tar.xz" |
| |
| LICENSE="Apache-2.0" |
| SLOT="0" |
| KEYWORDS="* amd64" |
| |
| |
| src_unpack() { |
| default |
| S="${WORKDIR}/k9s-${PV}" |
| mv "${WORKDIR}/k9s/vendor" "${S}" |
| } |
| |
| src_prepare() { |
| default |
| # I will look into opening an upstream PR to do this. |
| sed -i -e 's/-w -s -X/-X/' Makefile || die |
| } |
| |
| src_compile() { |
| GIT_REV=${GIT_COMMIT} VERSION=v${PV} GO_FLAGS="-mod=vendor" emake build || die "Couldn't build k9s binary!" |
| } |
| |
| src_install() { |
| dobin execs/k9s |
| dodoc -r change_logs plugins skins README.md |
| } |