summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2017-10-12 20:50:30 +0200
committerManuel Rüger <mrueg@gentoo.org>2017-10-12 20:50:30 +0200
commita69bfdca33b4ed605188b177d501e372b32ad35f (patch)
tree9cf4638a17255913bdb120b72973761f5046f636 /app-admin/prom2json/prom2json-0.1.0_p20170523.ebuild
parentnet-misc/iprange: stable 1.0.4 for ppc, bug #633690 (diff)
downloadgentoo-a69bfdca33b4ed605188b177d501e372b32ad35f.tar.gz
gentoo-a69bfdca33b4ed605188b177d501e372b32ad35f.tar.bz2
gentoo-a69bfdca33b4ed605188b177d501e372b32ad35f.zip
app-admin/prom2json: Initial version
Package-Manager: Portage-2.3.11, Repoman-2.3.3
Diffstat (limited to 'app-admin/prom2json/prom2json-0.1.0_p20170523.ebuild')
-rw-r--r--app-admin/prom2json/prom2json-0.1.0_p20170523.ebuild38
1 files changed, 38 insertions, 0 deletions
diff --git a/app-admin/prom2json/prom2json-0.1.0_p20170523.ebuild b/app-admin/prom2json/prom2json-0.1.0_p20170523.ebuild
new file mode 100644
index 000000000000..c1596c29bcef
--- /dev/null
+++ b/app-admin/prom2json/prom2json-0.1.0_p20170523.ebuild
@@ -0,0 +1,38 @@
+# 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/${PN}"
+EGIT_COMMIT="4a7436442837da72f9e211d99f0145dff3246b66"
+ARCHIVE_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="A tool to scrape a Prometheus client and dump the result as JSON"
+HOMEPAGE="https://github.com/prometheus/node_exporter"
+SRC_URI="${ARCHIVE_URI}"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-util/promu"
+
+src_prepare() {
+ default
+ sed -i -e "s/{{.Revision}}/${EGIT_COMMIT:0:7}/" src/${EGO_PN}/.promu.yml || die
+}
+
+src_compile() {
+ pushd src/${EGO_PN} || die
+ mkdir -p bin || die
+ GOPATH="${S}" promu build -v --prefix ${PN} || die
+ popd || die
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dobin ${PN}/${PN}
+ dodoc {README,CONTRIBUTING}.md
+ popd || die
+}