blob: 8c6be12c18e3449d7e2dedf7e9b208edca2c9ca2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Maintainer: graysky <graysky AT archlnux.us>
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contrubutor: Thomas Baechler <thomas@archlinux.org>
pkgname=nvidia-ck
pkgver=381.22
pkgrel=5
epoch=1
_extramodules=extramodules-4.11-ck
_pkgdesc="NVIDIA drivers for linux-ck."
pkgdesc="$_pkgdesc"
arch=('i686' 'x86_64')
url="http://www.nvidia.com/"
depends=('linux-ck>=4.11' 'linux-ck<4.12' 'libgl' "nvidia-utils=${pkgver}")
makedepends=('linux-ck-headers>=4.11' 'linux-ck-headers<4.12' 'nvidia-libgl')
conflicts=('nvidia-340xx-ck' 'nvidia-304xx-ck')
#groups=('ck-generic')
#replaces=()
license=('custom')
install=readme.install
options=(!strip)
source_i686=("http://us.download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run")
source_x86_64=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
sha256sums_i686=('7b7dd6ee1c871dc5367fc207bba65077c3820a683decbfe6126fc70c0d1b9d08')
sha256sums_x86_64=('c2468130af124bfe748bdf2bc4c08952a81b35d2bdb87d1217717e6a576217e8')
[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
prepare() {
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
}
build() {
_kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
}
package() {
install -Dm644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-modeset.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-modeset.ko"
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-drm.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-drm.ko"
if [[ "$CARCH" = "x86_64" ]]; then
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia-uvm.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
fi
gzip -9 "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
install -dm755 "${pkgdir}/usr/lib/modprobe.d"
echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia-ck.conf"
}
# vim:set ts=2 sw=2 et:
|