summaryrefslogtreecommitdiff
path: root/sys-apps/shepherd/shepherd-1.0.9.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/shepherd/shepherd-1.0.9.ebuild')
-rw-r--r--sys-apps/shepherd/shepherd-1.0.9.ebuild34
1 files changed, 7 insertions, 27 deletions
diff --git a/sys-apps/shepherd/shepherd-1.0.9.ebuild b/sys-apps/shepherd/shepherd-1.0.9.ebuild
index cb86c65..434142c 100644
--- a/sys-apps/shepherd/shepherd-1.0.9.ebuild
+++ b/sys-apps/shepherd/shepherd-1.0.9.ebuild
@@ -8,7 +8,7 @@ LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
-IUSE="test"
+IUSE="service-files test"
DEPEND="
dev-scheme/guile:3.0
@@ -50,33 +50,13 @@ src_install() {
insinto /usr/share/licenses/${PN}
doins COPYING
- if [[ -e "${ED}"/usr/bin/reboot ]]; then
- mv "${ED}"/usr/bin/reboot \
- "${ED}"/usr/bin/shepherd-reboot || die
- fi
-
- if [[ -e "${ED}"/usr/bin/halt ]]; then
- mv "${ED}"/usr/bin/halt \
- "${ED}"/usr/bin/shepherd-halt || die
- fi
-
- if [[ -e "${ED}"/usr/bin/shutdown ]]; then
- mv "${ED}"/usr/bin/shutdown \
- "${ED}"/usr/bin/shepherd-shutdown || die
- fi
-
- if [[ -e "${ED}"/usr/share/man/man8/reboot.8 ]]; then
- mv "${ED}"/usr/share/man/man8/reboot.8 \
- "${ED}"/usr/share/man/man8/shepherd-reboot.8 || die
- fi
+ insinto /etc
+ newins "${FILESDIR}/shepherd.scm" shepherd.scm
- if [[ -e "${ED}"/usr/share/man/man8/halt.8 ]]; then
- mv "${ED}"/usr/share/man/man8/halt.8 \
- "${ED}"/usr/share/man/man8/shepherd-halt.8 || die
- fi
+ newinitd "${FILESDIR}/shepherd.initd" shepherd
- if [[ -e "${ED}"/usr/share/man/man8/shutdown.8 ]]; then
- mv "${ED}"/usr/share/man/man8/shutdown.8 \
- "${ED}"/usr/share/man/man8/shepherd-shutdown.8 || die
+ if use service-files; then
+ insinto /etc/shepherd/services
+ doins "${FILESDIR}"/services/*.scm
fi
}