mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-20 12:33:40 -04:00
sys-power/nvidia-exec: fix ebuild
* the packages only requires to copy files * no need for distutils-r1 Closes: https://bugs.gentoo.org/932603 Signed-off-by: Gonçalo Negrier Duarte <gonegrier.duarte@gmail.com>
This commit is contained in:
42
sys-power/nvidia-exec/nvidia-exec-0.2.7-r1.ebuild
Normal file
42
sys-power/nvidia-exec/nvidia-exec-0.2.7-r1.ebuild
Normal file
@@ -0,0 +1,42 @@
|
||||
# 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 ~x86"
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user