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/
Date: Tue, 07 Feb 2017 16:03:53
Message-Id: 1486483405.a59dd480a2dad1bbccef58320df4804c8ecb19df.mrueg@gentoo
1 commit: a59dd480a2dad1bbccef58320df4804c8ecb19df
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 7 16:03:25 2017 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 7 16:03:25 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a59dd480
7
8 net-analyzer/prometheus: Version bump to 1.5.1
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.1
11
12 net-analyzer/prometheus/Manifest | 1 +
13 net-analyzer/prometheus/prometheus-1.5.1.ebuild | 57 +++++++++++++++++++++++++
14 2 files changed, 58 insertions(+)
15
16 diff --git a/net-analyzer/prometheus/Manifest b/net-analyzer/prometheus/Manifest
17 index e4df2dc..427790f 100644
18 --- a/net-analyzer/prometheus/Manifest
19 +++ b/net-analyzer/prometheus/Manifest
20 @@ -1 +1,2 @@
21 DIST prometheus-1.5.0.tar.gz 5182830 SHA256 f8eae5f4c51fdd73ceec08fc4895e695b6b02b581aa95e742e0f48f5aefc5537 SHA512 e90ae333c15335d449332487f6bf3d6a64d356208604850ece7ea8568e7e78f500dfc92219e11d57a01231671586de8c76173254b97fcb92fc14787c8c2a2ed7 WHIRLPOOL 42f2f93bdb04c2fa788c17bc4cd2be9b1c3a1de274c01cbba05b2623d902ef236a78092a1e45eb510fe9fdb20f68ab9b82fe1a958b7cc85e240efa0f1e387b06
22 +DIST prometheus-1.5.1.tar.gz 5181576 SHA256 5b8e61edc6b192a5b036fb1e76edcfc8948dbb1bfb05669fab49fdbb37349991 SHA512 3db32bcf0a0d0b0ee010b990167571547ffa90f69a94fe41fa91ac9762e66ce167866a53c54d7aeb46e2f9bd03466a287d9476458c18267d3c45d1a3a358ec5e WHIRLPOOL cd98b4cf587634fc011a78b722012e770d5e5104f54725441f23ea1ed1eb861534780943f6bb9a5277f629f7663a926e1c2ae103014925fe9b34d43581cfc0d7
23
24 diff --git a/net-analyzer/prometheus/prometheus-1.5.1.ebuild b/net-analyzer/prometheus/prometheus-1.5.1.ebuild
25 new file mode 100644
26 index 00000000..efc63a5
27 --- /dev/null
28 +++ b/net-analyzer/prometheus/prometheus-1.5.1.ebuild
29 @@ -0,0 +1,57 @@
30 +# Copyright 1999-2017 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI=6
35 +inherit user golang-build golang-vcs-snapshot
36 +
37 +EGO_PN="github.com/prometheus/prometheus/..."
38 +EGIT_COMMIT="v${PV}"
39 +PROMETHEUS_COMMIT="c4686f7"
40 +ARCHIVE_URI="https://${EGO_PN%/*}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
41 +KEYWORDS="~amd64"
42 +
43 +DESCRIPTION="Prometheus monitoring system and time series database"
44 +HOMEPAGE="https://github.com/prometheus/prometheus"
45 +SRC_URI="${ARCHIVE_URI}"
46 +LICENSE="Apache-2.0"
47 +SLOT="0"
48 +IUSE=""
49 +
50 +DEPEND="dev-util/promu"
51 +
52 +PROMETHEUS_HOME="/var/lib/prometheus"
53 +
54 +pkg_setup() {
55 + enewgroup prometheus
56 + enewuser prometheus -1 -1 "${PROMETHEUS_HOME}" prometheus
57 +}
58 +
59 +src_prepare() {
60 + default
61 + sed -i -e "s/{{.Revision}}/${PROMETHEUS_COMMIT}/" src/${EGO_PN%/*}/.promu.yml || die
62 +}
63 +
64 +src_compile() {
65 + pushd src/${EGO_PN%/*} || die
66 + GOPATH="${S}" promu build -v || die
67 + popd || die
68 +}
69 +
70 +src_install() {
71 + pushd src/${EGO_PN%/*} || die
72 + dobin promtool prometheus
73 + dodoc -r {documentation,{README,CHANGELOG,CONTRIBUTING}.md}
74 + insinto /etc/prometheus
75 + doins documentation/examples/prometheus.yml
76 + insinto /usr/share/prometheus
77 + doins -r console_libraries consoles
78 + dosym ../../usr/share/prometheus/console_libraries /etc/prometheus/console_libraries
79 + dosym ../../usr/share/prometheus/consoles /etc/prometheus/consoles
80 + popd || die
81 +
82 + newinitd "${FILESDIR}"/prometheus.initd prometheus
83 + newconfd "${FILESDIR}"/prometheus.confd prometheus
84 + keepdir /var/log/prometheus /var/lib/prometheus
85 + fowners prometheus:prometheus /var/log/prometheus /var/lib/prometheus
86 +}