summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Sorcinelli2018-11-28 18:28:13 +0000
committerMichele Sorcinelli2018-11-28 18:32:45 +0000
commita40d2b24a8f2ffd96fa776db425914067e038dcf (patch)
tree007f5e820b1c6585188da04457ecadd89a4f526c
downloadaur-a40d2b24a8f2ffd96fa776db425914067e038dcf.tar.gz
Initial version
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD40
-rw-r--r--nvidia-xrun-pm.install11
3 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6a32866bc628
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = nvidia-xrun-pm
+ pkgdesc = Alternative version of nvidia-xrun, that relies on kernel PM instead of bbswitch
+ pkgver = 20181128.293761d
+ pkgrel = 1
+ url = https://github.com/michelesr/nvidia-xrun-pm
+ install = nvidia-xrun-pm.install
+ arch = x86_64
+ license = GPL
+ depends = xorg-server
+ depends = xorg-xinit
+ depends = xorg-xrandr
+ depends = nvidia
+ depends = mesa-libgl
+ provides = nvidia-xrun
+ conflicts = nvidia-xrun
+ source = git://github.com/michelesr/nvidia-xrun-pm
+ md5sums = SKIP
+
+pkgname = nvidia-xrun-pm
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..02066adc5fdb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Michele Sorcinelli <michelesr@autistici.org>
+pkgname=nvidia-xrun-pm
+pkgver=20181128.db23415
+pkgrel=1
+epoch=
+pkgdesc='Alternative version of nvidia-xrun, that relies on kernel PM instead of bbswitch'
+arch=('x86_64')
+url='https://github.com/michelesr/nvidia-xrun-pm'
+license=('GPL')
+groups=()
+depends=('xorg-server' 'xorg-xinit' 'xorg-xrandr' 'nvidia' 'mesa-libgl')
+makedepends=()
+checkdepends=()
+optdepends=()
+provides=('nvidia-xrun')
+conflicts=('nvidia-xrun')
+replaces=()
+backup=()
+options=()
+install=$pkgname.install
+changelog=
+source=("git://github.com/michelesr/$pkgname")
+noextract=()
+md5sums=('SKIP')
+validpgpkeys=()
+
+pkgver () {
+ cd ${pkgname}
+ git log -1 --format='%cd.%h' --date=short | tr -d -
+}
+
+package() {
+ cd ${pkgname}
+ install -Dm 644 nvidia-xorg.conf "$pkgdir/etc/X11/nvidia-xorg.conf"
+ install -Dm 644 nvidia-xinitrc "$pkgdir/etc/X11/xinit/nvidia-xinitrc"
+ install -Dm 755 nvidia-xrun "$pkgdir/usr/bin/nvidia-xrun"
+ install -Dm 644 nvidia-xrun-pm.service "$pkgdir/etc/systemd/system/nvidia-xrun-pm.service"
+ install -dm 555 "$pkgdir/etc/X11/xinit/nvidia-xinitrc.d"
+ install -dm 555 "$pkgdir/etc/X11/nvidia-xorg.conf.d"
+}
diff --git a/nvidia-xrun-pm.install b/nvidia-xrun-pm.install
new file mode 100644
index 000000000000..eb3a6b0b9b85
--- /dev/null
+++ b/nvidia-xrun-pm.install
@@ -0,0 +1,11 @@
+post_install() {
+ cat <<EOF
+In order to automatically disable the NVIDIA graphic card at boot:
+ - blacklist the "nvidia" module in /etc/modprobe.d/
+ - enable the "nvidia-xrun-pm" systemd service
+EOF
+}
+
+post_upgrade() {
+ post_install $1
+}