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