2024-09-27 14:18:03 +03:00
|
|
|
# Copyright 2024 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=8
|
|
|
|
|
|
|
|
inherit go-module
|
|
|
|
|
|
|
|
EGIT_COMMIT=276a3efc4336e866e3944359ecd86658d6354eb9
|
|
|
|
DESCRIPTION="Fast and secure initramfs generator"
|
|
|
|
HOMEPAGE="https://github.com/anatol/booster"
|
|
|
|
SRC_URI="https://github.com/anatol/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz
|
|
|
|
https://git.millerson.name/alex/gentoo-artifacts/releases/download/${P}-vendor/${P}-vendor.tar.xz"
|
|
|
|
|
|
|
|
LICENSE="MIT"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64"
|
|
|
|
|
2024-09-27 14:57:54 +03:00
|
|
|
IUSE="kernel-install installkernel"
|
|
|
|
|
|
|
|
DEPEND="kernel-install? (
|
|
|
|
|| (
|
|
|
|
sys-apps/systemd-utils
|
|
|
|
sys-apps/systemd
|
|
|
|
)
|
|
|
|
)
|
|
|
|
installkernel? ( sys-kernel/installkernel )
|
|
|
|
"
|
2024-09-27 14:18:03 +03:00
|
|
|
RDEPEND="${DEPEND}"
|
|
|
|
BDEPEND=""
|
|
|
|
|
|
|
|
S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
|
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
cd ${S}/generator && ego build
|
|
|
|
cd ${S}/init && ego build
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
insinto /etc
|
|
|
|
newins "${FILESDIR}/${PN}.yaml" ${PN}.yaml
|
|
|
|
|
2024-09-27 14:57:54 +03:00
|
|
|
if use installkernel; then
|
|
|
|
# Install the kernel preinst.d hook
|
|
|
|
exeinto /usr/lib/kernel/preinst.d
|
|
|
|
doexe "${FILESDIR}/installkernel-52-booster.install"
|
|
|
|
fi
|
|
|
|
if use kernel-install; then
|
|
|
|
exeinto /usr/lib/kernel/install.d
|
|
|
|
doexe "${FILESDIR}/kernel-install-52-booster.install"
|
|
|
|
fi
|
|
|
|
|
2024-09-27 14:18:03 +03:00
|
|
|
exeinto /usr/lib/${PN}
|
|
|
|
doexe init/init
|
|
|
|
|
|
|
|
newbin generator/generator ${PN}
|
|
|
|
|
|
|
|
default
|
|
|
|
}
|