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