Annotation of /smage/branches/alx-0_6_0/core/grub/grub-1.99-r1.smage2
Parent Directory | Revision Log
Revision 2541 -
(hide annotations)
(download)
Fri Jul 1 23:01:53 2011 UTC (12 years, 11 months ago) by niro
File size: 2425 byte(s)
Fri Jul 1 23:01:53 2011 UTC (12 years, 11 months ago) by niro
File size: 2425 byte(s)
-serveral fixes and added missing config file
1 | niro | 2539 | # $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 | niro | 2540 | sminclude mtools |
20 | niro | 2539 | |
21 | SRC_URI=( | ||
22 | gnu://${PNAME}/${SRCFILE} | ||
23 | mirror://${PNAME}/${SRCFILE} | ||
24 | niro | 2541 | mirror://${PNAME}/${PNAME}-${PVER}-confd.patch |
25 | niro | 2540 | mirror://${PNAME}/${PNAME}-${PVER}-alx.patch |
26 | niro | 2539 | ) |
27 | |||
28 | UP2DATE="updatecmd_gnu ${PNAME} gz" | ||
29 | |||
30 | # grub doesn't like CFLAG optimation, | ||
31 | # and do you really want that at your bootloader ?? | ||
32 | unset CFLAGS | ||
33 | unset CXXFLAGS | ||
34 | |||
35 | niro | 2540 | src_prepare() |
36 | { | ||
37 | munpack ${SRCFILE} || die | ||
38 | cd ${SRCDIR} | ||
39 | |||
40 | niro | 2541 | # use /etc/conf.d/grub instead of /etc/default/grub |
41 | mpatch ${PNAME}-${PVER}-confd.patch || die | ||
42 | |||
43 | niro | 2540 | # fixes some issues with busybox |
44 | mpatch ${PNAME}-${PVER}-alx.patch || die | ||
45 | } | ||
46 | |||
47 | niro | 2539 | src_compile() |
48 | { | ||
49 | cd ${SRCDIR} | ||
50 | |||
51 | mconfigure \ | ||
52 | --sbindir=/sbin \ | ||
53 | --bindir=/bin \ | ||
54 | --libdir=/$(mlibdir) \ | ||
55 | --disable-efiemu \ | ||
56 | --disable-werror \ | ||
57 | niro | 2540 | --disable-nls \ |
58 | niro | 2539 | || die |
59 | niro | 2541 | |
60 | niro | 2539 | mmake || die |
61 | } | ||
62 | |||
63 | src_install() | ||
64 | { | ||
65 | cd ${SRCDIR} | ||
66 | |||
67 | mmake DESTDIR=${BINDIR} install || die | ||
68 | |||
69 | # fix a missing symlink | ||
70 | mlink /bin/grub-mkimage /sbin || die | ||
71 | |||
72 | niro | 2541 | # setup a proper grub default conf |
73 | minstalldir /etc/conf.d || die | ||
74 | cat > ${BINDIR}/etc/conf.d/grub << EOF | ||
75 | GRUB_DEFAULT=0 | ||
76 | GRUB_TIMEOUT=5 | ||
77 | GRUB_DISTRIBUTOR="ALX Thinclient" | ||
78 | GRUB_CMDLINE_LINUX_DEFAULT="quiet" | ||
79 | GRUB_CMDLINE_LINUX="" | ||
80 | GRUB_TERMINAL_INPUT=console | ||
81 | GRUB_GFXMODE=auto | ||
82 | GRUB_GFXPAYLOAD_LINUX=keep | ||
83 | GRUB_DISABLE_RECOVERY=true | ||
84 | GRUB_COLOR_NORMAL="light-blue/black" | ||
85 | GRUB_COLOR_HIGHLIGHT="light-cyan/blue" | ||
86 | #GRUB_BACKGROUND="/path/to/wallpaper" | ||
87 | #GRUB_THEME="/path/to/gfxtheme" | ||
88 | EOF | ||
89 | |||
90 | niro | 2540 | minstalldir /boot/grub || die |
91 | niro | 2539 | cat > ${BINDIR}/boot/grub/grub.cfg.example << "EOF" |
92 | default 0 | ||
93 | timeout 30 | ||
94 | |||
95 | niro | 2541 | title ALX Thinclient |
96 | niro | 2539 | linux (hd0,0)/boot/vmlinuz root=/dev/hda3 |
97 | initrd (hd0,0)/boot/initrd | ||
98 | EOF | ||
99 | |||
100 | # docs | ||
101 | minstalldocs AUTHORS ChangeLog COPYING NEWS README THANKS TODO || die | ||
102 | } | ||
103 | |||
104 | preinstall() | ||
105 | { | ||
106 | mount /boot &> /dev/null | ||
107 | } | ||
108 | |||
109 | postinstall() | ||
110 | { | ||
111 | [ ! -d ${MROOT}/boot/grub ] && install -d ${MROOT}/boot/grub | ||
112 | |||
113 | # creates some essential links | ||
114 | [ ! -e ${MROOT}/boot/boot ] && ln -sf . ${MROOT}/boot/boot | ||
115 | |||
116 | echo | ||
117 | echo "Begining with GRUB2 the location of the config file has changed." | ||
118 | echo "You will find it at /boot/grub/grub.cfg" | ||
119 | echo "Also be aware of the changed commands." | ||
120 | echo "'kernel' isn't used anymore but 'linux'." | ||
121 | echo | ||
122 | } |