system/nvidia-legacy470-driver: script updates.

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

View file

@ -33,9 +33,9 @@ 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. It is now no longer required 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-legacy470-driver
VERSION=${VERSION:-470.161.03}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -73,14 +73,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
@ -90,7 +82,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/etc/X11/glvnd/egl_vendor.d $PKG/var/log
if [ "$COMPAT32" = "yes" ]; then
mkdir -p $PKG/usr/lib/tls
@ -127,6 +119,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 . \
@ -186,7 +181,7 @@ fi
# remove a pair of folders installed and used by nvidia-installer but
# no longer needed (caused the "failed to remove some directories"
# warning message):
rm -rf /{var,usr}/lib/nvidia || true
rm -rf $PKG/{var,usr}/lib/nvidia || true
# Compile utilites from source, replacing the precompiled versions
#
@ -328,4 +323,4 @@ fi
# Flag multlib as needed and build package.
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION$MULTI-$ARCH-$BUILD$TAG.$PKGTYPE
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE