summaryrefslogtreecommitdiff
blob: 6ecb8c8f77027d9f7072b8f4d05e0c4f23acc5e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Wrap kernel-install from systemd-boot as installkernel"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
S="${WORKDIR}"

LICENSE="public-domain"
SLOT="0"
KEYWORDS="amd64 arm64 ~loong ppc64 x86"

RDEPEND="
	!sys-kernel/installkernel-gentoo
	|| (
		sys-apps/systemd[gnuefi(-)]
		sys-apps/systemd[boot(-)]
		sys-apps/systemd-utils[boot]
	)
"

src_install() {
	# we could technically use a symlink here but it would require
	# us to know the correct path, and that implies /usr merge problems
	into /
	newsbin - installkernel <<-EOF
		#!/usr/bin/env sh
		exec kernel-install add "\${1}" "\${2}"
	EOF

	exeinto /usr/lib/kernel/install.d/
	newexe "${FILESDIR}/${PN}-2-r2-00-00machineid-directory.install" \
		00-00machineid-directory.install
}