pgmon/GENTOO/pgmon-1.0.0.ebuild

57 lines
1.0 KiB
Bash
Raw Normal View History

2025-01-14 06:54:35 +00:00
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{6..13} )
inherit git-r3 python-r1
DESCRIPTION="PostgreSQL monitoring bridge"
HOMEPAGE="None"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64"
2025-01-31 05:18:17 +00:00
SRC_URI="https://code2.shh-dot-com.org/james/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
2025-01-14 06:54:35 +00:00
DEPEND="
${PYTHON_DEPS}
dev-python/psycopg:2
dev-python/pyyaml
app-admin/logrotate
"
RDEPEND="${DEPEND}"
BDEPEND=""
2025-01-31 05:18:17 +00:00
S="${WORKDIR}/${PN}"
2025-01-14 06:54:35 +00:00
src_install() {
default
# Install init script
2025-01-31 05:18:17 +00:00
newinitd "openrc/pgmon.initd" pgmon
newconfd "openrc/pgmon.confd" pgmon
# Install systemd unit
systemd_dounit "systemd/pgmon.service"
2025-01-14 06:54:35 +00:00
# Install script
exeinto /usr/bin
2025-01-31 05:18:17 +00:00
newexe "pgmon.py" pgmon
2025-01-14 06:54:35 +00:00
# Install default config
diropts -o root -g root -m 0755
insinto /etc/pgmon
2025-01-31 05:18:17 +00:00
doins "sample-config/pgmon.yml"
doins "sample-config/pgmon-metrics.yml"
2025-01-14 06:54:35 +00:00
# Install logrotate config
insinto /etc/logrotate.d
2025-01-31 05:18:17 +00:00
newins "logrotate/pgmon.logrotate" pgmon
# Install man page
doman manpages/pgmon.1
2025-01-14 06:54:35 +00:00
}