summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDet2018-08-18 19:42:02 +0300
committerDet2018-08-18 19:42:02 +0300
commitaf4fbca42b435692599b8dc26e3495d6af9c9dd1 (patch)
tree77db37a6c46c3ab6e9146e41900b4061aa121b48 /PKGBUILD
parent7c603630d05f3bd8a0827a5f4d78866d66d13489 (diff)
downloadaur-af4fbca42b435692599b8dc26e3495d6af9c9dd1.tar.gz
Fix build for newer kernels
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD9
1 files changed, 3 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1f5045addc0c..612c4d595a67 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,6 +18,7 @@ install=$pkgname.install
_pkg="NVIDIA-Linux-x86_64-$pkgver-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/$pkgver/$_pkg.run")
md5sums=('d3556202869f629e0c251b59ad4b9bee')
+_extramodules=extramodules-ARCH
# Patch
#source+=('linux-4.11.patch')
@@ -42,7 +43,7 @@ prepare() {
cd $_pkg
# Kernel version (e.g. 4.15.0-1-ARCH)
- _kernel=$(cat /usr/lib/modules/extramodules-*-ARCH/version)
+ _kernel=$(cat /usr/lib/modules/$_extramodules/version)
# Loop patches (linux-4.15.patch, lol.patch, ...)
for _p in $(printf -- '%s\n' ${source[@]} | grep .patch); do # https://stackoverflow.com/a/21058239/1821548
@@ -61,7 +62,7 @@ prepare() {
build() {
# Version of 'linux'
- _kernel=$(cat /usr/lib/modules/extramodules-*-ARCH/version)
+ _kernel=$(cat /usr/lib/modules/$_extramodules/version)
# Build module
cd $_pkg/kernel
@@ -70,10 +71,6 @@ build() {
}
package() {
- # Version of 'linux'
- _major=$(pacman -Q linux | grep -Po "\d+\.\d+")
- _extramodules=extramodules-$_major-ARCH
-
# Nvidia kernel module; provides low-level access to your NVIDIA hardware for the other components. Generally
# loaded into the kernel when the X server is started, to be used by the X driver and OpenGL. Consists of two
# pieces: the binary-only core, and a kernel interface that must be compiled specifically for your kernel version,