summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2017-06-05 17:24:05 +0200
committerManuel Rüger <mrueg@gentoo.org>2017-06-05 17:24:05 +0200
commit4bc00c61a80e4fb21fa62b702797c9976366b923 (patch)
treef8842cea9c764f46c27c5fe429af265626ea9b06 /net-analyzer/prometheus-node_exporter/prometheus-node_exporter-0.14.0.ebuild
parentapp-misc/go-jira: Initial version (diff)
downloadgentoo-4bc00c61a80e4fb21fa62b702797c9976366b923.tar.gz
gentoo-4bc00c61a80e4fb21fa62b702797c9976366b923.tar.bz2
gentoo-4bc00c61a80e4fb21fa62b702797c9976366b923.zip
net-analyzer/prometheus-node_exporter: Version bump to 0.14.0
* Rename to node_exporter * Rename user/group to prometheus-node_exporter * Store textfiles in /var/node_exporter/textfiles Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'net-analyzer/prometheus-node_exporter/prometheus-node_exporter-0.14.0.ebuild')
-rw-r--r--net-analyzer/prometheus-node_exporter/prometheus-node_exporter-0.14.0.ebuild48
1 files changed, 48 insertions, 0 deletions
diff --git a/net-analyzer/prometheus-node_exporter/prometheus-node_exporter-0.14.0.ebuild b/net-analyzer/prometheus-node_exporter/prometheus-node_exporter-0.14.0.ebuild
new file mode 100644
index 00000000000..7632511c4c1
--- /dev/null
+++ b/net-analyzer/prometheus-node_exporter/prometheus-node_exporter-0.14.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="github.com/prometheus/node_exporter"
+EGIT_COMMIT="v${PV/_rc/-rc.}"
+NODE_EXPORTER_COMMIT="840ba5d"
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="Prometheus exporter for machine metrics"
+HOMEPAGE="https://github.com/prometheus/prometheus"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-util/promu"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 -1 ${PN}
+}
+
+src_prepare() {
+ default
+ sed -i -e "s/{{.Revision}}/${NODE_EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die
+}
+
+src_compile() {
+ pushd src/${EGO_PN} || die
+ mkdir -p bin || die
+ GOPATH="${S}" promu build -v --prefix node_exporter || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dobin node_exporter
+ dodoc {README,CHANGELOG,CONTRIBUTING}.md
+ popd || die
+ keepdir /var/node_exporter /var/log/node_exporter
+ fowners ${PN}:${PN} /var/node_exporter /var/log/node_exporter
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}