summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/prometheus/Manifest1
-rw-r--r--net-analyzer/prometheus/prometheus-1.6.2.ebuild59
2 files changed, 60 insertions, 0 deletions
diff --git a/net-analyzer/prometheus/Manifest b/net-analyzer/prometheus/Manifest
index 8583e2d5c006..5c481f4216f2 100644
--- a/net-analyzer/prometheus/Manifest
+++ b/net-analyzer/prometheus/Manifest
@@ -1,2 +1,3 @@
DIST prometheus-1.5.2.tar.gz 5183537 SHA256 c4881cc305263cc8da434be69a20aa039386d4feab5e58f8b89a60bfe8b556ac SHA512 5a08b26228b111c65431c0afce082962109f80435a5201ca0dd8883ba300da1f28865231c4182235df7ce4e2baa5b01d6a41cbb7ce29d9cb9f2e2853a2de81d4 WHIRLPOOL a8c2cb3ebd6a210316433a4ff63d18ac13ed196e297384d49e39da2ef88f49a01341af8c17ee5fa3090a3870a5b854c51fded90783afc2b08ebba83466ead856
DIST prometheus-1.6.1.tar.gz 5220870 SHA256 ecc9ce94fce45994c23b76eb0c5acbb1b942513be601872c8cd74d0821450c5e SHA512 c4d4604e23fcd6cecb408c5688a28f96a96145b9be7799ca64a1b31b6993a014450bb009f5eea342728aa099c70eeef8bcec65cc7ccf326cd5f71e9edcb22052 WHIRLPOOL 74ec10d2fa8c833dbde370a399f0b7bda07bd4b9b4fc19958246eb81cfd8e17fb90d1e283791d200cbe3c4b6dfcd5a8ed9d705a5b7c4112a152f385d7d5b5a44
+DIST prometheus-1.6.2.tar.gz 5160925 SHA256 026fd958ae3792938613675f455131e954552471d15df971251b46e64ca50b35 SHA512 ae34f64d6ab2c01cb872b882e78e713b65a9ac2d42a8f6d8eaf448874d01db7b60cdc0a652a19812f9fb17d17e1454b09fc762bf624fef67d7bad56634245948 WHIRLPOOL d9e8817034d7347a57196b30a0c8293b0d44158b1a60b0d7ad6361899911a7a39ff2f4dc9fbe55d0203907dacbab4b19ba42fe954b840bd78d683c89db00700f
diff --git a/net-analyzer/prometheus/prometheus-1.6.2.ebuild b/net-analyzer/prometheus/prometheus-1.6.2.ebuild
new file mode 100644
index 000000000000..e4a88e179cdb
--- /dev/null
+++ b/net-analyzer/prometheus/prometheus-1.6.2.ebuild
@@ -0,0 +1,59 @@
+# 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/prometheus/..."
+EGIT_COMMIT="v${PV}"
+PROMETHEUS_COMMIT="b38e977"
+ARCHIVE_URI="https://${EGO_PN%/*}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="Prometheus monitoring system and time series database"
+HOMEPAGE="https://github.com/prometheus/prometheus"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+DEPEND=">=dev-lang/go-1.8
+ dev-util/promu"
+
+PROMETHEUS_HOME="/var/lib/prometheus"
+
+RESTRICT="test"
+
+pkg_setup() {
+ enewgroup prometheus
+ enewuser prometheus -1 -1 "${PROMETHEUS_HOME}" prometheus
+}
+
+src_prepare() {
+ default
+ sed -i -e "s/{{.Revision}}/${PROMETHEUS_COMMIT}/" src/${EGO_PN%/*}/.promu.yml || die
+}
+
+src_compile() {
+ pushd src/${EGO_PN%/*} || die
+ GOPATH="${S}" promu build -v || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN%/*} || die
+ dobin promtool prometheus
+ dodoc -r {documentation,{README,CHANGELOG,CONTRIBUTING}.md}
+ insinto /etc/prometheus
+ doins documentation/examples/prometheus.yml
+ insinto /usr/share/prometheus
+ doins -r console_libraries consoles
+ dosym ../../usr/share/prometheus/console_libraries /etc/prometheus/console_libraries
+ dosym ../../usr/share/prometheus/consoles /etc/prometheus/consoles
+ popd || die
+
+ newinitd "${FILESDIR}"/prometheus.initd prometheus
+ newconfd "${FILESDIR}"/prometheus.confd prometheus
+ keepdir /var/log/prometheus /var/lib/prometheus
+ fowners prometheus:prometheus /var/log/prometheus /var/lib/prometheus
+}