Magellan Linux

Contents of /branches/magellan-next/core/grub/grub-1.99-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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