diff options
author | Fabio Hedayioglu | 2018-09-21 14:31:21 +0100 |
---|---|---|
committer | Fabio Hedayioglu | 2018-09-21 14:31:21 +0100 |
commit | 668feaa631ebd10856d384c79929ecdf3ceaa204 (patch) | |
tree | 98604508c25e6432282cd01d8e9bd976641314fa /PKGBUILD | |
download | aur-668feaa631ebd10856d384c79929ecdf3ceaa204.tar.gz |
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 48 |
1 files changed, 48 insertions, 0 deletions
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" + +} + |