system/nvidia-legacy390-driver: script updates.

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

View file

@ -2,8 +2,8 @@ This is the proprietary binary video driver from NVidia for the X.Org
X-server. This package does not include the kernel module - it is a
part of the nvidia-legacy390-kernel package at SlackBuilds.org.
Installing the 32-bit compatibility libraries is available:
if desired, do:
Installing the 32-bit compatibility libraries in 64-bit multilib is
available. If desired, do:
COMPAT32="yes" ./nvidia-legacy390-driver.SlackBuild
This script now gives the option of installing the nvidia-persistenced
@ -22,6 +22,9 @@ properly)
/usr/bin/nvidia-modprobe -c 0 -u
NOTES:
It is now no longer required to remove the old driver before running
this script.
Since nvidia-legacy390-driver conflicts with some files of xorg, it's a
bit complex to install/uninstall the driver. However, installation of
the nvidia-legacy390-driver package backs up the conflicting files and

View file

@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nvidia-legacy390-driver
VERSION=${VERSION:-390.157}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -81,13 +81,6 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
exit 0
fi
# 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
@ -136,6 +129,9 @@ cd $TMP/nvidia-installer-$VERSION
# Install various files in $PKG instead of the root filesystem:
sed -i "s|/etc/vulkan|$PKG/etc/vulkan|" 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/\"|\"$PKG/usr/lib/\"|" files.c
sed -i "s|/usr/lib/nvidia|$PKG/usr/lib/nvidia|" misc.c
chown -R root:root .
find -L . \
@ -193,7 +189,7 @@ cd $TMP/$SRCNAM
# Remove a /var/lib/nvidia entry installed by nvidia-installer but
# no longer needed (caused the "failed to remove some directories"
# warning message):
rm -rf /var/lib/nvidia
rm -rf $PKG/var/lib/nvidia
# Compile utilites from source, replacing the precompiled versions
#