sys-boot/refit: propperly use the mount-efi system

(Portage version: 2.2.0_alpha4/svn/Linux x86_64)

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@2742 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2010-11-15 06:57:27 +00:00
parent 77ae9e49f1
commit 9348e60b2c
3 changed files with 83 additions and 5 deletions

View File

@ -2,6 +2,9 @@
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
15 Nov 2010; Mario Fetka <mario.fetka@gmail.com> refit-0.14.2.ebuild:
propperly use the mount-efi system
14 Nov 2010; Mario Fetka <mario.fetka@gmail.com> refit-0.14.2.ebuild:
correct small typos

View File

@ -1,5 +1,5 @@
DIST refit_0.14-2.debian.tar.gz 42302 RMD160 615b9f961c69bbfca72d8a8d4a05315600de7727 SHA1 c994c168b3e8614419a0375de116530f9f84a8b1 SHA256 5418b9d6645453ac53e831c59a255ecfe85a09038e0d5d08fc1a55cf6fb087a3
DIST refit_0.14.orig.tar.gz 625164 RMD160 cb0122e58d2f7ecfacebe4147aab98288475716a SHA1 79b0f2473d6628404cb51bdaf49a4205c409c31b SHA256 0101ac403c3a8c90813df20726c9e76a58515ca7d1a35a7b2ab42eaf28e25e1e
EBUILD refit-0.14.2.ebuild 2623 RMD160 0eb422ccc70da704a2f36a1c9b14b75d0b6043e6 SHA1 5d08f8edb2e9add7d67ff66662f92dd15478d281 SHA256 0b09be0adf26157203adf015ff06f2bca60e458424c9bea89b8387f376d2e88c
MISC ChangeLog 875 RMD160 5f3acd009d959b4d7a1070ce14ac19ec07590293 SHA1 ccb88869f647b23c50c5810f3facf18d4ada0521 SHA256 ec756e394b77d50d8cf988a5e76862e38c69bef0cca91b38e6f470a7d131a3bc
EBUILD refit-0.14.2.ebuild 4796 RMD160 3dd66efe579d0a2cee4699707f13cae68719b2a2 SHA1 3b52ccc7459d272c3cc5d5aacf795e6c5edb13c2 SHA256 8850aa320372d1554159bc6352908711f9a11bfb18510d069de561a474e0df2a
MISC ChangeLog 985 RMD160 c01f6fc498da97b67a3a4a852d9ad44c47f0e651 SHA1 b80f3d8f3f294e1243c4b4b0905284c08375ef6e SHA256 5b3251a1e7cfba68a6456c7be17b401e309cb137ecc6871e96175e20351682b1
MISC metadata.xml 226 RMD160 bebcbe7a5e3d2be83c25e006192f71ebf45abb14 SHA1 ec2b713fc2363b8c51e9c164d0802eeb59d9d296 SHA256 a9d3f7df2362a9a7ddcbe05c5d97d726eeb4bab135b21643508149a08bf6a2b2

View File

@ -75,11 +75,11 @@ src_install() {
# at the moment the onyl really supported filesystem on
# all efi bootloader in the efi partition is fat32
# (elilo, refit, grub-efi, ...)
insinto /boot/efi/EFI/${PN}
insinto /usr/share/${PN}
doins refit/refit.efi
insinto /boot/efi/EFI/${PN}/tools
insinto /usr/share/${PN}/tools
doins gptsync/gptsync.efi
insinto /boot/efi/EFI/${PN}/${PN}
insinto /usr/share/${PN}/${PN}
doins -r icons
doins images/vollabel/refit.vollabel
doins refit.conf
@ -87,3 +87,78 @@ src_install() {
doman gptsync/gptsync.8
doman "${WORKDIR}"/debian/showpart.8
}
setup_efi_dir() {
local boot_dir=$1
local dir=${boot_dir}
mkdir -p "${dir}"
dir="${dir}/refit"
if [[ ! -e ${dir} ]] ; then
mkdir -p "${dir}" || die "${dir} does not exist!"
fi
einfo "Copying files from /usr/share/refit to ${dir}"
for x in \
"${ROOT}"/usr/share/refit/* ; do
[[ -f ${x} ]] && cp -p "${x}" "${dir}"/
done
if [[ ! -e ${dir}/refit ]] ; then
mkdir -p "${dir}/refit" || die "${dir}/refit does not exist!"
fi
einfo "Copying files from /usr/share/refit/refit to ${dir}/refit"
for x in \
"${ROOT}"/usr/share/refit/refit/* ; do
[[ -f ${x} ]] && cp -p "${x}" "${dir}/refit/"
done
if [[ ! -e ${dir}/refit/icons/ ]] ; then
mkdir -p "${dir}/refit/icons/" || die "${dir}/refit/icons/ does not exist!"
fi
einfo "Copying files from /usr/share/refit/refit/icons to ${dir}/refit/icons"
for x in \
"${ROOT}"/usr/share/refit/refit/icons/* ; do
[[ -f ${x} ]] && cp -p "${x}" "${dir}/refit/icons/"
done
if [[ ! -e ${dir}/tools ]] ; then
mkdir -p "${dir}/tools/" || die "${dir}/tools/ does not exist!"
fi
einfo "Copying files from /usr/share/refit/tools to ${dir}/tools"
for x in \
"${ROOT}"/usr/share/refit/tools/* ; do
[[ -f ${x} ]] && cp -p "${x}" "${dir}/tools/"
done
}
pkg_postinst() {
if [[ -n ${DONT_MOUNT_EFI} ]]; then
elog "WARNING: you have DONT_MOUNT_EFI in effect, so you must apply"
elog "the following instructions for your /boot/efi!"
elog "Neglecting to do so may cause your system to fail to boot!"
elog
else
setup_efi_dir "${ROOT}"/boot/efi/EFI
# Trailing output because if this is run from pkg_postinst, it gets mixed into
# the other output.
einfo ""
fi
elog "To interactively install refit files to another device such as a USB"
elog "stick, just run the following and specify the directory as prompted:"
elog " emerge --config =${PF}"
elog "Alternately, you can export REFIT_ALT_INSTALLDIR=/path/to/use to tell"
elog "refit where to install in a non-interactive way."
}
pkg_config() {
local dir
if [ ! -d "${REFIT_ALT_INSTALLDIR}" ]; then
einfo "Enter the directory where you want to setup refit:"
read dir
else
dir="${REFIT_ALT_INSTALLDIR}"/EFI
fi
setup_efi_dir "${dir}"
}