diff options
author | John Helmert III <ajak@gentoo.org> | 2022-10-14 12:18:28 -0500 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2022-10-14 12:19:49 -0500 |
commit | 57815e3bae0ad8bb6658fd2754732cc51f52a430 (patch) | |
tree | a5c157a2f3bcf1bb92d844e7081bbd49d2b7db3a /app-metrics/node_exporter/node_exporter-1.4.0.ebuild | |
parent | dev-python/xarray: enable python3_11 (diff) | |
download | gentoo-57815e3bae0ad8bb6658fd2754732cc51f52a430.tar.gz gentoo-57815e3bae0ad8bb6658fd2754732cc51f52a430.tar.bz2 gentoo-57815e3bae0ad8bb6658fd2754732cc51f52a430.zip |
app-metrics/node_exporter: add 1.4.0
Closes: https://bugs.gentoo.org/876241
Closes: https://github.com/gentoo/gentoo/27701
Signed-off-by: John Helmert III <ajak@gentoo.org>
Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'app-metrics/node_exporter/node_exporter-1.4.0.ebuild')
-rw-r--r-- | app-metrics/node_exporter/node_exporter-1.4.0.ebuild | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/app-metrics/node_exporter/node_exporter-1.4.0.ebuild b/app-metrics/node_exporter/node_exporter-1.4.0.ebuild new file mode 100644 index 000000000000..91cb5773c610 --- /dev/null +++ b/app-metrics/node_exporter/node_exporter-1.4.0.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module systemd +MY_PV="v${PV/_rc/-rc.}" +NODE_EXPORTER_COMMIT=7da1321761b3b8dfc9e496e1a60e6a476fec6018 + +DESCRIPTION="Prometheus exporter for machine metrics" +HOMEPAGE="https://github.com/prometheus/node_exporter" +SRC_URI="https://github.com/prometheus/node_exporter/archive/${MY_PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz" + +LICENSE="Apache-2.0 BSD BSD-2 MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~riscv ~x86" + +COMMON_DEPEND="acct-group/node_exporter + acct-user/node_exporter" +DEPEND=">=dev-util/promu-0.3.0 + ${COMMON_DEPEND}" +RDEPEND="${COMMON_DEPEND}" + +S="${WORKDIR}/${PN}-${PV/_rc/-rc.}" + +src_prepare() { + default + sed -i -e "s/{{.Revision}}/${NODE_EXPORTER_COMMIT}/" .promu.yml || die + sed -i -e "s/{{.Revision}}/${NODE_EXPORTER_COMMIT}/" .promu-cgo.yml || die +} + +src_compile() { + mkdir -p bin || die + promu build -v --prefix node_exporter || die +} + +src_install() { + dosbin node_exporter/node_exporter + dodoc {README,CHANGELOG,CONTRIBUTING}.md + systemd_newunit "${FILESDIR}"/node_exporter.service-1 node_exporter.service + newinitd "${FILESDIR}"/${PN}.initd-1 ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + keepdir /var/lib/node_exporter /var/log/node_exporter + fowners ${PN}:${PN} /var/lib/node_exporter /var/log/node_exporter +} |