/[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.4 - (show annotations) (download)
Wed Dec 31 09:09:06 2008 UTC (5 years, 6 months ago) by vapier
Branch: MAIN
Changes since 1.3: +2 -3 lines
Drop multilib stuff as the binaries that run on the host system.
(Portage version: 2.2_rc20/cvs/Linux 2.6.28 x86_64)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.3 2008/12/30 11:35:54 vapier Exp $
4
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 SRC_URI=""
11 else
12 SRC_URI="ftp://alpha.gnu.org/gnu/${PN}/${P}.tar.gz
13 mirror://gentoo/${P}.tar.gz"
14 fi
15
16 DESCRIPTION="GNU GRUB 2 boot loader"
17 HOMEPAGE="http://www.gnu.org/software/grub/"
18
19 LICENSE="GPL-3"
20 use multislot && SLOT="2" || SLOT="0"
21 KEYWORDS=""
22 IUSE="custom-cflags multislot static"
23
24 DEPEND=">=sys-libs/ncurses-5.2-r5
25 dev-libs/lzo"
26 PROVIDE="virtual/bootloader"
27
28 STRIP_MASK="/lib*/grub/*/*.mod"
29 QA_EXECSTACK="sbin/grub-probe sbin/grub-setup"
30
31 src_compile() {
32 use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
33 use static && append-ldflags -static
34
35 econf \
36 --sbindir=/sbin \
37 --bindir=/bin \
38 --libdir=/$(get_libdir) \
39 || 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 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 }
67
68 pkg_postinst() {
69 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 }

  ViewVC Help
Powered by ViewVC 1.1.20