1 |
commit: 21bc9e82f4c87af7b98f3c1acc29abad18ed3fe4 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 28 12:23:08 2016 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 28 12:23:08 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21bc9e82 |
7 |
|
8 |
sys-apps/baselayout-prefix: bump to provide dummy openrc-run, bug #584054 |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
.../baselayout-prefix-2.2-r5.ebuild | 85 ++++++++++++++++++++++ |
13 |
1 file changed, 85 insertions(+) |
14 |
|
15 |
diff --git a/sys-apps/baselayout-prefix/baselayout-prefix-2.2-r5.ebuild b/sys-apps/baselayout-prefix/baselayout-prefix-2.2-r5.ebuild |
16 |
new file mode 100644 |
17 |
index 0000000..e4ea357 |
18 |
--- /dev/null |
19 |
+++ b/sys-apps/baselayout-prefix/baselayout-prefix-2.2-r5.ebuild |
20 |
@@ -0,0 +1,85 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=6 |
26 |
+ |
27 |
+inherit eutils multilib libtool |
28 |
+ |
29 |
+MY_P=${P/-prefix/} # just use "upstream" sources |
30 |
+DESCRIPTION="Minimal baselayout for Gentoo Prefix installs" |
31 |
+HOMEPAGE="https://www.gentoo.org/" |
32 |
+SRC_URI="mirror://gentoo/${MY_P}.tar.bz2 |
33 |
+ https://dev.gentoo.org/~vapier/dist/${MY_P}.tar.bz2" |
34 |
+ |
35 |
+LICENSE="GPL-2" |
36 |
+SLOT="0" |
37 |
+KEYWORDS="~arm ~arm-linux ~ppc-aix ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" |
38 |
+ |
39 |
+RDEPEND="sys-apps/gentoo-functions" |
40 |
+DEPEND="${RDEPEND}" |
41 |
+ |
42 |
+S=${WORKDIR}/${MY_P} |
43 |
+ |
44 |
+pkg_preinst() { |
45 |
+ # This is written in src_install (so it's in CONTENTS), but punt all |
46 |
+ # pending updates to avoid user having to do etc-update (and make the |
47 |
+ # pkg_postinst logic simpler). |
48 |
+ rm -f "${EROOT}"/etc/._cfg????_gentoo-release |
49 |
+} |
50 |
+ |
51 |
+src_install() { |
52 |
+ # make functions.sh available in /etc/init.d (from gentoo-functions) |
53 |
+ # Note: we cannot replace the symlink with a file here, or Portage will |
54 |
+ # config-protect it, and etc-update can't handle symlink to file updates |
55 |
+ dodir etc/init.d |
56 |
+ dosym ../../lib/gentoo/functions.sh /etc/init.d/functions.sh |
57 |
+ |
58 |
+ dodir etc |
59 |
+ sed \ |
60 |
+ -e "/PATH=/!s:/\(etc\|usr/bin\|bin\):\"${EPREFIX}\"/\1:g" \ |
61 |
+ -e "/PATH=/s|\([:\"]\)/|\1${EPREFIX}/|g" \ |
62 |
+ -e "/PATH=.*\/sbin/s|\"$|:/usr/sbin:/sbin\"|" \ |
63 |
+ -e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \ |
64 |
+ etc/profile > "${ED}"/etc/profile || die |
65 |
+ dodir etc/env.d |
66 |
+ sed \ |
67 |
+ -e "s:/\(etc/env.d\|opt\|usr\):${EPREFIX}/\1:g" \ |
68 |
+ -e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \ |
69 |
+ etc/env.d/00basic > "${ED}"/etc/env.d/00basic || die |
70 |
+ dodoc ChangeLog.svn |
71 |
+ |
72 |
+ # add the host OS MANPATH |
73 |
+ if [[ -d "${ROOT}"/usr/share/man ]] ; then |
74 |
+ echo 'MANPATH="/usr/share/man"' > "${ED}"/etc/env.d/99basic || die |
75 |
+ fi |
76 |
+ |
77 |
+ # rc-scripts version for testing of features that *should* be present |
78 |
+ echo "Gentoo Prefix Base System release ${PV}" > "${ED}"/etc/gentoo-release |
79 |
+ |
80 |
+ # FHS compatibility symlinks stuff |
81 |
+ dosym /var/tmp /usr/tmp |
82 |
+ |
83 |
+ # add a dummy to avoid Portage shebang errors |
84 |
+ dodir sbin |
85 |
+ cat > "${ED}"/sbin/runscript <<- EOF |
86 |
+ #!/usr/bin/env sh |
87 |
+ source "${EPREFIX}/lib/gentoo/functions.sh" |
88 |
+ |
89 |
+ eerror "runscript/openrc-run not supported by Gentoo Prefix Base System release ${PV}" 1>&2 |
90 |
+ exit 1 |
91 |
+ EOF |
92 |
+ chmod 755 "${ED}"/sbin/runscript || die |
93 |
+ cp "${ED}"/sbin/{runscript,openrc-run} || die |
94 |
+} |
95 |
+ |
96 |
+pkg_postinst() { |
97 |
+ # Take care of the etc-update for the user |
98 |
+ if [ -e "${EROOT}"/etc/._cfg0000_gentoo-release ] ; then |
99 |
+ mv "${EROOT}"/etc/._cfg0000_gentoo-release "${EROOT}"/etc/gentoo-release |
100 |
+ fi |
101 |
+ |
102 |
+ # baselayout leaves behind a lot of .keep files, so let's clean them up |
103 |
+ find "${EROOT}"/lib/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null |
104 |
+ find "${EROOT}"/lib/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null |
105 |
+} |