diff options
Diffstat (limited to 'app-metrics/smartctl_exporter')
-rw-r--r-- | app-metrics/smartctl_exporter/Manifest | 1 | ||||
-rw-r--r-- | app-metrics/smartctl_exporter/smartctl_exporter-0.12.0-r1.ebuild | 65 |
2 files changed, 66 insertions, 0 deletions
diff --git a/app-metrics/smartctl_exporter/Manifest b/app-metrics/smartctl_exporter/Manifest index cbc7769c0037..2a229d2609cb 100644 --- a/app-metrics/smartctl_exporter/Manifest +++ b/app-metrics/smartctl_exporter/Manifest @@ -1,4 +1,5 @@ DIST smartctl_exporter-0.11.0-vendor.tar.xz 1348836 BLAKE2B 06999c2df7891d6579a227dc5eab44240f923f3466ce1da8443bc40afcb7d9c493f94d50a083ea26e03969b89c9cff4e977f9cffc8529dac5c323212c139dd9e SHA512 c54bf342e56db7086a3844d96f910a18b9d0e19a434b554421e9c70b02fdf3b2307da6662a0e02de93adedf9484444bbbcb7225659b26273e6106cbf73aa3dbd DIST smartctl_exporter-0.11.0.tar.gz 29097 BLAKE2B 7e3d85588a83380f8d579a918677d9910ba1922212af65b1918a379315e9f2321f617c5d884fd72086019ddac353817da5d1ec71a8a8b0ecb3edb24f66dd75fa SHA512 2c86d051d17c55e3122130ad4733c5911310698a89d8782a61f3b5541cb7aa689994338125eaa5ee41fdcddbdd8316a6736c734ff5dee6fe0d6c0a2b131fff66 +DIST smartctl_exporter-0.12.0-d33b5a391f4a18b3d9c0a194e57cdd3491130099.patch 4997 BLAKE2B cf03225eeaea9553e6e0686450efc574c3c0b9b67cce0866a514cdd19ef6d91f6c5e4253fad9ac10a99bc92c6057ca27cce3bde1ebe3942e2fe0fb8070c6e199 SHA512 2ca0ad57fb4cb92a5db6cffa650a7045eb5c309e3cecf227c971262617d94e4a32cdc1d9465a7030d9b24d243f1a717d92d3b327dc494fb18e57d9da67b59002 DIST smartctl_exporter-0.12.0-vendor.tar.xz 1400804 BLAKE2B 5c4ba0440860c86d3a3bd84308c97a6fe1eaf231776ed64840f6ebd3cad533bab5f8b97ee9f4c3d573b08442fc66f565c8b83a7f70fea889cf2e9e1337ce24cc SHA512 28e235eb6e560042ae0783a1fb1276ff07dff5e838f1f2d6a93886f0fdea85151b1c1c87c8476d42524f7e563a58ae30f354fa1138a93fcbe0f39ff7bcba0b3d DIST smartctl_exporter-0.12.0.tar.gz 91406 BLAKE2B 9ab0fa3e4dcee1e21a566cd9677b99f579f60e761d40d9ab1dd75380bbff9c189d9895ee2e914d1b6bdeee0c5b6d185c71ae62f4ce7585b3954192091cc96e25 SHA512 8f2cc973fd967c9ab737dcaa7456f019cb574ac3297bd5d15559167cde51f8076bcb48c7befb7efb869e056c1c5e404f4bb2774e8fe020736354ede4ae3e77f3 diff --git a/app-metrics/smartctl_exporter/smartctl_exporter-0.12.0-r1.ebuild b/app-metrics/smartctl_exporter/smartctl_exporter-0.12.0-r1.ebuild new file mode 100644 index 000000000000..a538f9f1c89b --- /dev/null +++ b/app-metrics/smartctl_exporter/smartctl_exporter-0.12.0-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit go-module systemd + +DESCRIPTION="Export smartctl statistics to prometheus" +HOMEPAGE="https://github.com/prometheus-community/smartctl_exporter" + +# uncomment the first setting of MY_PV for a normal release +# MY_PV="v${PV/_rc/-rc.}" +# set MY_PV to the full commit hash for a snapshot release +MY_PV_HASH= +: ${MY_PV_HASH_FOR_VENDOR:=${MY_PV_HASH}} +if [[ -n "${MY_PV_HASH}" ]]; then + MY_PV=${MY_PV_HASH} + SMARTCTL_EXPORTER_COMMIT=${MY_PV_HASH:0:8} + SRC_URI_UPSTREAM="${HOMEPAGE}/archive/${MY_PV}.tar.gz" +else + MY_PV=$PV + SMARTCTL_EXPORTER_COMMIT= + SRC_URI_UPSTREAM="${HOMEPAGE}/archive/refs/tags/v${PV}.tar.gz" +fi +MY_P=${PN}-${MY_PV} +SRC_URI_VENDOR="https://dev.gentoo.org/~robbat2/distfiles/${MY_P}-vendor.tar.xz" +UPSTREAM_PATCHES=( + 0.12.0:d33b5a391f4a18b3d9c0a194e57cdd3491130099 +) +SRC_URI=" + ${SRC_URI_UPSTREAM} -> ${P}.tar.gz + ${SRC_URI_VENDOR} + " +PATCHES=() +for p in $UPSTREAM_PATCHES; do + SRC_URI+=" https://github.com/prometheus-community/smartctl_exporter/commit/${p/*:}.patch -> ${PN}-${p/:/-}.patch" + PATCHES+=( "${DISTDIR}/${PN}-${p/:/-}.patch" ) +done + +# Upstream LICENSE file is wrong see https://github.com/prometheus-community/smartctl_exporter/pull/113 +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +BDEPEND="dev-util/promu" +DEPEND="dev-lang/go" +RDEPEND="sys-apps/smartmontools" + +src_prepare() { + default + if [[ -n $SMARTCTL_EXPORTER_COMMIT ]]; then + sed -i -e "s/{{.Revision}}/${SMARTCTL_EXPORTER_COMMIT}/" .promu.yml || die + fi +} + +src_compile() { + emake build PROMU='/usr/bin/promu' +} + +src_install() { + dodoc *.md + dobin ${PN} + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + systemd_dounit "${FILESDIR}/${PN}.service" + +} |