aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/nvidia-kernel/nvidia-kernel.SlackBuild28
1 files changed, 14 insertions, 14 deletions
diff --git a/system/nvidia-kernel/nvidia-kernel.SlackBuild b/system/nvidia-kernel/nvidia-kernel.SlackBuild
index 99e91a7e9620..c3e18b93c552 100644
--- a/system/nvidia-kernel/nvidia-kernel.SlackBuild
+++ b/system/nvidia-kernel/nvidia-kernel.SlackBuild
@@ -24,15 +24,25 @@
# Thanks to Robby Workman for suggestions to improve this script.
+PRGNAM=nvidia-kernel
+VERSION=195.36.15
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
KERNEL=${KERNEL:-$(uname -r)}
KERNELPATH=${KERNELPATH:-/lib/modules/${KERNEL}/build}
-VERSION=195.36.15
-PRGNAM=nvidia-kernel
PKGVER=${VERSION}_$(echo $KERNEL | tr - _)
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
if [ "$ARCH" = "i486" ]; then
TARGET="x86"
@@ -46,16 +56,6 @@ unset ARCH
SRCNAM=NVIDIA-Linux-$TARGET-$VERSION-pkg0
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) ARCH=$( uname -m ) ;;
- esac
-fi
-
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=${PKG:-$TMP/package-$PRGNAM}