mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
Signed-off-by: Nuno Silva <nuno.m.ribeiro.silva@tecnico.ulisboa.pt> Closes: https://bugs.gentoo.org/941285 Closes: https://github.com/gentoo/gentoo/pull/39093 Signed-off-by: Zac Medico <zmedico@gentoo.org>
53 lines
1.1 KiB
Bash
53 lines
1.1 KiB
Bash
# Copyright 1999-2024 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
inherit go-module
|
|
|
|
DESCRIPTION="Prometheus Utility Tool"
|
|
HOMEPAGE="https://github.com/prometheus/promu"
|
|
if [[ ${PV} == *9999* ]]; then
|
|
inherit git-r3
|
|
EGIT_REPO_URI="https://github.com/prometheus/promu.git"
|
|
else
|
|
SRC_URI="https://github.com/prometheus/promu/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
SRC_URI+=" https://github.com/rahilarious/gentoo-distfiles/releases/download/${P}/deps.tar.xz -> ${P}-deps.tar.xz"
|
|
KEYWORDS="amd64 ~arm arm64 ~loong ~riscv ~x86"
|
|
fi
|
|
LICENSE="Apache-2.0"
|
|
LICENSE+=" BSD BSD-2 MIT"
|
|
SLOT="0"
|
|
|
|
RESTRICT+=" test"
|
|
DOCS=(
|
|
"doc/examples"
|
|
"README.md"
|
|
)
|
|
|
|
src_unpack() {
|
|
if [[ ${PV} == *9999* ]]; then
|
|
git-r3_src_unpack
|
|
go-module_live_vendor
|
|
else
|
|
go-module_src_unpack
|
|
fi
|
|
}
|
|
|
|
src_compile() {
|
|
if use x86 || use arm; then
|
|
#917577 pie breaks build on x86
|
|
#941285 pie breaks build on arm
|
|
GOFLAGS=${GOFLAGS//-buildmode=pie}
|
|
fi
|
|
emake build
|
|
}
|
|
|
|
src_install() {
|
|
if [[ ${PV} == *9999 ]]; then
|
|
dobin "${PN}"
|
|
else
|
|
newbin "${P}" "${PN}"
|
|
fi
|
|
einstalldocs
|
|
}
|