2025-01-04 23:59:33 +01:00
|
|
|
# Copyright 1999-2025 Gentoo Authors
|
2022-09-20 13:33:15 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=8
|
|
|
|
|
|
|
|
inherit go-module systemd
|
|
|
|
|
|
|
|
DESCRIPTION="Prometheus Exporter for Postfix"
|
|
|
|
HOMEPAGE="https://github.com/kumina/postfix_exporter"
|
2025-01-04 23:52:24 +01:00
|
|
|
SRC_URI="
|
|
|
|
https://github.com/kumina/postfix_exporter/archive/${PV}.tar.gz -> ${P}.tar.gz
|
|
|
|
https://dev.gentoo.org/~arthurzam/distfiles/app-metrics/${PN}/${P}-deps.tar.xz
|
|
|
|
"
|
2022-09-20 23:07:34 +02:00
|
|
|
|
2025-01-04 23:52:24 +01:00
|
|
|
LICENSE="Apache-2.0 BSD MIT"
|
2022-09-20 13:33:15 +02:00
|
|
|
SLOT="0"
|
2024-06-12 00:56:18 +02:00
|
|
|
KEYWORDS="~amd64"
|
2022-09-20 13:33:15 +02:00
|
|
|
IUSE="systemd"
|
2025-01-04 23:52:24 +01:00
|
|
|
RESTRICT+=" test"
|
2022-09-20 13:33:15 +02:00
|
|
|
|
2025-01-04 23:52:24 +01:00
|
|
|
RDEPEND="
|
|
|
|
acct-group/postfix_exporter
|
|
|
|
acct-user/postfix_exporter
|
|
|
|
"
|
|
|
|
DEPEND="${RDEPEND}
|
|
|
|
systemd? ( sys-apps/systemd )
|
|
|
|
"
|
2022-09-20 13:33:15 +02:00
|
|
|
|
|
|
|
src_compile() {
|
2025-01-04 23:52:24 +01:00
|
|
|
ego build -tags "$(usex systemd '' 'nosystemd')" -v -o bin/${PN}
|
2022-09-20 13:33:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2025-01-04 23:52:24 +01:00
|
|
|
dobin bin/${PN}
|
2022-09-20 13:33:15 +02:00
|
|
|
dodoc {CHANGELOG,README}.md
|
2025-01-04 23:52:24 +01:00
|
|
|
keepdir /var/log/${PN}
|
|
|
|
fowners ${PN}:${PN} /var/log/${PN}
|
2022-09-20 13:33:15 +02:00
|
|
|
newinitd "${FILESDIR}"/${PN}.initd ${PN}
|
|
|
|
newconfd "${FILESDIR}"/${PN}-1.confd ${PN}
|
|
|
|
insinto /etc/logrotate.d
|
|
|
|
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
|
2025-01-04 23:52:24 +01:00
|
|
|
systemd_dounit "${FILESDIR}"/${PN}.service
|
2022-09-20 13:33:15 +02:00
|
|
|
}
|