mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-20 20:43:09 -04:00
sys-power/nvidia-exec: drop 0.2.7, add 0.3.2, initial openrc support
Taking over maintainership. Signed-off-by: Joe Kappus <joe@wt.gd>
This commit is contained in:
@@ -1 +1 @@
|
||||
DIST nvidia-exec-0.2.7.tar.gz 19024 BLAKE2B d7efb69bdadde9a60482e79c9d6e6595d4b89e27635d78d4f63976b328a8d2361a1cd4fb18cfc1ac02990a1c460fc83b778258b49f913ef10b5c1b0fe0c8aba5 SHA512 a7d1f4bca5b0e103952f7e06babf85896f68a04357dd0a8c0dc551d09ca3045d382cd5412900d832ba21373c0cc519614575668e58334bebe8032b1fb3fa803d
|
||||
DIST nvidia-exec-0.3.2.tar.gz 18587 BLAKE2B bfcdbb491a2ff886e0f6f341227545effcc5255c5f31b697e1c8d52addd4e0ef273a6b8820d0b1df4c0605b08570b15ec5f2a4f3b5fba196f156a33ee6a3b3b7 SHA512 41aa66f1d49e2a358886e4a7ab911621fd3f82f916d5f1f3e24ed2bfdc916736958370a651f14a6deddd481e37b8c895c37dffbddbd61bbc2275095c9ece784e
|
||||
|
||||
18
sys-power/nvidia-exec/files/nvx.initd
Normal file
18
sys-power/nvidia-exec/files/nvx.initd
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="nvidia-exec daemon for Nvidia Optimus GPU switching"
|
||||
|
||||
command="/usr/bin/nvx"
|
||||
command_args="daemon"
|
||||
command_background="yes"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
|
||||
output_log="/var/log/nvx.log"
|
||||
error_log="/var/log/nvx.log"
|
||||
|
||||
depend() {
|
||||
after udev
|
||||
before xdm display-manager
|
||||
}
|
||||
@@ -2,11 +2,10 @@
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>gonegrier.duarte@gmail.com</email>
|
||||
<name>Gonçalo Negrier Duarte</name>
|
||||
<email>joe@wt.gd</email>
|
||||
<name>Joe Kappus</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">pedro00dk/nvidia-exec</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
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"
|
||||
KEYWORDS="~amd64"
|
||||
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="
|
||||
dev-lang/python
|
||||
sys-apps/lshw
|
||||
sys-process/lsof
|
||||
x11-drivers/nvidia-drivers
|
||||
"
|
||||
|
||||
src_install() {
|
||||
newbin "${WORKDIR}/${P}/nvx.py" nvx
|
||||
systemd_dounit "${WORKDIR}/${P}/nvx.service"
|
||||
insinto /usr/lib/modprobe.d
|
||||
newins "${WORKDIR}/${P}/nvx-modprobe.conf" nvx.conf
|
||||
insinto /etc/
|
||||
newins "${WORKDIR}/${P}/nvx-options.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"
|
||||
}
|
||||
46
sys-power/nvidia-exec/nvidia-exec-0.3.2.ebuild
Normal file
46
sys-power/nvidia-exec/nvidia-exec-0.3.2.ebuild
Normal file
@@ -0,0 +1,46 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
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"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
DESCRIPTION="GPU switching without log out for Nvidia Optimus laptops under Linux"
|
||||
HOMEPAGE="https://github.com/pedro00dk/nvidia-exec"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
|
||||
RDEPEND="
|
||||
dev-lang/python
|
||||
sys-apps/lshw
|
||||
sys-process/lsof
|
||||
x11-drivers/nvidia-drivers
|
||||
"
|
||||
|
||||
src_install() {
|
||||
newbin "${S}/nvx.py" nvx
|
||||
systemd_dounit "${S}/nvx.service"
|
||||
newinitd "${FILESDIR}/nvx.initd" nvx
|
||||
insinto /usr/lib/modprobe.d
|
||||
newins "${S}/nvx-modprobe.conf" nvx.conf
|
||||
insinto /etc/
|
||||
newins "${S}/nvx-options.conf" nvx.conf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "To enable nvx at boot:"
|
||||
elog " OpenRC: rc-update add nvx default"
|
||||
elog " systemd: systemctl enable --now nvx"
|
||||
elog ""
|
||||
elog "The nvx service prevents nvidia modules from loading and turns off the graphics card during boot."
|
||||
elog "It is not necessary to handle files, configurations, PCI buses, etc, all that is done automatically."
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@@ -13,7 +13,7 @@ else
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
DESCRIPTION="GPU switching without login out for Nvidia Optimus laptops under Linux"
|
||||
DESCRIPTION="GPU switching without log out for Nvidia Optimus laptops under Linux"
|
||||
HOMEPAGE="https://github.com/pedro00dk/nvidia-exec"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
@@ -27,16 +27,20 @@ RDEPEND="
|
||||
"
|
||||
|
||||
src_install() {
|
||||
newbin "${WORKDIR}/${P}/nvx.py" nvx
|
||||
systemd_dounit "${WORKDIR}/${P}/nvx.service"
|
||||
newbin "${S}/nvx.py" nvx
|
||||
systemd_dounit "${S}/nvx.service"
|
||||
newinitd "${FILESDIR}/nvx.initd" nvx
|
||||
insinto /usr/lib/modprobe.d
|
||||
newins "${WORKDIR}/${P}/nvx-modprobe.conf" nvx.conf
|
||||
newins "${S}/nvx-modprobe.conf" nvx.conf
|
||||
insinto /etc/
|
||||
newins "${WORKDIR}/${P}/nvx-options.conf" nvx.conf
|
||||
newins "${S}/nvx-options.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"
|
||||
elog "To enable nvx at boot:"
|
||||
elog " OpenRC: rc-update add nvx default"
|
||||
elog " systemd: systemctl enable --now nvx"
|
||||
elog ""
|
||||
elog "The nvx service prevents nvidia modules from loading and turns off the graphics card during boot."
|
||||
elog "It is not necessary to handle files, configurations, PCI buses, etc, all that is done automatically."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user