Actually fix Gentoo ebuild for v1.0.1

This commit is contained in:
James Campbell 2025-05-14 02:42:10 -04:00
parent 2dfc336288
commit 030afafc20
Signed by: james
GPG Key ID: 2287C33A40DC906A
3 changed files with 15 additions and 115 deletions

View File

@ -1,52 +0,0 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{6..12} )
inherit git-r3 python-r1
DESCRIPTION="PostgreSQL monitoring bridge"
HOMEPAGE="None"
LICENSE="BSD"
SLOT="0"
KEYWORDS="amd64"
EGIT_REPO_URI="https://code2.shh-dot-com.org/james/pgmon.git"
#EGIT_COMMIT=""
DEPEND="
${PYTHON_DEPS}
dev-python/psycopg:3
dev-python/pyyaml
acct-user/zabbix
acct-group/zabbix
agent? ( net-analyzer/zabbix[agent] )
agent2? ( net-analyzer/zabbix[agent2] )
app-admin/logrotate
"
RDEPEND="${DEPEND}"
BDEPEND=""
src_install() {
default
# Install init script
newinitd "${FILESDIR}/pgmon.openrc" pgmon
# Install script
exeinto /usr/bin
newexe "${S}/pgmon.py" pgmon
# Install default config
diropts -o root -g zabbix -m 0755
insinto /etc/pgmon
doins "${FILESDIR}/pgmon.yml"
doins "${S}/pgmon-metrics.yml"
# Install logrotate config
insinto /etc/logrotate.d
newins "${FILESDIR}/pgmon.logrotate" pgmon
}

View File

@ -1,56 +0,0 @@
# 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"
SRC_URI="https://code2.shh-dot-com.org/james/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
DEPEND="
${PYTHON_DEPS}
dev-python/psycopg:2
dev-python/pyyaml
app-admin/logrotate
"
RDEPEND="${DEPEND}"
BDEPEND=""
S="${WORKDIR}/${PN}"
src_install() {
default
# Install init script
newinitd "openrc/pgmon.initd" pgmon
newconfd "openrc/pgmon.confd" pgmon
# Install systemd unit
systemd_dounit "systemd/pgmon.service"
# Install script
exeinto /usr/bin
newexe "pgmon.py" pgmon
# Install default config
diropts -o root -g root -m 0755
insinto /etc/pgmon
doins "sample-config/pgmon.yml"
doins "sample-config/pgmon-metrics.yml"
# Install logrotate config
insinto /etc/logrotate.d
newins "logrotate/pgmon.logrotate" pgmon
# Install man page
doman manpages/pgmon.1
}

View File

@ -16,6 +16,8 @@ KEYWORDS="amd64"
SRC_URI="https://code2.shh-dot-com.org/james/${PN}/archive/v${PV}.tar.bz2 -> ${P}.tar.bz2" SRC_URI="https://code2.shh-dot-com.org/james/${PN}/archive/v${PV}.tar.bz2 -> ${P}.tar.bz2"
IUSE="-systemd"
DEPEND=" DEPEND="
${PYTHON_DEPS} ${PYTHON_DEPS}
dev-python/psycopg:2 dev-python/psycopg:2
@ -27,7 +29,7 @@ BDEPEND=""
RESTRICT="fetch" RESTRICT="fetch"
S="${WORKDIR}/${PN}" #S="${WORKDIR}/${PN}"
pkg_nofetch() { pkg_nofetch() {
einfo "Please download" einfo "Please download"
@ -36,19 +38,25 @@ pkg_nofetch() {
einfo "The file should be owned by portage:portage." einfo "The file should be owned by portage:portage."
} }
src_install() { src_compile() {
default true
}
src_install() {
# Install init script # Install init script
if ! use systemd ; then
newinitd "openrc/pgmon.initd" pgmon newinitd "openrc/pgmon.initd" pgmon
newconfd "openrc/pgmon.confd" pgmon newconfd "openrc/pgmon.confd" pgmon
fi
# Install systemd unit # Install systemd unit
if use systemd ; then
systemd_dounit "systemd/pgmon.service" systemd_dounit "systemd/pgmon.service"
fi
# Install script # Install script
exeinto /usr/bin exeinto /usr/bin
newexe "pgmon.py" pgmon newexe "src/pgmon.py" pgmon
# Install default config # Install default config
diropts -o root -g root -m 0755 diropts -o root -g root -m 0755