-
Notifications
You must be signed in to change notification settings - Fork 1
/
PKGBUILD
57 lines (45 loc) · 1.83 KB
/
PKGBUILD
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
# Maintainer: Bernhard Landauer <[email protected]>
# Maintainer: Philip Müller <philm[at]manjaro[dot]org>
# Archlinux maintainer : Thomas Baechler <[email protected]>
_linuxprefix=linux-xanmod-lts
pkgname="${_linuxprefix}-nvidia"
pkgdesc="NVIDIA drivers for linux"
pkgver=550.120
pkgrel=66601
arch=('x86_64')
url="http://www.nvidia.com/"
license=('custom')
groups=("${_linuxprefix}-extramodules")
depends=("${_linuxprefix}" "nvidia-utils=${pkgver}")
makedepends=("${_linuxprefix}-headers")
provides=("nvidia=${pkgver}" 'NVIDIA-MODULE')
options=(!strip)
_durl="https://us.download.nvidia.com/XFree86/Linux-x86"
source=("${_durl}_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run"
'make-modeset-fbdev-default.patch')
sha256sums=(SKIP
'1850b14877a87083d1800d0e75714347fc8049a0f4ff1e354769f3058e372e1a')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
prepare() {
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
# Enable modeset and fbdev as default
# This avoids various issue, when Simplefb is used
# https://gitlab.archlinux.org/archlinux/packaging/packages/nvidia-utils/-/issues/14
# https://github.com/rpmfusion/nvidia-kmod/blob/master/make_modeset_default.patch
patch -Np1 < "$srcdir"/make-modeset-fbdev-default.patch -d "${srcdir}/${_pkg}/kernel"
}
build() {
_kernver="$(cat /usr/src/${_linuxprefix}/version)"
_kernver="$(cat /usr/src/${_linuxprefix}/version)"
cd "${_pkg}"
make -C kernel SYSSRC=/usr/lib/modules/"${_kernver}/build" module
}
package() {
_kernver="$(cat /usr/src/${_linuxprefix}/version)"
cd "${_pkg}"
install -Dm 644 kernel/*.ko -t "${pkgdir}/usr/lib/modules/${_kernver}/extramodules/"
# compress each module individually
find "${pkgdir}" -name '*.ko' -exec xz -T1 {} +
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}