gentoo-overlay/app-metrics/apache_exporter/apache_exporter-0.13.3.ebuild
Manuel Friedli be9c6d9676 Add latest version of apache_exporter.
Signed-off-by: Manuel Friedli <manuel@fritteli.ch>
2023-05-29 00:15:04 +02:00

36 lines
983 B
Bash

# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module systemd
DESCRIPTION="Prometheus exporter for apache metrics"
HOMEPAGE="https://github.com/Lusitaniae/apache_exporter"
SRC_URI="https://github.com/Lusitaniae/apache_exporter/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://manuel.friedli.info/gentoo-overlay/${P}-vendor.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="acct-group/apache_exporter
acct-user/apache_exporter"
RDEPEND="${DEPEND}"
src_compile() {
ego build
}
src_install() {
dobin apache_exporter
dodoc README.md
newinitd "${FILESDIR}"/apache_exporter.initd apache_exporter
newconfd "${FILESDIR}"/apache_exporter.confd apache_exporter
systemd_dounit "${FILESDIR}"/apache_exporter.service
insinto /etc/sysconfig
newins "${FILESDIR}/sysconfig.apache_exporter" apache_exporter
keepdir /var/log/apache_exporter
fowners -R ${PN}:${PN} /var/log/apache_exporter
}