mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-16 23:19:31 +00:00
39 lines
801 B
Bash
39 lines
801 B
Bash
# Copyright 2024-2025 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
inherit go-module
|
|
|
|
EGIT_COMMIT=81ffee4
|
|
DESCRIPTION="An extensible command line tool or library to format yaml files"
|
|
HOMEPAGE="https://github.com/google/yamlfmt"
|
|
SRC_URI="https://github.com/google/yamlfmt/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
|
https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz"
|
|
|
|
LICENSE="Apache-2.0"
|
|
LICENSE+=" BSD MIT"
|
|
SLOT="0"
|
|
KEYWORDS="~amd64"
|
|
|
|
src_unpack() {
|
|
default
|
|
}
|
|
|
|
src_prepare() {
|
|
ln -sv ../vendor ./ || die
|
|
default
|
|
}
|
|
|
|
src_compile() {
|
|
CGO_ENABLED=0 ego build -ldflags "-X main.version=${PV} -X main.commit=${EGIT_COMMIT} -s -w" \
|
|
-o yamlfmt ./cmd/yamlfmt
|
|
}
|
|
|
|
src_install() {
|
|
dodoc -r README.md docs
|
|
dobin yamlfmt
|
|
}
|
|
|
|
src_test() {
|
|
emake test
|
|
}
|