1 |
commit: 4ec6c9b12ead972f977e78314aabfbac74ce2ac8 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 1 21:33:33 2016 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 1 22:17:10 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ec6c9b1 |
7 |
|
8 |
sys-apps/opentmpfiles: install service scripts and block older openrc versions |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
sys-apps/opentmpfiles/opentmpfiles-9999.ebuild | 27 +++++++++++++++++++++++--- |
13 |
1 file changed, 24 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/sys-apps/opentmpfiles/opentmpfiles-9999.ebuild b/sys-apps/opentmpfiles/opentmpfiles-9999.ebuild |
16 |
index 62984cd..011fa7a 100644 |
17 |
--- a/sys-apps/opentmpfiles/opentmpfiles-9999.ebuild |
18 |
+++ b/sys-apps/opentmpfiles/opentmpfiles-9999.ebuild |
19 |
@@ -10,7 +10,7 @@ if [[ ${PV} = 9999* ]]; then |
20 |
else |
21 |
SRC_URI="https://github.com/openrc/${PN}/archive/${PV}.tar.gz -> |
22 |
${P}.tar.gz" |
23 |
- KEYWORDS="~amd64" |
24 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
25 |
fi |
26 |
|
27 |
DESCRIPTION="A standalone utility to process systemd-style tmpfiles.d files" |
28 |
@@ -20,5 +20,26 @@ LICENSE="BSD-2" |
29 |
SLOT="0" |
30 |
IUSE="" |
31 |
|
32 |
-DEPEND="" |
33 |
-RDEPEND="" |
34 |
+RDEPEND="!<sys-apps/openrc-0.23" |
35 |
+ |
36 |
+src_install() { |
37 |
+ default |
38 |
+ cd openrc |
39 |
+ for f in opentmpfiles-dev opentmpfiles-setup; do |
40 |
+ newconfd ${f}.confd ${f} |
41 |
+ newinitd ${f}.initd ${f} |
42 |
+ done |
43 |
+} |
44 |
+ |
45 |
+add_service() { |
46 |
+ local initd=$1 |
47 |
+ local runlevel=$2 |
48 |
+ |
49 |
+ elog "Auto-adding '${initd}' service to your ${runlevel} runlevel" |
50 |
+ ln -snf /etc/init.d/${initd} "${EROOT}"etc/runlevels/${runlevel}/${initd} |
51 |
+} |
52 |
+ |
53 |
+pkg_postinst() { |
54 |
+ add_service opentmpfiles-dev sysinit |
55 |
+ add_service opentmpfiles-setup boot |
56 |
+} |