diff options
Diffstat (limited to 'sys-boot/grub/grub-1.99.ebuild')
-rw-r--r-- | sys-boot/grub/grub-1.99.ebuild | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/sys-boot/grub/grub-1.99.ebuild b/sys-boot/grub/grub-1.99.ebuild index f3e2eb8..b682bf6 100644 --- a/sys-boot/grub/grub-1.99.ebuild +++ b/sys-boot/grub/grub-1.99.ebuild @@ -155,6 +155,7 @@ grub_src_configure() { --bindir=/bin \ --libdir=/$(get_libdir) \ --disable-efiemu \ + --program-transform-name=s,grub,grub2, \ $(use_enable device-mapper) \ $(use_enable truetype grub-mkfont) \ $(use_enable nls) \ @@ -219,27 +220,15 @@ src_install() { grub_run_phase ${FUNCNAME} ${i} done - # Slot all binaries/info/man to state grub2-* instead of grub-*. - # Can this be done better? - grub_rename_files "${ED}"/sbin/ - grub_rename_files "${ED}"/bin/ - grub_rename_files deep "${ED}"/usr/share/info/ - grub_rename_files deep "${ED}"/usr/share/man/man1/ - grub_rename_files deep "${ED}"/usr/share/man/man8/ - # Rename direct binaries calls in the bash scripts provided by grub - dosym /lib64/grub/grub-mkconfig_lib /lib64/grub/grub2-mkconfig_lib - sed -i \ - -e 's:echo grub-:echo grub2-:' \ - "${ED}"/{sbin,bin,lib64/grub}/* - sed -i \ - -e 's:grub-:grub2-:' - "${ED}"/etc/grub.d/* + # slot all collisions with grub legacy + mv "${ED}"/usr/share/info/grub.info \ + "${ED}"/usr/share/info/grub2.info || die # can't be in docs array as we use defualt_src_install in different builddir dodoc AUTHORS ChangeLog NEWS README THANKS TODO insinto /etc/default newins "${FILESDIR}"/grub.default grub - cat <<EOF >> "${ED}"/lib*/grub/grub-mkconfig_lib + cat <<EOF >> "${ED}"/lib*/grub2/grub-mkconfig_lib GRUB_DISTRIBUTOR="Gentoo" EOF } @@ -255,13 +244,13 @@ setup_boot_dir() { elog " https://wiki.archlinux.org/index.php/GRUB2" fi - if [[ ! -e ${dir}/grub.cfg && -e ${dir}/menu.lst ]] ; then + if [[ ! -e ${dir}/grub.cfg && -e ${dir/2/}/menu.lst ]] ; then # This is first grub2 install and we have old configuraton for # grub1 around. Lets try to generate grub.cfg from it so user # does not loose any stuff when rebooting. # NOTE: in long term he still NEEDS to migrate to grub.d stuff. - einfo "Running: grub2-menulst2cfg '${dir}/menu.lst' '${dir}/grub.cfg'" - grub2-menulst2cfg "${dir}/menu.lst" "${dir}/grub.cfg" || \ + einfo "Running: grub2-menulst2cfg '${dir/2/}/menu.lst' '${dir}/grub.cfg'" + grub2-menulst2cfg "${dir/2/}/menu.lst" "${dir}/grub.cfg" || \ ewarn "Running grub2-menulst2cfg failed!" einfo "Even if we just created configuration for your grub-2 using old" @@ -286,7 +275,7 @@ setup_boot_dir() { pkg_postinst() { mount-boot_mount_boot_partition - setup_boot_dir "${ROOT}"boot/grub + setup_boot_dir "${ROOT}"boot/grub2 # needs to be called after we call setup_boot_dir mount-boot_pkg_postinst |