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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.3
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/Attic/grub-9999.ebuild,v 1.2 2008/12/30 02:18:04 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/Attic/grub-9999.ebuild,v 1.3 2008/12/30 11:35:54 vapier Exp $
4 4
5inherit mount-boot eutils flag-o-matic toolchain-funcs 5inherit mount-boot eutils flag-o-matic toolchain-funcs
6 6
7if [[ ${PV} == "9999" ]] ; then 7if [[ ${PV} == "9999" ]] ; then
8 ESVN_REPO_URI="svn://svn.sv.gnu.org/grub/trunk/grub2" 8 ESVN_REPO_URI="svn://svn.sv.gnu.org/grub/trunk/grub2"
15 15
16DESCRIPTION="GNU GRUB 2 boot loader" 16DESCRIPTION="GNU GRUB 2 boot loader"
17HOMEPAGE="http://www.gnu.org/software/grub/" 17HOMEPAGE="http://www.gnu.org/software/grub/"
18 18
19LICENSE="GPL-2" 19LICENSE="GPL-2"
20SLOT="0" 20use multislot && SLOT="2" || SLOT="0"
21KEYWORDS="" 21KEYWORDS=""
22IUSE="static custom-cflags" 22IUSE="custom-cflags multislot static"
23 23
24DEPEND=">=sys-libs/ncurses-5.2-r5 24DEPEND=">=sys-libs/ncurses-5.2-r5
25 dev-libs/lzo" 25 dev-libs/lzo"
26PROVIDE="virtual/bootloader" 26PROVIDE="virtual/bootloader"
27 27
28STRIP_MASK="/lib*/grub/*/*.mod" 28STRIP_MASK="/lib*/grub/*/*.mod"
29QA_EXECSTACK="sbin/grub-probe sbin/grub-setup"
29 30
30src_compile() { 31src_compile() {
31 use amd64 && multilib_toolchain_setup x86 32 use amd64 && multilib_toolchain_setup x86
32 use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS 33 use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
33 use static && append-ldflags -static 34 use static && append-ldflags -static
34 35
35 econf \ 36 econf \
36 --prefix=/ \ 37 --sbindir=/sbin \
37 --datadir=/usr/lib \ 38 --bindir=/bin \
39 --libdir=/$(get_libdir) \
38 || die "econf failed" 40 || die "econf failed"
39 emake -j1 || die "making regular stuff" 41 emake -j1 || die "making regular stuff"
40} 42}
41 43
42src_install() { 44src_install() {
43 emake DESTDIR="${D}" install || die 45 emake DESTDIR="${D}" install || die
44 dodoc AUTHORS ChangeLog NEWS README THANKS TODO 46 dodoc AUTHORS ChangeLog NEWS README THANKS TODO
47 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
54setup_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}
45} 67}
46 68
47pkg_postinst() { 69pkg_postinst() {
48 elog "To automatically generate a grub configuration file:" 70 if use multislot ; then
49 elog "# /sbin/grub-mkconfig -o /boot/grub/grub.cfg" 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
50} 75}

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20