sys-kernel/librem-ec-acpi: add proper depends for distkernel

This commit is contained in:
projectmoon 2022-11-09 09:16:19 +01:00
parent d7fe9f1fc9
commit 9b67105a09
1 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,42 @@
# Copyright 2021 projectmoon
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit linux-info linux-mod
DESCRIPTION="Librem EC ACPI Driver"
HOMEPAGE="https://source.puri.sm/nicole.faerber/librem-ec-acpi-dkms"
SRC_URI="https://source.puri.sm/nicole.faerber/librem-ec-acpi-dkms/-/archive/v${PV}/librem-ec-acpi-dkms-v${PV}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
IUSE="dist-kernel"
RDEPEND="dist-kernel? ( virtual/dist-kernel:= )"
DEPEND="${RDEPEND}"
S="${WORKDIR}/librem-ec-acpi-dkms-v${PV}/"
MODULE_NAMES="librem_ec_acpi(librem:${S}:${S})"
BUILD_TARGETS="clean all"
src_prepare() {
default
# Makefile hardcoded to point at running kernel
# but we want the user-chosen kernel.
linux-info_get_any_version
sed -i "s/\$(shell uname -r)/${KV_FULL}/" Makefile \
|| die "could not set kernel version in makefile"
}
pkg_setup() {
BUILD_PARAMS="KV=${KV_FULL} KSRC=${KERNEL_DIR} KERNELDIR=${KV_DIR}"
linux-mod_pkg_setup
}
src_install() {
linux-mod_src_install
einstalldocs
}