Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-boot/grub: grub-9999.ebuild metadata.xml ChangeLog grub-1.96.ebuild
Date: Tue, 30 Dec 2008 11:35:56
Message-Id: E1LHct8-0007Ow-8s@stork.gentoo.org
1 vapier 08/12/30 11:35:54
2
3 Modified: grub-9999.ebuild metadata.xml ChangeLog
4 grub-1.96.ebuild
5 Log:
6 Fix install paths and add support for USE=multislot so people can toy with grub2 while keeping grub1.
7 (Portage version: 2.2_rc20/cvs/Linux 2.6.28 x86_64)
8
9 Revision Changes Path
10 1.3 sys-boot/grub/grub-9999.ebuild
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/grub-9999.ebuild?rev=1.3&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/grub-9999.ebuild?rev=1.3&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/grub-9999.ebuild?r1=1.2&r2=1.3
15
16 Index: grub-9999.ebuild
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v
19 retrieving revision 1.2
20 retrieving revision 1.3
21 diff -u -r1.2 -r1.3
22 --- grub-9999.ebuild 30 Dec 2008 02:18:04 -0000 1.2
23 +++ grub-9999.ebuild 30 Dec 2008 11:35:54 -0000 1.3
24 @@ -1,6 +1,6 @@
25 # Copyright 1999-2008 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.2 2008/12/30 02:18:04 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.3 2008/12/30 11:35:54 vapier Exp $
29
30 inherit mount-boot eutils flag-o-matic toolchain-funcs
31
32 @@ -17,15 +17,16 @@
33 HOMEPAGE="http://www.gnu.org/software/grub/"
34
35 LICENSE="GPL-2"
36 -SLOT="0"
37 +use multislot && SLOT="2" || SLOT="0"
38 KEYWORDS=""
39 -IUSE="static custom-cflags"
40 +IUSE="custom-cflags multislot static"
41
42 DEPEND=">=sys-libs/ncurses-5.2-r5
43 dev-libs/lzo"
44 PROVIDE="virtual/bootloader"
45
46 STRIP_MASK="/lib*/grub/*/*.mod"
47 +QA_EXECSTACK="sbin/grub-probe sbin/grub-setup"
48
49 src_compile() {
50 use amd64 && multilib_toolchain_setup x86
51 @@ -33,8 +34,9 @@
52 use static && append-ldflags -static
53
54 econf \
55 - --prefix=/ \
56 - --datadir=/usr/lib \
57 + --sbindir=/sbin \
58 + --bindir=/bin \
59 + --libdir=/$(get_libdir) \
60 || die "econf failed"
61 emake -j1 || die "making regular stuff"
62 }
63 @@ -42,9 +44,32 @@
64 src_install() {
65 emake DESTDIR="${D}" install || die
66 dodoc AUTHORS ChangeLog NEWS README THANKS TODO
67 + if use multislot ; then
68 + sed -i s:grub-install:grub2-install: "${D}"/sbin/grub-install
69 + mv "${D}"/sbin/grub{,2}-install || die
70 + mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
71 + fi
72 +}
73 +
74 +setup_boot_dir() {
75 + local boot_dir=$1
76 + local dir=${boot_dir}/grub
77 +
78 + if [[ ! -e ${dir}/grub.cfg ]] ; then
79 + einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
80 + grub-mkconfig -o "${dir}/grub.cfg"
81 + fi
82 +
83 + #local install=grub-install
84 + #use multislot && install="grub2-install --grub-setup=/bin/true"
85 + #einfo "Running: ${install} "
86 + #${install}
87 }
88
89 pkg_postinst() {
90 - elog "To automatically generate a grub configuration file:"
91 - elog "# /sbin/grub-mkconfig -o /boot/grub/grub.cfg"
92 + if use multislot ; then
93 + elog "You have installed grub2 with USE=multislot, so to coexist"
94 + elog "with grub1, the grub2 install binary is named grub2-install."
95 + fi
96 + setup_boot_dir "${ROOT}"boot
97 }
98
99
100
101 1.6 sys-boot/grub/metadata.xml
102
103 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/metadata.xml?rev=1.6&view=markup
104 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/metadata.xml?rev=1.6&content-type=text/plain
105 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/metadata.xml?r1=1.5&r2=1.6
106
107 Index: metadata.xml
108 ===================================================================
109 RCS file: /var/cvsroot/gentoo-x86/sys-boot/grub/metadata.xml,v
110 retrieving revision 1.5
111 retrieving revision 1.6
112 diff -u -r1.5 -r1.6
113 --- metadata.xml 5 Aug 2008 22:50:31 -0000 1.5
114 +++ metadata.xml 30 Dec 2008 11:35:54 -0000 1.6
115 @@ -4,5 +4,6 @@
116 <herd>base-system</herd>
117 <use>
118 <flag name='custom-cflags'>Enable custom CFLAGS (not supported)</flag>
119 + <flag name='multislot'>Allow grub1 and grub2 to be installed simultaneously</flag>
120 </use>
121 </pkgmetadata>
122
123
124
125 1.108 sys-boot/grub/ChangeLog
126
127 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/ChangeLog?rev=1.108&view=markup
128 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/ChangeLog?rev=1.108&content-type=text/plain
129 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/ChangeLog?r1=1.107&r2=1.108
130
131 Index: ChangeLog
132 ===================================================================
133 RCS file: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v
134 retrieving revision 1.107
135 retrieving revision 1.108
136 diff -u -r1.107 -r1.108
137 --- ChangeLog 30 Dec 2008 02:18:04 -0000 1.107
138 +++ ChangeLog 30 Dec 2008 11:35:54 -0000 1.108
139 @@ -1,6 +1,11 @@
140 # ChangeLog for sys-boot/grub
141 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
142 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.107 2008/12/30 02:18:04 vapier Exp $
143 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.108 2008/12/30 11:35:54 vapier Exp $
144 +
145 + 30 Dec 2008; Mike Frysinger <vapier@g.o> metadata.xml,
146 + grub-1.96.ebuild, grub-9999.ebuild:
147 + Fix install paths and add support for USE=multislot so people can toy with
148 + grub2 while keeping grub1.
149
150 30 Dec 2008; Mike Frysinger <vapier@g.o> grub-1.96.ebuild,
151 grub-9999.ebuild:
152
153
154
155 1.8 sys-boot/grub/grub-1.96.ebuild
156
157 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/grub-1.96.ebuild?rev=1.8&view=markup
158 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/grub-1.96.ebuild?rev=1.8&content-type=text/plain
159 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/grub-1.96.ebuild?r1=1.7&r2=1.8
160
161 Index: grub-1.96.ebuild
162 ===================================================================
163 RCS file: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-1.96.ebuild,v
164 retrieving revision 1.7
165 retrieving revision 1.8
166 diff -u -r1.7 -r1.8
167 --- grub-1.96.ebuild 30 Dec 2008 02:18:04 -0000 1.7
168 +++ grub-1.96.ebuild 30 Dec 2008 11:35:54 -0000 1.8
169 @@ -1,6 +1,6 @@
170 # Copyright 1999-2008 Gentoo Foundation
171 # Distributed under the terms of the GNU General Public License v2
172 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-1.96.ebuild,v 1.7 2008/12/30 02:18:04 vapier Exp $
173 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-1.96.ebuild,v 1.8 2008/12/30 11:35:54 vapier Exp $
174
175 inherit mount-boot eutils flag-o-matic toolchain-funcs
176
177 @@ -17,15 +17,16 @@
178 HOMEPAGE="http://www.gnu.org/software/grub/"
179
180 LICENSE="GPL-2"
181 -SLOT="0"
182 +use multislot && SLOT="2" || SLOT="0"
183 KEYWORDS=""
184 -IUSE="static custom-cflags"
185 +IUSE="custom-cflags multislot static"
186
187 DEPEND=">=sys-libs/ncurses-5.2-r5
188 dev-libs/lzo"
189 PROVIDE="virtual/bootloader"
190
191 STRIP_MASK="/lib*/grub/*/*.mod"
192 +QA_EXECSTACK="sbin/grub-probe sbin/grub-setup"
193
194 src_compile() {
195 use amd64 && multilib_toolchain_setup x86
196 @@ -33,8 +34,9 @@
197 use static && append-ldflags -static
198
199 econf \
200 - --prefix=/ \
201 - --datadir=/usr/lib \
202 + --sbindir=/sbin \
203 + --bindir=/bin \
204 + --libdir=/$(get_libdir) \
205 || die "econf failed"
206 emake -j1 || die "making regular stuff"
207 }
208 @@ -42,9 +44,32 @@
209 src_install() {
210 emake DESTDIR="${D}" install || die
211 dodoc AUTHORS ChangeLog NEWS README THANKS TODO
212 + if use multislot ; then
213 + sed -i s:grub-install:grub2-install: "${D}"/sbin/grub-install
214 + mv "${D}"/sbin/grub{,2}-install || die
215 + mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
216 + fi
217 +}
218 +
219 +setup_boot_dir() {
220 + local boot_dir=$1
221 + local dir=${boot_dir}/grub
222 +
223 + if [[ ! -e ${dir}/grub.cfg ]] ; then
224 + einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
225 + grub-mkconfig -o "${dir}/grub.cfg"
226 + fi
227 +
228 + #local install=grub-install
229 + #use multislot && install="grub2-install --grub-setup=/bin/true"
230 + #einfo "Running: ${install} "
231 + #${install}
232 }
233
234 pkg_postinst() {
235 - elog "To automatically generate a grub configuration file:"
236 - elog "# /sbin/grub-mkconfig -o /boot/grub/grub.cfg"
237 + if use multislot ; then
238 + elog "You have installed grub2 with USE=multislot, so to coexist"
239 + elog "with grub1, the grub2 install binary is named grub2-install."
240 + fi
241 + setup_boot_dir "${ROOT}"boot
242 }