summaryrefslogtreecommitdiff
path: root/app-text/yamlfmt/yamlfmt-0.12.1.ebuild
blob: 5f85ed96ccb422a3c7e0c16819681d856b7c8378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit go-module

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_compile() {
	CGO_ENABLED=0 ego build -ldflags "-X main.version=${PV} -s -w" \
		-o yamlfmt ./cmd/yamlfmt
}

src_install() {
	dodoc -r README.md docs
	dobin yamlfmt
}

src_test() {
	emake test
}