summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD48
2 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..63cf884410d3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = nvhda-dkms-git
+ pkgdesc = Kernel driver to dynamically enable/disable NVIDIA HDMI audio output in optimus laptops
+ pkgver = r10.3e13d2e
+ pkgrel = 1
+ url = https://github.com/hhfeuer/nvhda.git
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = cmake
+ makedepends = gcc
+ makedepends = nvidia
+ makedepends = linux-headers
+ source = git+https://github.com/hhfeuer/nvhda.git
+ md5sums = SKIP
+
+pkgname = nvhda-dkms-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4d7bd947a4c4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Fabio Heday <fheday@gmail.com>
+
+pkgname=nvhda-dkms-git
+_pkgbase=nvhda
+pkgver=r10.3e13d2e
+pkgrel=1
+pkgdesc="Kernel driver to dynamically enable/disable NVIDIA HDMI audio output in optimus laptops"
+arch=(i686 x86_64)
+url="https://github.com/hhfeuer/nvhda.git"
+license=(GPL)
+makedepends=(cmake gcc nvidia linux-headers)
+source=("git+https://github.com/hhfeuer/nvhda.git")
+md5sums=('SKIP')
+
+pkgver() {
+ cd nvhda
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd nvhda
+ make
+}
+
+package() {
+ _KVERSION=`uname -r`
+ cd nvhda
+ mkdir -p "${pkgdir}/usr/lib/modules/$_KVERSION/misc/nvhda/"
+ install -m644 nvhda.ko "${pkgdir}/usr/lib/modules/$_KVERSION/misc/nvhda/"
+
+ # Copy dkms.conf
+ install -Dm644 dkms/dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
+ # Copy dkms.conf
+ install -Dm644 dkms/dkms.conf "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
+
+ # Set name and version
+ sed -e "s/#MODULE_VERSION#/${pkgver}/" \
+ -i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf
+
+ # Copy sources (including Makefile)
+ cp Makefile nvhda.c "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/
+
+ #install systemd units
+ install -Dm644 "scripts/nvhda-resume.service" "${pkgdir}/usr/lib/systemd/system/nvhda-resume.service"
+ install -Dm644 "scripts/nvhda-suspend.service" "${pkgdir}/usr/lib/systemd/system/nvhda-suspend.service"
+
+}
+