Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7858 - (hide annotations) (download)
Wed Jun 1 22:56:19 2011 UTC (13 years ago) by niro
File size: 1757 byte(s)
-fixed dependencies
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 niro 7858 >= sys-libs/zlib-1.2.5
15     >= media-libs/freetype-2.4
16     >= app-arch/xz-utils-5"
17 niro 7855
18     SRCFILE="${PNAME}-${PVER}.tar.gz"
19     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
20    
21 niro 7856 sminclude mbuild mtools
22    
23 niro 7855 SRC_URI=(
24     gnu://${PNAME}/${SRCFILE}
25     mirror://${PNAME}/${SRCFILE}
26     )
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     src_compile()
36     {
37     cd ${SRCDIR}
38    
39     mconfigure \
40     --sbindir=/sbin \
41     --bindir=/bin \
42     --libdir=/$(mlibdir) \
43     --disable-efiemu \
44     --disable-werror \
45     || die
46     mmake || die
47     }
48    
49     src_install()
50     {
51     cd ${SRCDIR}
52    
53     mmake DESTDIR=${BINDIR} install || die
54    
55     # fix a missing symlink
56     mlink /bin/grub-mkimage /sbin || die
57    
58     minstalldir ${BINDIR}/boot/grub || die
59     cat > ${BINDIR}/boot/grub/grub.cfg.example << "EOF"
60     default 0
61     timeout 30
62    
63     title Magellan-Linux
64     linux (hd0,0)/boot/vmlinuz root=/dev/hda3
65     initrd (hd0,0)/boot/initrd
66     EOF
67    
68     # docs
69     minstalldocs AUTHORS ChangeLog COPYING NEWS README THANKS TODO || die
70     }
71    
72     preinstall()
73     {
74     mount /boot &> /dev/null
75     }
76    
77     postinstall()
78     {
79    
80     [ ! -d ${MROOT}/boot/grub ] && install -d ${MROOT}/boot/grub
81    
82     # creates some essential links
83     [ ! -e ${MROOT}/boot/boot ] && ln -sf . ${MROOT}/boot/boot
84    
85     # # update grub
86     # grub --batch --device-map=/boot/grub/device.map </boot/grub/grub.conf >&/dev/null;
87    
88     echo
89     echo "Begining with GRUB2 the location of the config file has changed."
90     echo "You will find it at /boot/grub/grub.cfg"
91     echo "Also be aware of the changed commands."
92     echo "'kernel' isn't used anymore but 'linux'."
93     echo
94     }