1 |
commit: 61d87f417502ffe6d2423846692afc1d7a428f23 |
2 |
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 27 18:54:29 2018 +0000 |
4 |
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 27 18:54:29 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61d87f41 |
7 |
|
8 |
net-analyzer/prometheus-alertmanager: Install amtool |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
.../prometheus-alertmanager-0.14.0-r1.ebuild | 52 ++++++++++++++++++++++ |
13 |
1 file changed, 52 insertions(+) |
14 |
|
15 |
diff --git a/net-analyzer/prometheus-alertmanager/prometheus-alertmanager-0.14.0-r1.ebuild b/net-analyzer/prometheus-alertmanager/prometheus-alertmanager-0.14.0-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..43de943ea4f |
18 |
--- /dev/null |
19 |
+++ b/net-analyzer/prometheus-alertmanager/prometheus-alertmanager-0.14.0-r1.ebuild |
20 |
@@ -0,0 +1,52 @@ |
21 |
+# Copyright 1999-2018 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=6 |
25 |
+inherit user golang-build golang-vcs-snapshot |
26 |
+ |
27 |
+EGO_PN="github.com/prometheus/alertmanager" |
28 |
+EGIT_COMMIT="v${PV/_rc/-rc.}" |
29 |
+ALERTMANAGER_COMMIT="fb713f6" |
30 |
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" |
31 |
+KEYWORDS="~amd64" |
32 |
+ |
33 |
+DESCRIPTION="Alertmanager for alerts sent by client applications such as Prometheus" |
34 |
+HOMEPAGE="https://github.com/prometheus/alertmanager" |
35 |
+SRC_URI="${ARCHIVE_URI}" |
36 |
+LICENSE="Apache-2.0" |
37 |
+SLOT="0" |
38 |
+IUSE="" |
39 |
+ |
40 |
+DEPEND="dev-util/promu" |
41 |
+ |
42 |
+RESTRICT="test" |
43 |
+ |
44 |
+pkg_setup() { |
45 |
+ enewgroup ${PN} |
46 |
+ enewuser ${PN} -1 -1 -1 ${PN} |
47 |
+} |
48 |
+ |
49 |
+src_prepare() { |
50 |
+ default |
51 |
+ sed -i -e "s/{{.Revision}}/${ALERTMANAGER_COMMIT}/" src/${EGO_PN}/.promu.yml || die |
52 |
+} |
53 |
+ |
54 |
+src_compile() { |
55 |
+ pushd src/${EGO_PN} || die |
56 |
+ mkdir -p bin || die |
57 |
+ GOPATH="${S}" promu build -v --prefix bin || die |
58 |
+ popd || die |
59 |
+} |
60 |
+ |
61 |
+src_install() { |
62 |
+ pushd src/${EGO_PN} || die |
63 |
+ dobin bin/* |
64 |
+ dodoc {README,CHANGELOG,CONTRIBUTING}.md |
65 |
+ insinto /etc/alertmanager/ |
66 |
+ newins doc/examples/simple.yml config.yml.example |
67 |
+ popd || die |
68 |
+ keepdir /var/lib/alertmanager /var/log/alertmanager |
69 |
+ fowners ${PN}:${PN} /var/lib/alertmanager /var/log/alertmanager |
70 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
71 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
72 |
+} |