projectmoon-overlay/sys-kernel/librem-ec-acpi/librem-ec-acpi-0.9.1.ebuild

38 lines
902 B
Bash
Raw Normal View History

2021-07-09 20:29:43 +00:00
# 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"
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"
}
2021-07-09 20:29:43 +00:00
pkg_setup() {
linux-mod_pkg_setup
BUILD_PARAMS="KERNELDIR=${KV_DIR}"
}
src_install() {
linux-mod_src_install
einstalldocs
}