/[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.5 - (hide annotations) (download)
Thu Jan 1 11:24:35 2009 UTC (5 years, 7 months ago) by vapier
Branch: MAIN
Changes since 1.4: +2 -2 lines
tweak STRIP_MASK so it works as expected #231935
(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.5 # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.4 2008/12/31 09:09:06 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 vapier 1.4 LICENSE="GPL-3"
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 vapier 1.5 export STRIP_MASK="*/grub/*/*.mod"
29 vapier 1.3 QA_EXECSTACK="sbin/grub-probe sbin/grub-setup"
30 vapier 1.1
31     src_compile() {
32     use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
33     use static && append-ldflags -static
34    
35     econf \
36 vapier 1.3 --sbindir=/sbin \
37     --bindir=/bin \
38     --libdir=/$(get_libdir) \
39 vapier 1.1 || die "econf failed"
40     emake -j1 || die "making regular stuff"
41     }
42    
43     src_install() {
44     emake DESTDIR="${D}" install || die
45     dodoc AUTHORS ChangeLog NEWS README THANKS TODO
46 vapier 1.3 if use multislot ; then
47     sed -i s:grub-install:grub2-install: "${D}"/sbin/grub-install
48     mv "${D}"/sbin/grub{,2}-install || die
49     mv "${D}"/usr/share/man/man8/grub{,2}-install.8 || die
50     fi
51     }
52    
53     setup_boot_dir() {
54     local boot_dir=$1
55     local dir=${boot_dir}/grub
56    
57     if [[ ! -e ${dir}/grub.cfg ]] ; then
58     einfo "Running: grub-mkconfig -o '${dir}/grub.cfg'"
59     grub-mkconfig -o "${dir}/grub.cfg"
60     fi
61    
62     #local install=grub-install
63     #use multislot && install="grub2-install --grub-setup=/bin/true"
64     #einfo "Running: ${install} "
65     #${install}
66 vapier 1.1 }
67    
68     pkg_postinst() {
69 vapier 1.3 if use multislot ; then
70     elog "You have installed grub2 with USE=multislot, so to coexist"
71     elog "with grub1, the grub2 install binary is named grub2-install."
72     fi
73     setup_boot_dir "${ROOT}"boot
74 vapier 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20