# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="GRUB Utilities is a collection of multi platform utilities for GRUB Legacy, GRUB2 and GRUB for DOS." HOMEPAGE="https://gna.org/projects/grubutil/" MY_PV=${PV#*.*.} MY_PV="$PN-${PV%.$MY_PV}-src-$MY_PV" SRC_URI="http://download.gna.org/grubutil/$MY_PV.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE= RESTRICT="mirror" DEPEND="app-arch/unzip" RDEPEND= S="$WORKDIR/$MY_PV" src_compile() { ed -s Makefile <<< $'H\n/^PREFIX/s_/usr/local/bin/_/usr/bin/_\nw\nq' || die 'Unable to set prefix' emake || die 'emake failed' } src_install() { local d="$D/usr/$(get_libdir)/$PN" || die 'Unable to find libdir' dobin grubinst grubmenu || die 'Unable to install binaries' mkdir -p "$d" || die "Unable to make $d" cp --preserve=mode "$S/g2hdr.bin" "$S/grldr.mbr" "$d" || die 'Unable to install lib files' }