summaryrefslogtreecommitdiff
blob: 340fc82d40099cee23ad8e8196eb17cf27c3adb4 (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
30
31
32
33
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit go-module

DESCRIPTION="Print version used to build Go executables"
HOMEPAGE="https://github.com/rsc/goversion https://rsc.io/goversion"
SRC_URI="https://github.com/rsc/goversion/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"

src_unpack() {
	default
	cat <<- EOF > "${S}"/go.mod
		module rsc.io/goversion

		go 1.17
	EOF
	go-module_src_unpack
}

src_compile() {
	ego build -o ${PN} .
}

src_install() {
	dobin ${PN}
	dodoc README.md
}