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