Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/prometheus-snmp_exporter/
Date: Tue, 27 Feb 2018 12:30:17
Message-Id: 1519734596.686c680c3c5d9244c639628f646a3c501de013c5.mrueg@gentoo
1 commit: 686c680c3c5d9244c639628f646a3c501de013c5
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 27 12:29:56 2018 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 27 12:29:56 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=686c680c
7
8 net-analyzer/prometheus-snmp_exporter: Version bump to 0.9.0
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 net-analyzer/prometheus-snmp_exporter/Manifest | 1 +
13 .../prometheus-snmp_exporter-0.9.0.ebuild | 50 ++++++++++++++++++++++
14 2 files changed, 51 insertions(+)
15
16 diff --git a/net-analyzer/prometheus-snmp_exporter/Manifest b/net-analyzer/prometheus-snmp_exporter/Manifest
17 index 5d9c2d327e0..e10472f330c 100644
18 --- a/net-analyzer/prometheus-snmp_exporter/Manifest
19 +++ b/net-analyzer/prometheus-snmp_exporter/Manifest
20 @@ -1 +1,2 @@
21 DIST prometheus-snmp_exporter-0.8.0.tar.gz 3257344 BLAKE2B 32f0cf6c72b518fc62c420bf64ed04243bef8f9b70be2fba15472f63871e96bc113ddc7fe2e6265a29facf8c32c1d3f245bf6fc2dbce934876ebac0225069642 SHA512 0cae5fc107baedd8d498972aa7c6b3b48ff19f951c5366e5be5173009e956de8da06b84a46926d6f157287df0793e996686740c491f502da24172d5806b49339
22 +DIST prometheus-snmp_exporter-0.9.0.tar.gz 3257207 BLAKE2B 3e7e91d7e66b32e3f84c9e53061f54ffc10116913b91598edfa011663daf2c67314661dbe6cd5b2c20b30968833bd64a48bdd5dd06694e76f1e787d59ad63933 SHA512 eb287f4519f2174a9ce80414c2b7a698bc50e1bcb2303a8190164002af088e0694e01233314cfe2bd89b2cd751f2fd6f8447eb641541701b7bd481373ce084b1
23
24 diff --git a/net-analyzer/prometheus-snmp_exporter/prometheus-snmp_exporter-0.9.0.ebuild b/net-analyzer/prometheus-snmp_exporter/prometheus-snmp_exporter-0.9.0.ebuild
25 new file mode 100644
26 index 00000000000..2d73fe9faa4
27 --- /dev/null
28 +++ b/net-analyzer/prometheus-snmp_exporter/prometheus-snmp_exporter-0.9.0.ebuild
29 @@ -0,0 +1,50 @@
30 +# Copyright 1999-2018 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=6
34 +inherit user golang-build golang-vcs-snapshot
35 +
36 +EGO_PN="github.com/prometheus/snmp_exporter"
37 +EGIT_COMMIT="v${PV/_rc/-rc.}"
38 +SNMP_EXPORTER_COMMIT="abb143a"
39 +ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
40 +KEYWORDS="~amd64"
41 +
42 +DESCRIPTION="Prometheus exporter for snmp metrics"
43 +HOMEPAGE="https://github.com/prometheus/snmp_exporter"
44 +SRC_URI="${ARCHIVE_URI}"
45 +LICENSE="Apache-2.0"
46 +SLOT="0"
47 +IUSE=""
48 +
49 +DEPEND="dev-util/promu"
50 +
51 +pkg_setup() {
52 + enewgroup ${PN}
53 + enewuser ${PN} -1 -1 -1 ${PN}
54 +}
55 +
56 +src_prepare() {
57 + default
58 + sed -i -e "s/{{.Revision}}/${SNMP_EXPORTER_COMMIT}/" src/${EGO_PN}/.promu.yml || die
59 +}
60 +
61 +src_compile() {
62 + pushd src/${EGO_PN} || die
63 + mkdir -p bin || die
64 + GOPATH="${S}" promu build -v --prefix snmp_exporter || die
65 + popd || die
66 +}
67 +
68 +src_install() {
69 + pushd src/${EGO_PN} || die
70 + dobin snmp_exporter/snmp_exporter
71 + dodoc {README,CONTRIBUTING}.md
72 + insinto /etc/snmp_exporter
73 + newins snmp.yml snmp.yml.example
74 + popd || die
75 + keepdir /var/lib/snmp_exporter /var/log/snmp_exporter
76 + fowners ${PN}:${PN} /var/lib/snmp_exporter /var/log/snmp_exporter
77 + newinitd "${FILESDIR}"/${PN}.initd ${PN}
78 + newconfd "${FILESDIR}"/${PN}.confd ${PN}
79 +}