system/nvidia-driver: script updates.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Lenard Spencer 2023-03-01 12:32:45 +07:00 committed by Willy Sudiarto Raharjo
parent ff995e0a83
commit 3a6c771425
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 7 additions and 13 deletions

View file

@ -33,9 +33,8 @@ Notes:
This is easily done by installing xf86-video-nouveau-blacklist in
extra/xf86-video-nouveau-blacklist on the distibution DVD.
2. If nvidia-driver is already installed, the script will abort with
a prompt to remove the existing driver (it is not necessary to
remove the kernel module).
2. The nvidia-installer has been patched so it is now NO LONGER
NECESSARY to remove the old driver before running this script.
3. With Slackware 15.0, nvidia-switch has been dropped once and for
all as there are no longer any conflicts.

View file

@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nvidia-driver
VERSION=${VERSION:-525.89.02}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -65,14 +65,6 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
exit 0
fi
# There are a couple of unresolved issues with nvidia-installer, so we
# abort if an Nvidia driver is still installed:
if [ -x /usr/bin/nvidia-installer ]; then
echo -e "\n A previous Nvidia installation has been detected!"
echo -e " Please remove the installed driver and rerun this script.\n"
exit 1
fi
SRCNAM=NVIDIA-Linux-$TARGET-${VERSION}
# make a clean package directory tree
@ -82,7 +74,7 @@ mkdir -p $TMP $PKG $OUTPUT $PKG/install
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \
$PKG/etc/OpenCL/vendors/ $PKG/usr/{bin,doc,man/man1} \
$PKG/usr/share/{applications,nvidia,pixmaps,egl/egl_external_platform.d} \
$PKG/etc/X11/glvnd/egl_vendor.d $PKG/lib/firmware/nvidia $PKG/var/log
$PKG/etc/X11/glvnd/egl_vendor.d $PKG/var/log
if [ "$COMPAT32" = "yes" ]; then
mkdir -p $PKG/usr/lib/tls
@ -116,6 +108,9 @@ cd $TMP/nvidia-installer-$VERSION
sed -i "s|/etc/vulkan|$PKG/etc/vulkan|" files.c
sed -i "s|/lib/firmware/nvidia|$PKG/lib/firmware/nvidia|" files.c
sed -i "s|\"/etc\"|\"$PKG/etc\"|" nvidia-installer.h
sed -i "s|/var/lib/nvidia|$PKG/var/lib/nvidia|" backup.c
sed -i "s|/usr/lib/nvidia|$PKG/usr/lib/nvidia|" files.c
sed -i "s|/usr/lib/nvidia|$PKG/usr/lib/nvidia|" misc.c
chown -R root:root .
find -L . \