/[gentoo-x86]/sys-boot/grub/grub-9999.ebuild
Gentoo

Contents of /sys-boot/grub/grub-9999.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Tue Dec 30 11:35:54 2008 UTC (5 years, 8 months ago) by vapier
Branch: MAIN
Changes since 1.2: +32 -7 lines
Fix install paths and add support for USE=multislot so people can toy with grub2 while keeping grub1.
(Portage version: 2.2_rc20/cvs/Linux 2.6.28 x86_64)

1 vapier 1.1 # Copyright 1999-2008 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 vapier 1.3 # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.2 2008/12/30 02:18:04 vapier Exp $
4 vapier 1.1
5     inherit mount-boot eutils flag-o-matic toolchain-funcs
6    
7     if [[ ${PV} == "9999" ]] ; then
8     ESVN_REPO_URI="svn://svn.sv.gnu.org/grub/trunk/grub2"
9     inherit subversion
10 vapier 1.2 SRC_URI=""
11     else
12     SRC_URI="ftp://alpha.gnu.org/gnu/${PN}/${P}.tar.gz
13     mirror://gentoo/${P}.tar.gz"
14 vapier 1.1 fi
15    
16     DESCRIPTION="GNU GRUB 2 boot loader"
17     HOMEPAGE="http://www.gnu.org/software/grub/"
18    
19     LICENSE="GPL-2"
20 vapier 1.3 use multislot && SLOT="2" || SLOT="0"
21 vapier 1.1 KEYWORDS=""
22 vapier 1.3 IUSE="custom-cflags multislot static"
23 vapier 1.1
24     DEPEND=">=sys-libs/ncurses-5.2-r5
25     dev-libs/lzo"
26     PROVIDE="virtual/bootloader"
27    
28     STRIP_MASK="/lib*/grub/*/*.mod"
29 vapier 1.3 QA_EXECSTACK="sbin/grub-probe sbin/grub-setup"
30 vapier 1.1
31     src_compile() {
32     use amd64 && multilib_toolchain_setup x86
33     use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
34     use static && append-ldflags -static
35    
36     econf \
37 vapier 1.3 --sbindir=/sbin \
38     --bindir=/bin \
39     --libdir=/$(get_libdir) \
40 vapier 1.1 || die "econf failed"
41     emake -j1 || die "making regular stuff"
42     }
43    
44     src_install() {
45     emake DESTDIR="${D}" install || die
46     dodoc AUTHORS ChangeLog NEWS README THANKS TODO
47 vapier 1.3 if use multislot ; then
48     sed -i s:grub-install:grub2-install: "${D}"/sbin/grub-install
49     mv "${D}"/sbin/grub{,2}-install || die
50     mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
51     fi
52     }
53    
54     setup_boot_dir() {
55     local boot_dir=$1
56     local dir=${boot_dir}/grub
57    
58     if [[ ! -e ${dir}/grub.cfg ]] ; then
59     einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
60     grub-mkconfig -o "${dir}/grub.cfg"
61     fi
62    
63     #local install=grub-install
64     #use multislot && install="grub2-install --grub-setup=/bin/true"
65     #einfo "Running: ${install} "
66     #${install}
67 vapier 1.1 }
68    
69     pkg_postinst() {
70 vapier 1.3 if use multislot ; then
71     elog "You have installed grub2 with USE=multislot, so to coexist"
72     elog "with grub1, the grub2 install binary is named grub2-install."
73     fi
74     setup_boot_dir "${ROOT}"boot
75 vapier 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20