Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7857 - (hide annotations) (download)
Wed Jun 1 22:47:55 2011 UTC (12 years, 11 months ago) by niro
File size: 1700 byte(s)
-state unstable
1 niro 7855 # $Id$
2    
3     PNAME="grub"
4     PVER="1.99"
5     PBUILD="r1"
6    
7     PCATEGORIE="sys-apps"
8 niro 7857 STATE="unstable"
9 niro 7855
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 niro 7856 sminclude mbuild mtools
20    
21 niro 7855 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     # # update grub
84     # grub --batch --device-map=/boot/grub/device.map </boot/grub/grub.conf >&/dev/null;
85    
86     echo
87     echo "Begining with GRUB2 the location of the config file has changed."
88     echo "You will find it at /boot/grub/grub.cfg"
89     echo "Also be aware of the changed commands."
90     echo "'kernel' isn't used anymore but 'linux'."
91     echo
92     }