Contents of /trunk/core/grub/grub-1.96-r1.smage2
Parent Directory | Revision Log
Revision 2 -
(show annotations)
(download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 11 months ago) by niro
File size: 2027 byte(s)
Fri Oct 10 13:29:42 2008 UTC (15 years, 11 months ago) by niro
File size: 2027 byte(s)
import repo
1 | # $Header: /magellan-cvs/smage/grub/grub-1.92-r5.smage2,v 1.2 2007/04/11 09:08:01 niro Exp $ |
2 | |
3 | PNAME="grub" |
4 | PVER="1.96" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="sys-apps" |
8 | STATE="unstable" |
9 | |
10 | DESCRIPTION="GNU GRUB2 boot loader." |
11 | HOMEPAGE="http://www.gnu.org/software/grub/" |
12 | |
13 | DEPEND=">= sys-libs/ncurses-5.2 |
14 | >= dev-libs/lzo-2" |
15 | |
16 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
17 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
18 | |
19 | SRC_URI=( |
20 | mirror://${PNAME}/${SRCFILE} |
21 | mirror://${PNAME}/${PNAME}-1.9.2-grub-install-typo.patch |
22 | ) |
23 | |
24 | # get only 1.xx versions! |
25 | UP2DATE="updatecmd ftp://alpha.gnu.org/gnu/${PNAME} | grep -- -1.[0-9].* | lasttarball gz" |
26 | |
27 | # grub doesn't like CFLAG optimation, |
28 | # and do you really want that at your bootloader ?? |
29 | unset CFLAGS |
30 | unset CXXFLAGS |
31 | |
32 | src_prepare() |
33 | { |
34 | munpack ${SRCFILE} |
35 | cd ${SRCDIR} |
36 | |
37 | mpatch ${PNAME}-${PVER}-grub-install-typo.patch || die |
38 | } |
39 | |
40 | src_compile() |
41 | { |
42 | cd ${SRCDIR} |
43 | |
44 | # enable static builds for x84_64 |
45 | if [[ ${ARCH} = x86_64 ]] |
46 | then |
47 | export CC="gcc -m32" |
48 | export LDFLAGS="-static" |
49 | fi |
50 | |
51 | mconfigure --prefix=/ --datadir=/usr/lib || die |
52 | mmake || die |
53 | } |
54 | |
55 | src_install() |
56 | { |
57 | cd ${SRCDIR} |
58 | |
59 | mmake DESTDIR=${BINDIR} install || die |
60 | |
61 | # fix a missing symlink |
62 | mlink /bin/grub-mkimage /sbin || die |
63 | |
64 | minstalldir ${BINDIR}/boot/grub || die |
65 | cat > ${BINDIR}/boot/grub/grub.cfg.example << "EOF" |
66 | default 0 |
67 | timeout 30 |
68 | |
69 | title Magellan-Linux |
70 | linux (hd0,0)/boot/vmlinuz root=/dev/hda3 |
71 | initrd (hd0,0)/boot/initrd |
72 | EOF |
73 | |
74 | # docs |
75 | minstalldocs AUTHORS ChangeLog COPYING NEWS README THANKS TODO || die |
76 | } |
77 | |
78 | preinstall() |
79 | { |
80 | mount /boot &> /dev/null |
81 | } |
82 | |
83 | postinstall() |
84 | { |
85 | |
86 | [ ! -d ${MROOT}/boot/grub ] && install -d ${MROOT}/boot/grub |
87 | |
88 | # creates some essential links |
89 | [ ! -e ${MROOT}/boot/boot ] && ln -sf . ${MROOT}/boot/boot |
90 | |
91 | # # update grub |
92 | # grub --batch --device-map=/boot/grub/device.map </boot/grub/grub.conf >&/dev/null; |
93 | |
94 | echo |
95 | echo "Begining with GRUB2 the location of the config file has changed." |
96 | echo "You will find it at /boot/grub/grub.cfg" |
97 | echo "Also be aware of the changed commands." |
98 | echo "'kernel' isn't used anymore but 'linux'." |
99 | echo |
100 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |