Contents of /smage/branches/alx-0_6_0/core/grub/grub-1.99-r1.smage2
Parent Directory | Revision Log
Revision 2540 -
(show annotations)
(download)
Fri Jul 1 22:29:16 2011 UTC (13 years, 2 months ago) by niro
File size: 1799 byte(s)
Fri Jul 1 22:29:16 2011 UTC (13 years, 2 months ago) by niro
File size: 1799 byte(s)
-added alx patch
1 | # $Id$ |
2 | |
3 | PNAME="grub" |
4 | PVER="1.99" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="sys-apps" |
8 | |
9 | DESCRIPTION="GNU GRUB2 boot loader." |
10 | HOMEPAGE="http://www.gnu.org/software/grub/" |
11 | |
12 | DEPEND=">= sys-libs/ncurses-5.9 |
13 | >= sys-libs/zlib-1.2.5 |
14 | >= media-libs/freetype-2.4" |
15 | |
16 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
17 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
18 | |
19 | sminclude mtools |
20 | |
21 | SRC_URI=( |
22 | gnu://${PNAME}/${SRCFILE} |
23 | mirror://${PNAME}/${SRCFILE} |
24 | mirror://${PNAME}/${PNAME}-${PVER}-alx.patch |
25 | ) |
26 | |
27 | UP2DATE="updatecmd_gnu ${PNAME} gz" |
28 | |
29 | # grub doesn't like CFLAG optimation, |
30 | # and do you really want that at your bootloader ?? |
31 | unset CFLAGS |
32 | unset CXXFLAGS |
33 | |
34 | src_prepare() |
35 | { |
36 | munpack ${SRCFILE} || die |
37 | cd ${SRCDIR} |
38 | |
39 | # fixes some issues with busybox |
40 | mpatch ${PNAME}-${PVER}-alx.patch || die |
41 | } |
42 | |
43 | src_compile() |
44 | { |
45 | cd ${SRCDIR} |
46 | |
47 | mconfigure \ |
48 | --sbindir=/sbin \ |
49 | --bindir=/bin \ |
50 | --libdir=/$(mlibdir) \ |
51 | --disable-efiemu \ |
52 | --disable-werror \ |
53 | --disable-nls \ |
54 | || die |
55 | mmake || die |
56 | } |
57 | |
58 | src_install() |
59 | { |
60 | cd ${SRCDIR} |
61 | |
62 | mmake DESTDIR=${BINDIR} install || die |
63 | |
64 | # fix a missing symlink |
65 | mlink /bin/grub-mkimage /sbin || die |
66 | |
67 | minstalldir /boot/grub || die |
68 | cat > ${BINDIR}/boot/grub/grub.cfg.example << "EOF" |
69 | default 0 |
70 | timeout 30 |
71 | |
72 | title Magellan-Linux |
73 | linux (hd0,0)/boot/vmlinuz root=/dev/hda3 |
74 | initrd (hd0,0)/boot/initrd |
75 | EOF |
76 | |
77 | # docs |
78 | minstalldocs AUTHORS ChangeLog COPYING NEWS README THANKS TODO || die |
79 | } |
80 | |
81 | preinstall() |
82 | { |
83 | mount /boot &> /dev/null |
84 | } |
85 | |
86 | postinstall() |
87 | { |
88 | |
89 | [ ! -d ${MROOT}/boot/grub ] && install -d ${MROOT}/boot/grub |
90 | |
91 | # creates some essential links |
92 | [ ! -e ${MROOT}/boot/boot ] && ln -sf . ${MROOT}/boot/boot |
93 | |
94 | echo |
95 | echo "Begining with GRUB2 the location of the config file has changed." |
96 | echo "You will find it at /boot/grub/grub.cfg" |
97 | echo "Also be aware of the changed commands." |
98 | echo "'kernel' isn't used anymore but 'linux'." |
99 | echo |
100 | } |