summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2024-12-15 13:35:50 -0800
committerZac Medico <zmedico@gentoo.org>2024-12-15 13:36:24 -0800
commitfcc09097f7083dd10a2de1c1dc4688d9a69a8be0 (patch)
tree7354a219befa899901b59e178afbea59dd6054c5 /app-metrics
parentx11-misc/polybar: drop 3.7.1-r1 (diff)
downloadgentoo-fcc09097f7083dd10a2de1c1dc4688d9a69a8be0.tar.gz
gentoo-fcc09097f7083dd10a2de1c1dc4688d9a69a8be0.tar.bz2
gentoo-fcc09097f7083dd10a2de1c1dc4688d9a69a8be0.zip
app-metrics/redis_exporter: add 1.67.0
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'app-metrics')
-rw-r--r--app-metrics/redis_exporter/Manifest2
-rw-r--r--app-metrics/redis_exporter/redis_exporter-1.67.0.ebuild59
2 files changed, 61 insertions, 0 deletions
diff --git a/app-metrics/redis_exporter/Manifest b/app-metrics/redis_exporter/Manifest
index 3b154bbebc05..1157dbafd958 100644
--- a/app-metrics/redis_exporter/Manifest
+++ b/app-metrics/redis_exporter/Manifest
@@ -1,2 +1,4 @@
DIST redis_exporter-1.61.0-deps.tar.xz 815816 BLAKE2B b57f1d3094e3e03f990a5b26b75d95621d55cdd519882689c640e90b76750b4f7de7d48ebc7dd8456af33e14be14a07644211921667d2ba6b16a5f2567fc8430 SHA512 176442e32ec79f8621f57712a2658398f9481f0ddb1c104881305f6cfa36b74833b53078355d7fdd5e4a3d13f546fdfb844d5faf7dc5e38763f7f17228de4d68
DIST redis_exporter-1.61.0.tar.gz 82438 BLAKE2B fe62e6c56206718eaf908de913dcb80dd9e27825dfc74b2f9bef3d4c914b75cfe0223924b852e8b99421ccbd0a3618bc9f9a0aea8c9a7733bcb95221731f7f97 SHA512 2528be4680b5cb2b1a1077a3a28ddac8f5a8a4a2b936504553cb218e8c53f8a9d9e52a9266c247f85bda03ae76eec90dbc9ab9bcc8df828d5850538e818d8188
+DIST redis_exporter-1.67.0-deps.tar.xz 955620 BLAKE2B d319e605a8685ec2a8dc441d42346009c019eabb385c758d8a7f09bff37ebe6c158f9a04353fdac51821b54dcdbee873bc747ae008d3dc2148e153eaeaa154d8 SHA512 e1dae9c1e941aaff88769008d70811c22d4ec2946076d43b74269a5fb6b1b12aa8bc0c73e114cf9ec9ecafe6b9af6ef8b0236fe6b3788bdfe7f94241785c6bfd
+DIST redis_exporter-1.67.0.tar.gz 87552 BLAKE2B d97f181f95b8ac44292892c6df031762fcea79eb8a06a224346152631ce18a5229d9ef14b53893709b83933053a8e47bedff52040a07849704b29961b1f69b54 SHA512 5acb905cf8b41c95013d917754837066e4c68535414c1459b985cea901c4cb1ab347be5715fec9d1306810915c4bcac2e4aea4a9fbf64403921b5ef30c6ab1a2
diff --git a/app-metrics/redis_exporter/redis_exporter-1.67.0.ebuild b/app-metrics/redis_exporter/redis_exporter-1.67.0.ebuild
new file mode 100644
index 000000000000..9c0c9e913b87
--- /dev/null
+++ b/app-metrics/redis_exporter/redis_exporter-1.67.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit go-module systemd
+EGIT_COMMIT=e2bb7fd6af3b950efa3267e4b932531098dc06b0
+
+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"
+SRC_URI+=" https://dev.gentoo.org/~zmedico/dist/${P}-deps.tar.xz"
+
+LICENSE="MIT Apache-2.0 BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+RDEPEND="
+ acct-user/redis_exporter
+ acct-group/redis_exporter"
+DEPEND="${RDEPEND}"
+RESTRICT="test"
+
+src_unpack() {
+ default
+}
+
+src_prepare() {
+ ln -sv ../vendor ./ || die
+ 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"
+}