Contents of /trunk/core/grub/grub-0.97-r14.smage2
Parent Directory | Revision Log
Revision 3620 -
(show annotations)
(download)
Tue Oct 27 15:18:10 2009 UTC (14 years, 7 months ago) by niro
File size: 2993 byte(s)
Tue Oct 27 15:18:10 2009 UTC (14 years, 7 months ago) by niro
File size: 2993 byte(s)
-rebuild against ncurses-widec
1 | # $Id$ |
2 | |
3 | PNAME="grub" |
4 | PVER="0.97" |
5 | PBUILD="r14" |
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-3.patch |
32 | mirror://${PNAME}/${PNAME}-${PVER}-virtio-blk-support-2.patch |
33 | ) |
34 | |
35 | # get only 0.xx versions! |
36 | UP2DATE="updatecmd ftp://alpha.gnu.org/gnu/${PNAME} | grep -- -0.[0-9].* | lasttarball gz" |
37 | |
38 | # grub doesn't like CFLAG optimation, |
39 | # and do you really want that at your bootloader ?? |
40 | unset CFLAGS |
41 | unset CXXFLAGS |
42 | |
43 | src_prepare() |
44 | { |
45 | munpack ${SRCFILE} || die |
46 | cd ${SRCDIR} |
47 | |
48 | # splash support |
49 | mpatch ${PNAME}-${PVER}-splash.patch || die |
50 | |
51 | # fix pic issues |
52 | mpatch ${PNAME}-${PVER}-pic.patch || die |
53 | |
54 | # do not check initrdmax -> we are using more than 4mb |
55 | mpatch ${PNAME}-${PVER}-initrdmax.patch || die |
56 | |
57 | # fix nx issues on x86_64 |
58 | mpatch ${PNAME}-${PVER}-nxstack.patch || die |
59 | |
60 | # fix issues on systems with more than 2gb of ram |
61 | mpatch ${PNAME}-${PVER}-unsigned-addresses.patch || die |
62 | |
63 | # support booting from ext4 filesystems |
64 | mpatch ${PNAME}-${PVER}-ext4-3.patch || die |
65 | |
66 | # handle virtio_blk device names in grub-install |
67 | mpatch ${PNAME}-${PVER}-virtio-blk-support-2.patch || die |
68 | |
69 | # rebuild makefiles |
70 | autoreconf --install --force || die |
71 | } |
72 | |
73 | src_compile() |
74 | { |
75 | cd ${SRCDIR} |
76 | |
77 | # fixes compilation on x86_64; grub cannot build natively on 64bit |
78 | # building a static grub, with -m32 in this case |
79 | if [[ ${ARCH} = x86_64 ]] |
80 | then |
81 | export CC="gcc -m32" |
82 | export LDFLAGS="-static" |
83 | fi |
84 | |
85 | mconfigure || die |
86 | mmake || die |
87 | } |
88 | |
89 | src_install() |
90 | { |
91 | cd ${SRCDIR} |
92 | |
93 | # needed directories |
94 | minstalldir /boot/grub || die |
95 | |
96 | mmake DESTDIR=${BINDIR} install || die |
97 | |
98 | # stage file locations have changed to /usr/lib |
99 | # now copying all stage files |
100 | for i in ${BINDIR}/usr/$(mlibdir)/grub/*/* |
101 | do |
102 | [ -f ${i} ] && cp -p ${i} ${BINDIR}/boot/grub || die ${i} |
103 | done |
104 | } |
105 | |
106 | preinstall() |
107 | { |
108 | mount /boot &> /dev/null |
109 | } |
110 | |
111 | postinstall() |
112 | { |
113 | # creates some essential links |
114 | if [ ! -e ${MROOT}/boot/boot ] |
115 | then |
116 | ln -sf . ${MROOT}/boot/boot |
117 | fi |
118 | |
119 | if [ ! -e ${MROOT}/boot/grub/menu.lst ] |
120 | then |
121 | ln -sf /boot/grub/grub.conf ${MROOT}/boot/grub/menu.lst |
122 | fi |
123 | |
124 | # creates example grub.conf |
125 | if [ ! -e ${MROOT}/boot/grub/grub.conf.example ] |
126 | then |
127 | cat > ${MROOT}/boot/grub/grub.conf.example << "EOF" |
128 | default 0 |
129 | timeout 30 |
130 | |
131 | title Magellan-Linux |
132 | root (hd0,0) |
133 | kernel (hd0,0)/boot/bzImage root=/dev/hda1 |
134 | EOF |
135 | fi |
136 | |
137 | # update grub |
138 | grub --batch --device-map=/boot/grub/device.map </boot/grub/grub.conf >&/dev/null; |
139 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |