aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGonçalo Duarte <gonegrier.duarte@gmail.com>2023-08-30 13:49:37 +0100
committerGonçalo Duarte <gonegrier.duarte@gmail.com>2023-08-30 13:52:49 +0100
commitec772c193ec4bc60304bb1fd39a65f8e8e0131d8 (patch)
tree8957b61504cdcab8f821b05510aed8777745663d /sys-firmware
parentR-packages.eclass: remove eutils (diff)
downloadguru-ec772c193ec4bc60304bb1fd39a65f8e8e0131d8.tar.gz
guru-ec772c193ec4bc60304bb1fd39a65f8e8e0131d8.tar.bz2
guru-ec772c193ec4bc60304bb1fd39a65f8e8e0131d8.zip
sys-firmware/lenovolegionlinux: update ebuild for stable version
Signed-off-by: Gonçalo Duarte <gonegrier.duarte@gmail.com>
Diffstat (limited to 'sys-firmware')
-rw-r--r--sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild24
1 files changed, 19 insertions, 5 deletions
diff --git a/sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild b/sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild
index 8eed68df1..b003b160a 100644
--- a/sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild
+++ b/sys-firmware/lenovolegionlinux/lenovolegionlinux-9999.ebuild
@@ -3,12 +3,20 @@
EAPI=8
+M_PN=LenovoLegionLinux
+
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..12} )
-inherit linux-mod-r1 git-r3 distutils-r1 systemd
+inherit linux-mod-r1 distutils-r1 systemd
-EGIT_REPO_URI="https://github.com/johnfanv2/LenovoLegionLinux.git"
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/johnfanv2/${M_PN}.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/johnfanv2/${M_PN}/archive/refs/tags/v${PV}.tar.gz"
+ KEYWORDS="~amd64"
+fi
DESCRIPTION="Lenovo Legion Linux kernel module"
HOMEPAGE="https://github.com/johnfanv2/LenovoLegionLinux"
@@ -41,10 +49,16 @@ src_compile() {
local modlist=(
legion-laptop=kernel/drivers/platform/x86:kernel_module:kernel_module:all
)
- KERNELVERSION=${KV_FULL} linux-mod-r1_src_compile
+ KERNELVERSION=${KV_FULL}
+ linux-mod-r1_src_compile
if use legion-tools; then
- #fix python package version
- sed -i "s/version = _VERSION/version = 1.0.0/g" "${WORKDIR}/${P}/python/legion_linux/setup.cfg"
+ if [[ ${PV} == "9999" ]] ; then
+ #fix python package version
+ sed -i "s/version = _VERSION/version = 9999/g" "${WORKDIR}/${P}/python/legion_linux/setup.cfg"
+ else
+ #fix python package version
+ sed -i "s/version = _VERSION/version = ${PV}/g" "${WORKDIR}/${P}/python/legion_linux/setup.cfg"
+ fi
#Define build dir (fix sandboxed)
cd "${WORKDIR}/${P}/python/legion_linux"
distutils-r1_src_compile --build-dir "${WORKDIR}/${P}/python/legion_linux/build"