summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2016-12-01 15:33:33 -0600
committerWilliam Hubbs <williamh@gentoo.org>2016-12-01 16:17:10 -0600
commit4ec6c9b12ead972f977e78314aabfbac74ce2ac8 (patch)
tree365af768a2971305e9b070aa2b45cf34a223d15c /sys-apps/opentmpfiles
parentdev-lang/mono: fix ABI_X86=32 build case for amd64 host, bug #600664 (diff)
downloadgentoo-4ec6c9b12ead972f977e78314aabfbac74ce2ac8.tar.gz
gentoo-4ec6c9b12ead972f977e78314aabfbac74ce2ac8.tar.bz2
gentoo-4ec6c9b12ead972f977e78314aabfbac74ce2ac8.zip
sys-apps/opentmpfiles: install service scripts and block older openrc versions
Package-Manager: portage-2.3.0
Diffstat (limited to 'sys-apps/opentmpfiles')
-rw-r--r--sys-apps/opentmpfiles/opentmpfiles-9999.ebuild27
1 files changed, 24 insertions, 3 deletions
diff --git a/sys-apps/opentmpfiles/opentmpfiles-9999.ebuild b/sys-apps/opentmpfiles/opentmpfiles-9999.ebuild
index 62984cd099c6..011fa7ac95c8 100644
--- a/sys-apps/opentmpfiles/opentmpfiles-9999.ebuild
+++ b/sys-apps/opentmpfiles/opentmpfiles-9999.ebuild
@@ -10,7 +10,7 @@ if [[ ${PV} = 9999* ]]; then
else
SRC_URI="https://github.com/openrc/${PN}/archive/${PV}.tar.gz ->
${P}.tar.gz"
- KEYWORDS="~amd64"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
fi
DESCRIPTION="A standalone utility to process systemd-style tmpfiles.d files"
@@ -20,5 +20,26 @@ LICENSE="BSD-2"
SLOT="0"
IUSE=""
-DEPEND=""
-RDEPEND=""
+RDEPEND="!<sys-apps/openrc-0.23"
+
+src_install() {
+ default
+ cd openrc
+ for f in opentmpfiles-dev opentmpfiles-setup; do
+ newconfd ${f}.confd ${f}
+ newinitd ${f}.initd ${f}
+ done
+}
+
+add_service() {
+ local initd=$1
+ local runlevel=$2
+
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd}
+}
+
+pkg_postinst() {
+ add_service opentmpfiles-dev sysinit
+ add_service opentmpfiles-setup boot
+}