summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2022-06-18 13:30:08 -0700
committerZac Medico <zmedico@gentoo.org>2022-06-18 13:30:18 -0700
commit2cb57b4a8f9be0ffb8021cc2f4ca2bf97e2ebfb0 (patch)
tree81aa7dc611ce9719dff52b8912018bf68a182c43 /app-metrics
parentapp-metrics/redis_exporter: drop 1.37.0, 1.38.0 (diff)
downloadgentoo-2cb57b4a8f9be0ffb8021cc2f4ca2bf97e2ebfb0.tar.gz
gentoo-2cb57b4a8f9be0ffb8021cc2f4ca2bf97e2ebfb0.tar.bz2
gentoo-2cb57b4a8f9be0ffb8021cc2f4ca2bf97e2ebfb0.zip
app-metrics/redis_exporter: add 1.43.0
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'app-metrics')
-rw-r--r--app-metrics/redis_exporter/Manifest1
-rw-r--r--app-metrics/redis_exporter/redis_exporter-1.43.0.ebuild55
2 files changed, 56 insertions, 0 deletions
diff --git a/app-metrics/redis_exporter/Manifest b/app-metrics/redis_exporter/Manifest
index fe432ac11f8a..a1cc98ff90d6 100644
--- a/app-metrics/redis_exporter/Manifest
+++ b/app-metrics/redis_exporter/Manifest
@@ -1,2 +1,3 @@
DIST redis_exporter-1.38.0-deps.tar.xz 103185452 BLAKE2B a144d70cd20887dca660fc4f4d2d2ce16dc8463ef0906499c730acb11d717d5c5cf8ab9985ffafd4f9c0cf93c677b2e98895a3b48e9f2e1a2813de96e536d89d SHA512 31927c0dfc4c960ad3a91be387fa6b7b2603a6b9c9927b9d50ae9986beae866eb1c04cbcb2699265fecf201bda83e16746e4c8991b8f4560248c19d17c2744e4
DIST redis_exporter-1.40.0.tar.gz 188796 BLAKE2B f2bb4d05129f4644d58fae005c13737f76222d32c08b9938a4b4fbb8c5000a6a00529204d839b96ae53f489183caf01ecb113535648cd80b0e9d3872ad35a8b1 SHA512 0909f71b32434bd2b47db505cd48cd5d34c4c7cfa04b513ff53c265bbd6b91c15f4e7bcf18e4b4e1c52940dafe53eed43ab9ae4db33071cd827a6d798878736b
+DIST redis_exporter-1.43.0.tar.gz 189579 BLAKE2B 9340ed4710c8d3277bdd562555269b18fd2691b669f507c2306534848815edda8730e0aa718c6b159ba83b91fc89f99dc4480380e950c5f8e662931621a413d3 SHA512 3d2b6d5b58347ddf826de06d60571ef8962078c8ab03647b8f1a91fcdbe2b7e9be015335d09109b21471ee06a59d5e1ad947d9e1bbc681e430c270dc01ae48f2
diff --git a/app-metrics/redis_exporter/redis_exporter-1.43.0.ebuild b/app-metrics/redis_exporter/redis_exporter-1.43.0.ebuild
new file mode 100644
index 000000000000..b0437e9d3084
--- /dev/null
+++ b/app-metrics/redis_exporter/redis_exporter-1.43.0.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit go-module systemd
+EGIT_COMMIT=980a9741e77c4e065faba80805f93d4694d71d67
+
+DESCRIPTION="Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x and 4.x"
+HOMEPAGE="https://github.com/oliver006/redis_exporter"
+SRC_URI="https://github.com/oliver006/redis_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~zmedico/dist/redis_exporter-1.38.0-deps.tar.xz"
+
+LICENSE="MIT Apache-2.0 BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+RDEPEND="
+ acct-user/redis_exporter
+ acct-group/redis_exporter"
+DEPEND="${RDEPEND}"
+RESTRICT+=" test"
+
+src_prepare() {
+ default
+ sed -e "s|\(^[[:space:]]*VERSION[[:space:]]*=[[:space:]]*\).*|\1\"${PV}\"|" \
+ -e "s|\(^[[:space:]]*BUILD_DATE[[:space:]]*=[[:space:]]*\).*|\1\"$(LC_ALL=C date -u)\"|" \
+ -e "s|\(^[[:space:]]*COMMIT_SHA1[[:space:]]*=[[:space:]]*\).*|\1\"${EGIT_COMMIT}\"|" \
+ -i main.go || die
+}
+
+src_compile() {
+ export GOBIN="${S}/bin"
+ go install \
+ -ldflags="-X main.BuildVersion=${PV} -X main.BuildCommitSha=${EGIT_COMMIT} -X main.BuildDate=$(date +%F-%T)" \
+ ./... || die
+}
+
+src_test() {
+ go test -work ./... || die
+}
+
+src_install() {
+ dobin "${GOBIN}/redis_exporter"
+ dodoc README.md
+ local dir
+ for dir in /var/{lib,log}/${PN}; do
+ keepdir "${dir}"
+ fowners ${PN}:${PN} "${dir}"
+ done
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}"
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}