system/nvidia-legacy470-driver: Updated for version 470.182.03.

Signed-off-by: bedlam <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Lenard Spencer 2023-05-25 20:41:33 +01:00 committed by Willy Sudiarto Raharjo
parent 1da30f99ac
commit ce9e44a8a4
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 27 additions and 42 deletions

View file

@ -27,8 +27,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=nvidia-legacy470-driver
VERSION=${VERSION:-470.161.03}
BUILD=${BUILD:-4}
VERSION=${VERSION:-470.182.03}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -71,6 +71,14 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
exit 0
fi
if [ "${PERSISTENCED:-no}" = "yes" ]; then
if [ `getent group nvidia > /dev/null` -o `getent passwd nvidia > /dev/null` ]; then
echo "User and/or group nvidia do not exist!"
echo "Please create user and group nvidia and rerun this script."
exit 1
fi
fi
SRCNAM=NVIDIA-Linux-$TARGET-${VERSION}
# make a clean package directory tree
@ -113,7 +121,7 @@ cd $TMP/nvidia-installer-$VERSION
# Let's try to remove the conflicting files and GPU detection
patch -p0 < $CWD/skip_conflict-GPU_detect.patch
# Install the /etc/vulkan folder in $PKG instead of the root filesystem:
# Install various files in $PKG instead of the root filesystem:
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
@ -142,7 +150,6 @@ mv -f $PKG/usr/man/man1/nvidia-installer.1.gz $TMP/$SRCNAM
if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
COMP32="--install-compat32-libs --compat32-prefix=$PKG/usr"
mkdir -p $PKG/usr/lib
else
if [ ! "$ARCH" = "x86_64" ]; then
COMP32=""
@ -303,32 +310,10 @@ if [ "${PERSISTENCED:-no}" = "yes" ]; then
CFLAGS="$SLKCFLAGS" make
install -m 755 _out/Linux_$TARGET/nvidia-persistenced $PKG/usr/bin/
install -m 644 _out/Linux_$TARGET/nvidia-persistenced.1.gz $PKG/usr/man/man1/
if ! getent group nvidia > /dev/null 2>&1; then
echo "Creating the group nvidia:"
groupadd -g 365 nvidia || exit 1
fi
if ! getent passwd nvidia > /dev/null 2>&1; then
echo "Creating the user nvidia:"
useradd -u 365 -g 365 -c "Nvidia" -d /dev/null -s /bin/false nvidia || exit 1
fi
mkdir -p $PKG/var/run/nvidia-persistenced
chown nvidia:nvidia $PKG/var/run/nvidia-persistenced
mkdir -p $PKG/etc/rc.d
# install rc.nvidia-perstistenced:
mkdir -p $PKG/etc/rc.d $PKG/var/run/nvidia-persistenced
install -m 755 $CWD/rc.nvidia-persistenced $PKG/etc/rc.d/rc.nvidia-persistenced
sed -i "s|__USER__|nvidia|" $PKG/etc/rc.d/rc.nvidia-persistenced
cat <<EOF >> $PKG/install/doinst.sh
# Create group and user nvidia if they don't already exist
if ! getent group nvidia > /dev/null 2>&1; then
echo "Creating the group nvidia:"
groupadd -g 365 nvidia || exit 1
fi
if ! getent passwd nvidia > /dev/null 2>&1; then
echo "Creating the user nvidia:"
useradd -u 365 -g 365 -c "Nvidia" -d /dev/null -s /bin/false nvidia || exit 1
fi
EOF
chown nvidia:nvidia $PKG/var/run/nvidia-persistenced
fi
# Flag multlib as needed and build package.

View file

@ -1,20 +1,20 @@
PRGNAM="nvidia-legacy470-driver"
VERSION="470.161.03"
VERSION="470.182.03"
HOMEPAGE="http://www.nvidia.com"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/470.161.03/NVIDIA-Linux-x86_64-470.161.03.run \
https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-470.161.03.tar.bz2 \
https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-470.161.03.tar.bz2 \
https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-470.161.03.tar.bz2 \
https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-470.161.03.tar.bz2 \
https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-470.161.03.tar.bz2"
MD5SUM_x86_64="0652fff030ee29664ad728dd86e9f5d6 \
424d3a82c2c87177a7fb85cc44085243 \
2720db578fae049f4f98dcbb36b4ebe3 \
1af8e4e2128fcc39e2b11b318bb57fdf \
578e610ffe48258647775a1c003cc1a3 \
bd3acf9175dd698a9d8ce4b6b724b3a4"
DOWNLOAD_x86_64="https://download.nvidia.com/XFree86/Linux-x86_64/470.182.03/NVIDIA-Linux-x86_64-470.182.03.run \
https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-470.182.03.tar.bz2 \
https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-470.182.03.tar.bz2 \
https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-470.182.03.tar.bz2 \
https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-470.182.03.tar.bz2 \
https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-470.182.03.tar.bz2"
MD5SUM_x86_64="33e5a97d5f05fcf3474b69a95a2ade5d \
e8780b318bb414fde576bf327cf55866 \
e4be45785e69782bd1be37ec4ef47380 \
399abc484f88aec6b592f7541fbc5f1b \
cb5c72d3b521f74689dcb75628c2cea5 \
d1da91336b6797cfa47eb0183494dc6f"
REQUIRES="nvidia-legacy470-kernel"
MAINTAINER="Lenard Spencer"
EMAIL="lenardrspencer@gmail.com"