Files
guru/app-backup/grub-btrfs/grub-btrfs-4.11-r1.ebuild
T

46 lines
1.1 KiB
Bash
Raw Normal View History

# Copyright 2019-2026 Gentoo Authors
2022-04-15 15:37:23 +02:00
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit optfeature
DESCRIPTION="Improves Grub by adding btrfs snapshots to the Grub menu"
2022-04-15 15:37:23 +02:00
HOMEPAGE="https://github.com/Antynea/grub-btrfs"
SRC_URI="https://github.com/Antynea/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="systemd"
2022-04-15 15:37:23 +02:00
PATCHES=( "${FILESDIR}/${P}-remove-docs-from-make.patch" )
DEPEND="
sys-fs/btrfs-progs
sys-boot/grub
2022-12-06 07:42:13 +02:00
app-alternatives/awk
>=app-shells/bash-4
2022-04-15 15:37:23 +02:00
"
RDEPEND="${DEPEND}"
src_compile(){
true
}
2022-04-15 15:37:23 +02:00
src_install(){
local conf
if use systemd; then
conf+="SYSTEMD=true OPENRC=false"
else conf+="OPENRC=true SYSTEMD=false"
fi
emake DESTDIR="${D}" ${conf} install || die
2022-04-15 15:37:23 +02:00
dodoc README.md
mv ./initramfs/readme.md initramfs-overlayfs.md || die
2022-04-15 15:37:23 +02:00
dodoc initramfs-overlayfs.md
}
pkg_postinst() {
elog "run 'grub-mkconfig -o /boot/grub/grub.cfg' to update your Grub menu."
elog "update your /etc/grub.d/41_snapshots-btrfs script (e.g. with dispatch-conf or etc-update)"
2022-04-18 21:10:37 +02:00
optfeature "LVM/ LUKS support" sys-boot/grub[device-mapper]
2022-04-15 15:37:23 +02:00
}