Contents of /branches/branch-xorg18/core/grub/grub-0.97-r15.smage2
Parent Directory | Revision Log
Revision 5192 -
(show annotations)
(download)
Tue Apr 6 21:54:10 2010 UTC (14 years, 5 months ago) by niro
File size: 3034 byte(s)
Tue Apr 6 21:54:10 2010 UTC (14 years, 5 months ago) by niro
File size: 3034 byte(s)
created branch 'branch-xorg18'
1 | # $Id$ |
2 | |
3 | PNAME="grub" |
4 | PVER="0.97" |
5 | PBUILD="r15" |
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 | # disabled atm, - broken, needs rework |
64 | # support booting from ext4 filesystems |
65 | #mpatch ${PNAME}-${PVER}-ext4-3.patch || die |
66 | |
67 | # handle virtio_blk device names in grub-install |
68 | mpatch ${PNAME}-${PVER}-virtio-blk-support-2.patch || die |
69 | |
70 | # rebuild makefiles |
71 | autoreconf --install --force || die |
72 | } |
73 | |
74 | src_compile() |
75 | { |
76 | cd ${SRCDIR} |
77 | |
78 | # fixes compilation on x86_64; grub cannot build natively on 64bit |
79 | # building a static grub, with -m32 in this case |
80 | if [[ ${ARCH} = x86_64 ]] |
81 | then |
82 | export CC="gcc -m32" |
83 | export LDFLAGS="-static" |
84 | fi |
85 | |
86 | mconfigure || die |
87 | mmake || die |
88 | } |
89 | |
90 | src_install() |
91 | { |
92 | cd ${SRCDIR} |
93 | |
94 | # needed directories |
95 | minstalldir /boot/grub || die |
96 | |
97 | mmake DESTDIR=${BINDIR} install || die |
98 | |
99 | # stage file locations have changed to /usr/lib |
100 | # now copying all stage files |
101 | for i in ${BINDIR}/usr/$(mlibdir)/grub/*/* |
102 | do |
103 | [ -f ${i} ] && cp -p ${i} ${BINDIR}/boot/grub || die ${i} |
104 | done |
105 | } |
106 | |
107 | preinstall() |
108 | { |
109 | mount /boot &> /dev/null |
110 | } |
111 | |
112 | postinstall() |
113 | { |
114 | # creates some essential links |
115 | if [ ! -e ${MROOT}/boot/boot ] |
116 | then |
117 | ln -sf . ${MROOT}/boot/boot |
118 | fi |
119 | |
120 | if [ ! -e ${MROOT}/boot/grub/menu.lst ] |
121 | then |
122 | ln -sf /boot/grub/grub.conf ${MROOT}/boot/grub/menu.lst |
123 | fi |
124 | |
125 | # creates example grub.conf |
126 | if [ ! -e ${MROOT}/boot/grub/grub.conf.example ] |
127 | then |
128 | cat > ${MROOT}/boot/grub/grub.conf.example << "EOF" |
129 | default 0 |
130 | timeout 30 |
131 | |
132 | title Magellan-Linux |
133 | root (hd0,0) |
134 | kernel (hd0,0)/boot/bzImage root=/dev/hda1 |
135 | EOF |
136 | fi |
137 | |
138 | # update grub |
139 | grub --batch --device-map=/boot/grub/device.map </boot/grub/grub.conf >&/dev/null; |
140 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |