From 9b67105a0999b1f76892afd2f41f301b61970cd1 Mon Sep 17 00:00:00 2001 From: projectmoon Date: Wed, 9 Nov 2022 09:16:19 +0100 Subject: [PATCH] sys-kernel/librem-ec-acpi: add proper depends for distkernel --- .../librem-ec-acpi-0.9.1-r1.ebuild | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1-r1.ebuild diff --git a/sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1-r1.ebuild b/sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1-r1.ebuild new file mode 100644 index 0000000..a165bfb --- /dev/null +++ b/sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1-r1.ebuild @@ -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 +}