Skip to content

Commit

Permalink
sys-kernel/zenpower3: add 9999 package
Browse files Browse the repository at this point in the history
The upstream used in the versioned zenpower3 package is dead. The best fix would be to fallback to live, and use the original upstream (0.2.0 was using a fork of zenpower).

Signed-off-by: kernaltrap <[email protected]>
  • Loading branch information
kernaltrap8 committed Dec 28, 2024
1 parent 8ce2ebd commit e8182c5
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--- a/Makefile 2024-12-27 20:38:15.878880229 -0600
+++ b/Makefile 2024-12-27 20:38:36.776225483 -0600
@@ -1,5 +1,5 @@
VERSION := 0.1.12
-TARGET := $(shell uname -r)
+TARGET ?= $(shell uname -r)
DKMS_ROOT_PATH := /usr/src/zenpower-$(VERSION)

KERNEL_MODULES := /lib/modules/$(TARGET)
1 change: 0 additions & 1 deletion sys-kernel/zenpower3/zenpower3-0.2.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ DESCRIPTION="Linux kernel driver for reading sensors of AMD Zen family CPUs"
HOMEPAGE="https://git.exozy.me/a/zenpower3"
SRC_URI="https://git.exozy.me/a/zenpower3/archive/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
Expand Down
38 changes: 38 additions & 0 deletions sys-kernel/zenpower3/zenpower3-9999.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2020-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit linux-mod-r1

DESCRIPTION="Linux kernel driver for reading sensors of AMD Zen family CPUs"
HOMEPAGE="https://git.exozy.me/a/zenpower3"
if [[ ${PV} -eq 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/ocerman/zenpower"
S="${WORKDIR}/${PN}-9999"
else
SRC_URI="https://git.exozy.me/a/zenpower3/archive/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}"
fi

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

CONFIG_CHECK="HWMON PCI AMD_NB"

PATCHES="${FILESDIR}/${P}-use-symlink-to-detect-kernel-version.patch"

src_compile() {
export TARGET=${KV_FULL}
local modlist=(
zenpower=misc:::all
)
linux-mod-r1_src_compile
}

src_install() {
linux-mod-r1_src_install
dodoc README.md
}

0 comments on commit e8182c5

Please sign in to comment.