Contents of /trunk/core/grub/grub-0.97-r16.smage2
Parent Directory | Revision Log
Revision 5461 -
(show annotations)
(download)
Fri Jun 25 10:55:28 2010 UTC (13 years, 11 months ago) by niro
File size: 3661 byte(s)
Fri Jun 25 10:55:28 2010 UTC (13 years, 11 months ago) by niro
File size: 3661 byte(s)
-fixed ext4 support, added support for gpt tables, support for I2O disks, Intel Macs, more raid devices
1 | # $Id$ |
2 | |
3 | PNAME="grub" |
4 | PVER="0.97" |
5 | PBUILD="r16" |
6 | |
7 | PCATEGORIE="sys-apps" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="GNU GRUB boot loader." |
11 | HOMEPAGE="http://www.gnu.org/software/grub/" |
12 | |
13 | DEPEND=">= sys-libs/ncurses-5.7" |
14 | |
15 | SDEPEND=">= sys-dev/automake-4 |
16 | >= sys-dev/autoconf-5" |
17 | |
18 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
20 | |
21 | sminclude mtools |
22 | |
23 | SRC_URI=( |
24 | ftp://alpha.gnu.org/gnu/${PNAME}/${SRCFILE} |
25 | mirror://${PNAME}/${SRCFILE} |
26 | mirror://${PNAME}/${PNAME}-${PVER}-splash.patch |
27 | mirror://${PNAME}/${PNAME}-${PVER}-pic.patch |
28 | mirror://${PNAME}/${PNAME}-${PVER}-initrdmax.patch |
29 | mirror://${PNAME}/${PNAME}-${PVER}-nxstack.patch |
30 | mirror://${PNAME}/${PNAME}-${PVER}-unsigned-addresses.patch |
31 | mirror://${PNAME}/${PNAME}-${PVER}-ext4-4.patch |
32 | mirror://${PNAME}/${PNAME}-${PVER}-virtio-blk-support-2.patch |
33 | mirror://${PNAME}/${PNAME}-${PVER}-gpt.patch |
34 | mirror://${PNAME}/${PNAME}-${PVER}-i2o.patch |
35 | mirror://${PNAME}/${PNAME}-${PVER}-intelmac.patch |
36 | mirror://${PNAME}/${PNAME}-${PVER}-more-raid.patch |
37 | mirror://${PNAME}/${PNAME}-${PVER}-special-devices.patch |
38 | ) |
39 | |
40 | # get only 0.xx versions! |
41 | UP2DATE="updatecmd ftp://alpha.gnu.org/gnu/${PNAME} | grep -- -0.[0-9].* | lasttarball gz" |
42 | |
43 | # grub doesn't like CFLAG optimation, |
44 | # and do you really want that at your bootloader ?? |
45 | unset CFLAGS |
46 | unset CXXFLAGS |
47 | |
48 | src_prepare() |
49 | { |
50 | munpack ${SRCFILE} || die |
51 | cd ${SRCDIR} |
52 | |
53 | # splash support |
54 | mpatch ${PNAME}-${PVER}-splash.patch || die |
55 | |
56 | # fix pic issues |
57 | mpatch ${PNAME}-${PVER}-pic.patch || die |
58 | |
59 | # do not check initrdmax -> we are using more than 4mb |
60 | mpatch ${PNAME}-${PVER}-initrdmax.patch || die |
61 | |
62 | # fix nx issues on x86_64 |
63 | mpatch ${PNAME}-${PVER}-nxstack.patch || die |
64 | |
65 | # fix issues on systems with more than 2gb of ram |
66 | mpatch ${PNAME}-${PVER}-unsigned-addresses.patch || die |
67 | |
68 | # support booting from ext4 filesystems |
69 | mpatch ${PNAME}-${PVER}-ext4-4.patch || die |
70 | |
71 | # handle virtio_blk device names in grub-install |
72 | mpatch ${PNAME}-${PVER}-virtio-blk-support-2.patch || die |
73 | |
74 | # support gpt partition tables |
75 | mpatch ${PNAME}-${PVER}-gpt.patch || die |
76 | |
77 | # support I2O disks |
78 | mpatch ${PNAME}-${PVER}-i2o.patch || die |
79 | |
80 | # support Intel Macs (gateA20) |
81 | mpatch ${PNAME}-${PVER}-intelmac.patch || die |
82 | |
83 | # support cciss and other raid devices |
84 | mpatch ${PNAME}-${PVER}-more-raid.patch || die |
85 | |
86 | # support dev/{ida,cciss,ataraid,rd} devices names |
87 | mpatch ${PNAME}-${PVER}-special-devices.patch || die |
88 | |
89 | # rebuild makefiles |
90 | autoreconf --install --force || die |
91 | } |
92 | |
93 | src_compile() |
94 | { |
95 | cd ${SRCDIR} |
96 | |
97 | # fixes compilation on x86_64; grub cannot build natively on 64bit |
98 | # building a static grub, with -m32 in this case |
99 | if [[ ${ARCH} = x86_64 ]] |
100 | then |
101 | export CC="gcc -m32" |
102 | export LDFLAGS="-static" |
103 | fi |
104 | |
105 | mconfigure || die |
106 | mmake || die |
107 | } |
108 | |
109 | src_install() |
110 | { |
111 | cd ${SRCDIR} |
112 | |
113 | # needed directories |
114 | minstalldir /boot/grub || die |
115 | |
116 | mmake DESTDIR=${BINDIR} install || die |
117 | |
118 | # stage file locations have changed to /usr/lib |
119 | # now copying all stage files |
120 | for i in ${BINDIR}/usr/$(mlibdir)/grub/*/* |
121 | do |
122 | [ -f ${i} ] && cp -p ${i} ${BINDIR}/boot/grub || die ${i} |
123 | done |
124 | } |
125 | |
126 | preinstall() |
127 | { |
128 | mount /boot &> /dev/null |
129 | } |
130 | |
131 | postinstall() |
132 | { |
133 | # creates some essential links |
134 | if [ ! -e ${MROOT}/boot/boot ] |
135 | then |
136 | ln -sf . ${MROOT}/boot/boot |
137 | fi |
138 | |
139 | if [ ! -e ${MROOT}/boot/grub/menu.lst ] |
140 | then |
141 | ln -sf /boot/grub/grub.conf ${MROOT}/boot/grub/menu.lst |
142 | fi |
143 | |
144 | # creates example grub.conf |
145 | if [ ! -e ${MROOT}/boot/grub/grub.conf.example ] |
146 | then |
147 | cat > ${MROOT}/boot/grub/grub.conf.example << "EOF" |
148 | default 0 |
149 | timeout 30 |
150 | |
151 | title Magellan-Linux |
152 | root (hd0,0) |
153 | kernel (hd0,0)/boot/bzImage root=/dev/hda1 |
154 | EOF |
155 | fi |
156 | |
157 | # update grub |
158 | grub --batch --device-map=/boot/grub/device.map </boot/grub/grub.conf >&/dev/null; |
159 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |