summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2022-06-10 13:02:24 -0700
committerZac Medico <zmedico@gentoo.org>2022-06-10 13:02:24 -0700
commit31827bd0d94321c537a1b572da2c2f3f7e6480d0 (patch)
treea8d98a96ace19a85258607fa15e823f1e00bc005
parentsys-fs/fuse-overlayfs: add 1.9 (diff)
downloadgentoo-31827bd0d94321c537a1b572da2c2f3f7e6480d0.tar.gz
gentoo-31827bd0d94321c537a1b572da2c2f3f7e6480d0.tar.bz2
gentoo-31827bd0d94321c537a1b572da2c2f3f7e6480d0.zip
app-metrics/redis_exporter: add 1.40.0
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--app-metrics/redis_exporter/Manifest1
-rw-r--r--app-metrics/redis_exporter/redis_exporter-1.40.0.ebuild55
2 files changed, 56 insertions, 0 deletions
diff --git a/app-metrics/redis_exporter/Manifest b/app-metrics/redis_exporter/Manifest
index 4ded601b32ac..65c3c5bb2b2d 100644
--- a/app-metrics/redis_exporter/Manifest
+++ b/app-metrics/redis_exporter/Manifest
@@ -2,3 +2,4 @@ DIST redis_exporter-1.37.0-deps.tar.xz 6710680 BLAKE2B acc2a0d0ac448e86e71abb9c1
DIST redis_exporter-1.37.0.tar.gz 186024 BLAKE2B 8d0e5791fe07d24b740ea8aa250f835d1a4e84d231e59bf64914062a277ec73e8b3e6a3337f769854fa01faaf68f40878b08a813498e6d282295f90d67fb3eb1 SHA512 80992066e510e329bed0a7ba216020a3107bee2446546b3505ffb012b9919eced2f8863d0a82d5d99945bc223cc9dd2ae4efc1d82a4b486257d5f20bf62fd5c6
DIST redis_exporter-1.38.0-deps.tar.xz 103185452 BLAKE2B a144d70cd20887dca660fc4f4d2d2ce16dc8463ef0906499c730acb11d717d5c5cf8ab9985ffafd4f9c0cf93c677b2e98895a3b48e9f2e1a2813de96e536d89d SHA512 31927c0dfc4c960ad3a91be387fa6b7b2603a6b9c9927b9d50ae9986beae866eb1c04cbcb2699265fecf201bda83e16746e4c8991b8f4560248c19d17c2744e4
DIST redis_exporter-1.38.0.tar.gz 188310 BLAKE2B 8e1c7ec8635fd3b83a4ef56b6ebd3ad982363b94654be273197be5cd08f64d453a4c3306aa8dcb69023d5ef7e0a2542d23076e4e13456494c8b1fa4637343368 SHA512 540dd3f8e5a64d6070e298b5272460f022bdc9c2f69b88bbfff033aedd26a0d5310b4df768c0b0572a97c76b859de7bba67711fab81c681fc3b7b5bc68b5b7eb
+DIST redis_exporter-1.40.0.tar.gz 188796 BLAKE2B f2bb4d05129f4644d58fae005c13737f76222d32c08b9938a4b4fbb8c5000a6a00529204d839b96ae53f489183caf01ecb113535648cd80b0e9d3872ad35a8b1 SHA512 0909f71b32434bd2b47db505cd48cd5d34c4c7cfa04b513ff53c265bbd6b91c15f4e7bcf18e4b4e1c52940dafe53eed43ab9ae4db33071cd827a6d798878736b
diff --git a/app-metrics/redis_exporter/redis_exporter-1.40.0.ebuild b/app-metrics/redis_exporter/redis_exporter-1.40.0.ebuild
new file mode 100644
index 000000000000..2c43a3723319
--- /dev/null
+++ b/app-metrics/redis_exporter/redis_exporter-1.40.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=3a743038c6c5a80d10ce45a3fbd49412262c300b
+
+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"
+}