blob: c27f258f291fa1931b90bb3b75ac97219b5c5394 [file] [log] [blame]
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit go-module
DESCRIPTION="Reports on the licenses used by a Go package and its dependencies"
HOMEPAGE="https://github.com/google/go-licenses"
go-module_set_globals
SRC_URI="https://github.com/google/go-licenses/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
go-licenses-1.6.0-go1.15.7-compatible-patch.tar.gz"
LICENSE="Apache-2.0 BSD-2 BSD MIT Unlicense"
SLOT="0"
KEYWORDS="*"
S=${WORKDIR}/go-licenses-${PV}
IUSE=""
src_prepare() {
unpack go-licenses-1.6.0-go1.15.7-compatible-patch.tar.gz
eapply go-licenses-1.6.0-go1.15.7-compatible.patch
eapply_user
}
src_compile() {
export GOFLAGS="-v -x -mod=vendor"
CGO_ENABLED=0 go build . || die "go build failed"
}
src_install() {
dobin go-licenses
dobin licenses.db
}