commit 9c4d07d46b8890b7f0d7e47adf778e39a832b81a Author: Anish Bhatt Date: Sun Mar 8 12:16:29 2015 -0700 Add nvidia-340xx-dmks 340.76 package diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f7d96e72c93a --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = nvidia-340xx-dkms + pkgdesc = NVIDIA kernel module sources (DKMS) + pkgver = 340.76 + pkgrel = 1 + url = http://www.nvidia.com/ + install = nvidia-340xx-dkms.install + arch = i686 + arch = x86_64 + license = custom + depends = dkms + depends = nvidia-340xx-utils>=340.76 + optdepends = linux-headers: Build the module against Arch kernel + optdepends = linux-lts-headers: Build the module against LTS Arch kernel + provides = nvidia=340.76 + provides = nvidia-dkms + conflicts = nvidia-340xx + conflicts = nvidia-dkms + source = http://us.download.nvidia.com/XFree86/Linux-x86/340.76/NVIDIA-Linux-x86-340.76.run + source = http://us.download.nvidia.com/XFree86/Linux-x86_64/340.76/NVIDIA-Linux-x86_64-340.76-no-compat32.run + sha1sums = 1335af174324f5c752388110e65c3c51beea729b + sha1sums = 2df59750d9fdeed613e84379108fb2bec67afd14 + +pkgname = nvidia-340xx-dkms + diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..8413e270c14c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Anish Bhatt anish [at] gatech [dot] edu +# Contributor: JuanLu Guti +# Contributor: Maxime Gauduin +# Contributor: jarda-wien +# Contributor: Jason Melton +# Contributor: Atilla ÖNTAŞ + +pkgname=nvidia-340xx-dkms +pkgver=340.76 +pkgrel=1 +pkgdesc='NVIDIA kernel module sources (DKMS)' +arch=('i686' 'x86_64') +url='http://www.nvidia.com/' +license=('custom') +depends=('dkms' "nvidia-340xx-utils>=${pkgver}") +optdepends=('linux-headers: Build the module against Arch kernel' + 'linux-lts-headers: Build the module against LTS Arch kernel') +provides=("nvidia=${pkgver}" "nvidia-dkms") +conflicts=('nvidia-340xx' 'nvidia-dkms') +install="${pkgname}.install" +source=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run" + "http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run") +sha1sums=('1335af174324f5c752388110e65c3c51beea729b' + '2df59750d9fdeed613e84379108fb2bec67afd14') +[[ $CARCH == i686 ]] && _pkg=NVIDIA-Linux-x86-${pkgver} +[[ $CARCH == x86_64 ]] && _pkg=NVIDIA-Linux-x86_64-${pkgver}-no-compat32 + +prepare() { + if [[ -d ${_pkg} ]] ; then + rm -rf ${_pkg} + fi + + sh ${_pkg}.run --extract-only +} + +package() { + cd ${_pkg} + + install -dm 755 "${pkgdir}"/usr/{lib/modprobe.d,share/licenses,src} + cp -dr --no-preserve='ownership' kernel "${pkgdir}"/usr/src/nvidia-${pkgver} + +# Blacklist nouveau + echo "blacklist nouveau" > "${pkgdir}"/usr/lib/modprobe.d/nvidia.conf + +# UVM module + cat "${pkgdir}"/usr/src/nvidia-${pkgver}/uvm/dkms.conf.fragment >> "${pkgdir}"/usr/src/nvidia-${pkgver}/dkms.conf + +# License + ln -s nvidia "${pkgdir}"/usr/share/licenses/${pkgname} +} + +# vim: ts=2 sw=2 et: diff --git a/nvidia-340xx-dkms.install b/nvidia-340xx-dkms.install new file mode 100755 index 000000000000..69b49d841275 --- /dev/null +++ b/nvidia-340xx-dkms.install @@ -0,0 +1,15 @@ +post_install() { + dkms install -m nvidia/${1%-*} +} + +pre_upgrade() { + pre_remove ${2} +} + +post_upgrade() { + post_install ${1} +} + +pre_remove() { + dkms remove -m nvidia/${1%-*} --all +}