commit:     305e2ff7cf38a868fcc61556085f677623751f18
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 18 12:26:51 2025 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 18 12:27:41 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=305e2ff7

app-metrics/prom2json: add 1.4.1

Closes: https://bugs.gentoo.org/844622
Closes: https://bugs.gentoo.org/680078
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 app-metrics/prom2json/Manifest               |  2 ++
 app-metrics/prom2json/prom2json-1.4.1.ebuild | 40 ++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/app-metrics/prom2json/Manifest b/app-metrics/prom2json/Manifest
index 698cd6719906..bf31513c6dd5 100644
--- a/app-metrics/prom2json/Manifest
+++ b/app-metrics/prom2json/Manifest
@@ -1 +1,3 @@
 DIST prom2json-1.3.0.tar.gz 1646893 BLAKE2B 
9b8fcfa4a3e45ee08a57016fa6a7611604cbb578f162f0bf7ff8338f345f98788b75c3ac047ffca95b62020e972c302bc1c44f2f7f00240cfd978f73b8d9c829
 SHA512 
8f02c7b2616d915e2b4ff5f195a8c2eff89d18417f7396dc02d2aa4cf34711358b0beef6effae9b42a3d6f4b0616c5d3ab995a73ab9e37a4a0ec230adff6f249
+DIST prom2json-1.4.1-deps.tar.xz 2788996 BLAKE2B 
b720c8d4fb0157c63873e2c15ad2adaef057ac6e6f340d25b321f9a380ee35d6d8eac153fc4cd6e75e60f0a75f6f74c17d8caaa51c46cead0e9942a2b9e29660
 SHA512 
47f33537a83ed0d24f49f3faa1805593ad4f848b1ff79fe19d3a6a3b2dc3a1e1587217ea7a985c6ae4eae4aca2fac2cff8773e3782c0d0e265722341d0296247
+DIST prom2json-1.4.1.tar.gz 21261 BLAKE2B 
76d0f4ba6f7433fbb8701945d297df5fd011d2c62ca39c12647c114202e0a74db8d2c08808b179a5b07f08b7ec7742da238dec9b31bead6b1414b1265f495834
 SHA512 
4ec0aad8df3e1da4768fdf0c81c4f556589c7d84bee05ad5cf00eface323f3d8770ccb1c48b43a1598be4455307c21af3a0e62842c429ac194e34535b02fa8e8

diff --git a/app-metrics/prom2json/prom2json-1.4.1.ebuild 
b/app-metrics/prom2json/prom2json-1.4.1.ebuild
new file mode 100644
index 000000000000..34d59e6ec49d
--- /dev/null
+++ b/app-metrics/prom2json/prom2json-1.4.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit go-module edo
+
+GIT_COMMIT=e76e84858a35a1094458b792c631cb75867fd550
+
+DESCRIPTION="A tool to scrape a Prometheus client and dump the result as JSON"
+HOMEPAGE="https://github.com/prometheus/prom2json";
+SRC_URI="https://github.com/prometheus/prom2json/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+SRC_URI+=" 
https://dev.gentoo.org/~arthurzam/distfiles/app-metrics/${PN}/${P}-deps.tar.xz";
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+BDEPEND="dev-util/promu"
+
+src_prepare() {
+       default
+       sed -i .promu.yml \
+               -e "s/{{.Revision}}/${GIT_COMMIT}/" \
+               -e "s/{{.Version}}/${PV}/" || die
+}
+
+src_compile() {
+       mkdir bin || die
+       edo promu build --prefix bin
+}
+
+src_test() {
+       emake test-flags= test
+}
+
+src_install() {
+       dobin bin/*
+       dodoc {README,CONTRIBUTING}.md
+}

Reply via email to