Magellan Linux

Annotation of /trunk/core/grub/grub-0.97-r12.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:keywords Id