diff options
author | Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com> | 2024-02-14 16:45:01 +0000 |
---|---|---|
committer | Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com> | 2024-02-14 16:46:35 +0000 |
commit | 7cbf93cf509ba4805fe3f12bea1089f758979d14 (patch) | |
tree | 697aa041ca7a9cfdda0f610d1452111ac13738e3 /sys-power | |
parent | net-im/teams-for-linux: add 1.4.11 (diff) | |
download | guru-7cbf93cf509ba4805fe3f12bea1089f758979d14.tar.gz guru-7cbf93cf509ba4805fe3f12bea1089f758979d14.tar.bz2 guru-7cbf93cf509ba4805fe3f12bea1089f758979d14.zip |
sys-power/nvidia-exec: Update nvidia-exec ebuild to changes upstream
Closes: https://bugs.gentoo.org/924329
Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/nvidia-exec/nvidia-exec-0.1.2-r1.ebuild | 44 | ||||
-rw-r--r-- | sys-power/nvidia-exec/nvidia-exec-0.1.2.ebuild | 33 | ||||
-rw-r--r-- | sys-power/nvidia-exec/nvidia-exec-9999.ebuild | 27 |
3 files changed, 64 insertions, 40 deletions
diff --git a/sys-power/nvidia-exec/nvidia-exec-0.1.2-r1.ebuild b/sys-power/nvidia-exec/nvidia-exec-0.1.2-r1.ebuild new file mode 100644 index 000000000..d3b619ba1 --- /dev/null +++ b/sys-power/nvidia-exec/nvidia-exec-0.1.2-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..12} ) + +inherit systemd + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/pedro00dk/nvidia-exec.git" +else + SRC_URI="https://github.com/pedro00dk/nvidia-exec/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +DESCRIPTION="GPU switching without login out for Nvidia Optimus laptops under Linux" +HOMEPAGE="https://github.com/pedro00dk/nvidia-exec" + +LICENSE="GPL-3" +SLOT="0" + +RDEPEND=" + app-misc/jq + sys-apps/lshw + sys-process/lsof + x11-drivers/nvidia-drivers +" + +KEYWORDS="~amd64 ~x86" + +src_install() { + dobin "${WORKDIR}/${P}/nvx" + systemd_dounit "${WORKDIR}/${P}/nvx.service" + insinto /usr/lib/modprobe.d + newins "${WORKDIR}/${P}/modprobe.conf" nvx.conf +} + +pkg_postinst() { + 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" +} diff --git a/sys-power/nvidia-exec/nvidia-exec-0.1.2.ebuild b/sys-power/nvidia-exec/nvidia-exec-0.1.2.ebuild deleted file mode 100644 index 34cdc38b9..000000000 --- a/sys-power/nvidia-exec/nvidia-exec-0.1.2.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{9..12} ) - -inherit systemd - -SRC_URI="https://github.com/pedro00dk/nvidia-exec/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" - -DESCRIPTION="Lenovo Legion Linux kernel module" -HOMEPAGE="https://github.com/pedro00dk/nvidia-exec" - -LICENSE="GPL-3" -SLOT="0" - -KEYWORDS="~amd64 ~x86" - -src_install() { - dobin "${WORKDIR}/${P}/nvx" - insinto /usr/lib/systemd/system-sleep - doins "${WORKDIR}/${P}/nvx-suspend-restore" - systemd_dounit "${WORKDIR}/${P}/nvx.service" - insinto /usr/lib/modprobe.d - newins "${WORKDIR}/${P}/modprobe.conf" nvx.conf -} - -pkg_postinst() { - ewarn "Don't forget to reload dbus to enable \"nvx\" service, \ -by runnning:\n \`systemctl daemon-reload && systemctl enable --now nvx\`\n" -} diff --git a/sys-power/nvidia-exec/nvidia-exec-9999.ebuild b/sys-power/nvidia-exec/nvidia-exec-9999.ebuild index 7b9751ab9..d3b619ba1 100644 --- a/sys-power/nvidia-exec/nvidia-exec-9999.ebuild +++ b/sys-power/nvidia-exec/nvidia-exec-9999.ebuild @@ -6,26 +6,39 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{9..12} ) -inherit git-r3 systemd +inherit systemd -EGIT_REPO_URI="https://github.com/pedro00dk/nvidia-exec.git" +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/pedro00dk/nvidia-exec.git" +else + SRC_URI="https://github.com/pedro00dk/nvidia-exec/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +fi -DESCRIPTION="Lenovo Legion Linux kernel module" +DESCRIPTION="GPU switching without login out for Nvidia Optimus laptops under Linux" HOMEPAGE="https://github.com/pedro00dk/nvidia-exec" LICENSE="GPL-3" SLOT="0" +RDEPEND=" + app-misc/jq + sys-apps/lshw + sys-process/lsof + x11-drivers/nvidia-drivers +" + +KEYWORDS="~amd64 ~x86" + src_install() { dobin "${WORKDIR}/${P}/nvx" - insinto /usr/lib/systemd/system-sleep - doins "${WORKDIR}/${P}/nvx-suspend-restore" systemd_dounit "${WORKDIR}/${P}/nvx.service" insinto /usr/lib/modprobe.d newins "${WORKDIR}/${P}/modprobe.conf" nvx.conf } pkg_postinst() { - ewarn "Don't forget to reload dbus to enable \"nvx\" service, \ -by runnning:\n \`systemctl daemon-reload && systemctl enable --now nvx\`\n" + 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" } |