Contents of /smage/branches/alx-0_6_0/core/grub/grub-1.99-r1.smage2
Parent Directory | Revision Log
Revision 2545 -
(show annotations)
(download)
Sat Jul 2 12:23:33 2011 UTC (12 years, 11 months ago) by niro
File size: 3819 byte(s)
Sat Jul 2 12:23:33 2011 UTC (12 years, 11 months ago) by niro
File size: 3819 byte(s)
-split-package
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 | REMOVE_DEPRECATED_MAGE_TARGETS=1 |
20 | sminclude mtools alx-split |
21 | |
22 | ALX_ONLY_KEEP="/boot/grub etc/conf.d etc/grub.d sbin usr/share/grub |
23 | $(mlibdir)/grub/grub-mkconfig_lib |
24 | $(mlibdir)/grub/update-grub_lib |
25 | $(mlibdir)/grub/i386-pc/ata.mod |
26 | $(mlibdir)/grub/i386-pc/biosdisk.mod |
27 | $(mlibdir)/grub/i386-pc/boot.img |
28 | $(mlibdir)/grub/i386-pc/boot.mod |
29 | $(mlibdir)/grub/i386-pc/crypto.mod |
30 | $(mlibdir)/grub/i386-pc/ext2.mod |
31 | $(mlibdir)/grub/i386-pc/fat.mod |
32 | $(mlibdir)/grub/i386-pc/fshelp.mod |
33 | $(mlibdir)/grub/i386-pc/gzio.mod |
34 | $(mlibdir)/grub/i386-pc/iso9660.mod |
35 | $(mlibdir)/grub/i386-pc/kernel.img |
36 | $(mlibdir)/grub/i386-pc/keylayouts.mod |
37 | $(mlibdir)/grub/i386-pc/linux.mod |
38 | $(mlibdir)/grub/i386-pc/mmap.mod |
39 | $(mlibdir)/grub/i386-pc/moddep.lst |
40 | $(mlibdir)/grub/i386-pc/msdospart.mod |
41 | $(mlibdir)/grub/i386-pc/normal.mod |
42 | $(mlibdir)/grub/i386-pc/part_msdos.mod |
43 | $(mlibdir)/grub/i386-pc/password.mod |
44 | $(mlibdir)/grub/i386-pc/pci.mod |
45 | $(mlibdir)/grub/i386-pc/reiserfs.mod |
46 | $(mlibdir)/grub/i386-pc/relocator.mod |
47 | $(mlibdir)/grub/i386-pc/scsi.mod |
48 | $(mlibdir)/grub/i386-pc/terminal.lst |
49 | $(mlibdir)/grub/i386-pc/terminal.mod |
50 | $(mlibdir)/grub/i386-pc/terminfo.mod |
51 | $(mlibdir)/grub/i386-pc/usb.mod |
52 | $(mlibdir)/grub/i386-pc/usb_keyboard.mod |
53 | $(mlibdir)/grub/i386-pc/vga.mod |
54 | $(mlibdir)/grub/i386-pc/vbe.mod |
55 | $(mlibdir)/grub/i386-pc/video.mod |
56 | $(mlibdir)/grub/i386-pc/video_bochs.mod |
57 | $(mlibdir)/grub/i386-pc/video_cyrrus.mod |
58 | $(mlibdir)/grub/i386-pc/video_fb.mod" |
59 | |
60 | SRC_URI=( |
61 | gnu://${PNAME}/${SRCFILE} |
62 | mirror://${PNAME}/${SRCFILE} |
63 | mirror://${PNAME}/${PNAME}-${PVER}-confd.patch |
64 | mirror://${PNAME}/${PNAME}-${PVER}-busybox.patch |
65 | ) |
66 | |
67 | UP2DATE="updatecmd_gnu ${PNAME} gz" |
68 | |
69 | # grub doesn't like CFLAG optimation, |
70 | # and do you really want that at your bootloader ?? |
71 | unset CFLAGS |
72 | unset CXXFLAGS |
73 | |
74 | src_prepare() |
75 | { |
76 | munpack ${SRCFILE} || die |
77 | cd ${SRCDIR} |
78 | |
79 | # use /etc/conf.d/grub instead of /etc/default/grub |
80 | mpatch ${PNAME}-${PVER}-confd.patch || die |
81 | |
82 | # fixes some issues with busybox |
83 | mpatch ${PNAME}-${PVER}-busybox.patch || die |
84 | } |
85 | |
86 | src_compile() |
87 | { |
88 | cd ${SRCDIR} |
89 | |
90 | mconfigure \ |
91 | --sbindir=/sbin \ |
92 | --bindir=/bin \ |
93 | --libdir=/$(mlibdir) \ |
94 | --disable-efiemu \ |
95 | --disable-werror \ |
96 | --disable-nls \ |
97 | || die |
98 | |
99 | mmake || die |
100 | } |
101 | |
102 | src_install() |
103 | { |
104 | cd ${SRCDIR} |
105 | |
106 | mmake DESTDIR=${BINDIR} install || die |
107 | |
108 | # fix a missing symlink |
109 | mlink /bin/grub-mkimage /sbin || die |
110 | |
111 | # install only grub dir, no default config |
112 | minstalldir /boot/grub || die |
113 | |
114 | # docs |
115 | minstalldocs AUTHORS ChangeLog COPYING NEWS README THANKS TODO || die |
116 | |
117 | # setup a proper grub default conf |
118 | minstalldir /etc/conf.d || die |
119 | mcinjectfile grub.confd /etc/conf.d/grub || die |
120 | |
121 | # user custom creation scripts and delete the provided ones |
122 | local i |
123 | for i in 10_* 20_* 30_* 40_* 41_* README |
124 | do |
125 | if [[ -f /etc/grub.d/${i} ]] |
126 | then |
127 | rm /etc/grub.d/${i} || die |
128 | fi |
129 | done |
130 | mcinjectexec 05_alx_header /etc/grub.d/ || die |
131 | mcinjectexec 10_alx /etc/grub.d/ || die |
132 | mcinjectexec 30_alx_hwdetect /etc/grub.d/ || die |
133 | mcinjectexec 40_alx_reset /etc/grub.d/ || die |
134 | } |
135 | |
136 | preinstall() |
137 | { |
138 | mount /boot &> /dev/null |
139 | |
140 | add_conf_prot_mask /etc/grub.d |
141 | add_conf_prot_ignore /etc/conf.d/grub |
142 | } |
143 | |
144 | postinstall() |
145 | { |
146 | [ ! -d ${MROOT}/boot/grub ] && install -d ${MROOT}/boot/grub |
147 | |
148 | # creates some essential links |
149 | [ ! -e ${MROOT}/boot/boot ] && ln -sf . ${MROOT}/boot/boot |
150 | |
151 | echo |
152 | echo "Begining with GRUB2 the location of the config file has changed." |
153 | echo "You will find it at /boot/grub/grub.cfg" |
154 | echo "Also be aware of the changed commands." |
155 | echo "'kernel' isn't used anymore but 'linux'." |
156 | echo |
157 | } |