Improve Gentoo ebuild
This commit is contained in:
parent
058fe546a4
commit
9b382bedaa
@ -14,8 +14,7 @@ LICENSE="BSD"
|
|||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="amd64"
|
KEYWORDS="amd64"
|
||||||
|
|
||||||
EGIT_REPO_URI="git@code2.shh-dot-com.org:james/pgmon.git"
|
SRC_URI="https://code2.shh-dot-com.org/james/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||||
EGIT_COMMIT="v1.0.0"
|
|
||||||
|
|
||||||
DEPEND="
|
DEPEND="
|
||||||
${PYTHON_DEPS}
|
${PYTHON_DEPS}
|
||||||
@ -26,23 +25,32 @@ DEPEND="
|
|||||||
RDEPEND="${DEPEND}"
|
RDEPEND="${DEPEND}"
|
||||||
BDEPEND=""
|
BDEPEND=""
|
||||||
|
|
||||||
|
S="${WORKDIR}/${PN}"
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
default
|
default
|
||||||
|
|
||||||
# Install init script
|
# Install init script
|
||||||
newinitd "${FILESDIR}/pgmon.openrc" pgmon
|
newinitd "openrc/pgmon.initd" pgmon
|
||||||
|
newconfd "openrc/pgmon.confd" pgmon
|
||||||
|
|
||||||
|
# Install systemd unit
|
||||||
|
systemd_dounit "systemd/pgmon.service"
|
||||||
|
|
||||||
# Install script
|
# Install script
|
||||||
exeinto /usr/bin
|
exeinto /usr/bin
|
||||||
newexe "${S}/pgmon.py" pgmon
|
newexe "pgmon.py" pgmon
|
||||||
|
|
||||||
# Install default config
|
# Install default config
|
||||||
diropts -o root -g root -m 0755
|
diropts -o root -g root -m 0755
|
||||||
insinto /etc/pgmon
|
insinto /etc/pgmon
|
||||||
doins "${FILESDIR}/pgmon.yml"
|
doins "sample-config/pgmon.yml"
|
||||||
doins "${S}/pgmon-metrics.yml"
|
doins "sample-config/pgmon-metrics.yml"
|
||||||
|
|
||||||
# Install logrotate config
|
# Install logrotate config
|
||||||
insinto /etc/logrotate.d
|
insinto /etc/logrotate.d
|
||||||
newins "${FILESDIR}/pgmon.logrotate" pgmon
|
newins "logrotate/pgmon.logrotate" pgmon
|
||||||
|
|
||||||
|
# Install man page
|
||||||
|
doman manpages/pgmon.1
|
||||||
}
|
}
|
||||||
|
|||||||
3
openrc/pgmon.confd
Normal file
3
openrc/pgmon.confd
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
## Specify a different user to run the daemon
|
||||||
|
#PGMON_USER=postgres
|
||||||
|
#PGMON_GROUP=postgres
|
||||||
Loading…
Reference in New Issue
Block a user