Magellan Linux

Contents of /smage/branches/alx-0_6_0/core/grub/grub-1.99-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2539 - (show annotations) (download)
Fri Jul 1 17:37:45 2011 UTC (12 years, 10 months ago) by niro
File size: 1614 byte(s)
auto added: ver bump to 1.99-r1
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 mbuild mtools
20
21 SRC_URI=(
22 gnu://${PNAME}/${SRCFILE}
23 mirror://${PNAME}/${SRCFILE}
24 )
25
26 UP2DATE="updatecmd_gnu ${PNAME} gz"
27
28 # grub doesn't like CFLAG optimation,
29 # and do you really want that at your bootloader ??
30 unset CFLAGS
31 unset CXXFLAGS
32
33 src_compile()
34 {
35 cd ${SRCDIR}
36
37 mconfigure \
38 --sbindir=/sbin \
39 --bindir=/bin \
40 --libdir=/$(mlibdir) \
41 --disable-efiemu \
42 --disable-werror \
43 || die
44 mmake || die
45 }
46
47 src_install()
48 {
49 cd ${SRCDIR}
50
51 mmake DESTDIR=${BINDIR} install || die
52
53 # fix a missing symlink
54 mlink /bin/grub-mkimage /sbin || die
55
56 minstalldir ${BINDIR}/boot/grub || die
57 cat > ${BINDIR}/boot/grub/grub.cfg.example << "EOF"
58 default 0
59 timeout 30
60
61 title Magellan-Linux
62 linux (hd0,0)/boot/vmlinuz root=/dev/hda3
63 initrd (hd0,0)/boot/initrd
64 EOF
65
66 # docs
67 minstalldocs AUTHORS ChangeLog COPYING NEWS README THANKS TODO || die
68 }
69
70 preinstall()
71 {
72 mount /boot &> /dev/null
73 }
74
75 postinstall()
76 {
77
78 [ ! -d ${MROOT}/boot/grub ] && install -d ${MROOT}/boot/grub
79
80 # creates some essential links
81 [ ! -e ${MROOT}/boot/boot ] && ln -sf . ${MROOT}/boot/boot
82
83 echo
84 echo "Begining with GRUB2 the location of the config file has changed."
85 echo "You will find it at /boot/grub/grub.cfg"
86 echo "Also be aware of the changed commands."
87 echo "'kernel' isn't used anymore but 'linux'."
88 echo
89 }