summaryrefslogtreecommitdiff
blob: 2cb2c5fce68c22983b72f5659ebafc1c2b5f0722 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit linux-mod-r1

COMMIT_HASH="cfff3d242c11dc3ebfa70e7771ee1c094bf2f368"
DESCRIPTION="Kernel module to expose more Framework Laptop stuff"
HOMEPAGE="https://github.com/DHowett/framework-laptop-kmod"
SRC_URI="https://github.com/DHowett/framework-laptop-kmod/archive/${COMMIT_HASH}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT_HASH}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"

CONFIG_CHECK="
	~CROS_EC
	~CROS_EC_LPC
"

DOCS=(
	README.md
)

pkg_setup() {
	linux-mod-r1_pkg_setup

	MODULES_MAKEARGS+=(
		KDIR="${KERNEL_DIR}"
	)
}

pkg_pretend() {
	check_extra_config
}

src_compile() {
	local modlist=(
		framework_laptop
	)
	linux-mod-r1_src_compile
}

pkg_postinst() {
	linux-mod-r1_pkg_postinst

	#if kernel_is -lt 6 7 0; then
		ewarn "For the Framework Laptop 13 AMD Ryzen 7040 series and the Framework Laptop 16a,"
		ewarn "you will need to apply the patch series from this URL:"
		ewarn "https://lore.kernel.org/chrome-platform/20231005160701.19987-1-dustin@howett.net/"
	#fi
}