diff options
author | 2011-08-12 15:14:58 +0200 | |
---|---|---|
committer | 2011-08-12 15:14:58 +0200 | |
commit | d031c627ad7b463d97f38cb2b66a5ad650568e00 (patch) | |
tree | a357edae3052f40a45ae10c5cb3615908d849080 | |
parent | Revert "[sys-boot/grub] disable nls as it causes issues on some setups. bette... (diff) | |
download | scarabeus-d031c627ad7b463d97f38cb2b66a5ad650568e00.tar.gz scarabeus-d031c627ad7b463d97f38cb2b66a5ad650568e00.tar.bz2 scarabeus-d031c627ad7b463d97f38cb2b66a5ad650568e00.zip |
Update a lot the src_install magic to be nicer.
-rw-r--r-- | sys-boot/grub/Manifest | 6 | ||||
-rw-r--r-- | sys-boot/grub/files/grub.default | 4 | ||||
-rw-r--r-- | sys-boot/grub/grub-1.99.ebuild | 29 | ||||
-rw-r--r-- | sys-boot/grub/grub-9999.ebuild | 29 |
4 files changed, 23 insertions, 45 deletions
diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index d0200ce..7f610ce 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1,5 +1,5 @@ -AUX grub.default 1127 RMD160 a884e842cb203687cac4cac6551b0feed58d3b7a SHA1 5878147845b5d4b4aac34ce046ead60b93c3170c SHA256 32664f2e0bdd05cf9579f8e098aa0add76ef7bf7b37eb103c6d0f625204f44d3 +AUX grub.default 1130 RMD160 6df056d7bcbaf75783921c5c45bcf3544d284f58 SHA1 c62cb61c4d96ca9780ea559d1d38fce91197c701 SHA256 8e2cc8c02135a13d4401971ce9955039cc0dc7ceb045e3eff8ba673fceef6bb9 DIST grub-1.99.tar.xz 2639224 RMD160 d59a47fa40b2be0d5ea5b2b00ff5538cfa147747 SHA1 a5ae9558f30ce7757a76aa130088b053a87e2fb6 SHA256 f308148d4c83c6f16a73b58a0cd39381656edb740929028cae7ad5f0d651021b -EBUILD grub-1.99.ebuild 7674 RMD160 873da5347010865f06807c51697384d54cf84608 SHA1 3b23be85a9e8415a70829edc1cf81702a0ec8b64 SHA256 1e618672cf0e467b13d9f9b7db51af56a65981f6993a62485f8f86b54c05264b -EBUILD grub-9999.ebuild 7674 RMD160 ab45de997ecb84ea25e8e65f3ba2919096492a4a SHA1 308eeb35282fd7912b603eaf708e65fbf6a1be93 SHA256 ab89216e2a2f6896b0045421ec85849023d79b8effbfda6aa25c82e9c01f8dbf +EBUILD grub-1.99.ebuild 7267 RMD160 57fed8e4ebc094fa4b8b8604643523d8fc60425b SHA1 0aa4decbf894e4dd187c4684e4bccdbdd1c18cda SHA256 45c0adeb9b249716e0aed753c96768113759701da3d7ebd8b25758538ffa0dd9 +EBUILD grub-9999.ebuild 7267 RMD160 8e772a74a69033f00abb4a6827105117a2aeb248 SHA1 5bedf054f5ec99212020caa5c3a8e272fd202061 SHA256 861b2c580849eb8aa5153b002dc7106ff92c2cdc204d1a31e92c5324ca94eb7a MISC metadata.xml 264 RMD160 3cb995676f964b9637fbfc0027a81b9409802608 SHA1 c4d35e3a71c545cdf1aae525de803126bf54f596 SHA256 9bd1ce830cf1b821978ab90c81b2e369177a8d7c1bfe2dd2868419872c097f64 diff --git a/sys-boot/grub/files/grub.default b/sys-boot/grub/files/grub.default index 78f96ac..07972d9 100644 --- a/sys-boot/grub/files/grub.default +++ b/sys-boot/grub/files/grub.default @@ -4,7 +4,7 @@ # # To populate all changes in this file you need to regenerate your # grub configuration file afterwards: -# 'grub-mkconfig -o /boot/grub/grub.cfg' +# 'grub2-mkconfig -o /boot/grub2/grub.cfg' # # See the grub info page for documentation on possible variables and # their associated values. @@ -27,7 +27,7 @@ GRUB_CMDLINE_LINUX="" # Background image used on graphical terminal. # Can be in various bitmap formats. -#GRUB_BACKGROUND="/boot/grub/mybackground.png" +#GRUB_BACKGROUND="/boot/grub2/mybackground.png" # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true 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 diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebuild index bd8ad8c..00eb143 100644 --- a/sys-boot/grub/grub-9999.ebuild +++ b/sys-boot/grub/grub-9999.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 |