sys-power/nvidia-exec: add 0.2.1, drop 0.1.2-r1

* also add udev logic for future release

Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
This commit is contained in:
Gonçalo Negrier Duarte
2024-05-21 16:58:06 +01:00
parent d0a9f46a38
commit bc6d970a95
3 changed files with 29 additions and 9 deletions

View File

@@ -6,7 +6,7 @@ EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..12} )
inherit systemd
inherit systemd # udev future use
if [[ ${PV} == 9999 ]]; then
inherit git-r3
@@ -19,7 +19,7 @@ fi
DESCRIPTION="GPU switching without login out for Nvidia Optimus laptops under Linux"
HOMEPAGE="https://github.com/pedro00dk/nvidia-exec"
LICENSE="GPL-3"
LICENSE="GPL"
SLOT="0"
RDEPEND="
@@ -29,15 +29,25 @@ RDEPEND="
x11-drivers/nvidia-drivers
"
#src_configure() {
# econf --with-rulesdir="$(get_udevdir)"/rules.d
#}
src_install() {
dobin "${WORKDIR}/${P}/nvx"
newbin "${WORKDIR}/${P}/nvx.py" nvx
systemd_dounit "${WORKDIR}/${P}/nvx.service"
insinto /usr/lib/modprobe.d
newins "${WORKDIR}/${P}/modprobe.conf" nvx.conf
newins "${WORKDIR}/${P}/nvx-modprobe.conf" nvx.conf
#udev_newrules "${WORKDIR}/${P}/nvx-udev.rules" 99-nvx
}
pkg_postinst() {
#udev_reload
ewarn "Don't forget to enable the nvx service:\nsystemctl enable --now nvx\n"
ewarn "\nThe nvx.service prevents nvidia modules from loading and turn off the graphics card during boot.\n"
ewarn "It is not necessary to handle files, configurations, PCI buses, etc, all that is done automatically.\n"
}
#pkg_postrm() {
#udev_reload
#}