mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
system/nvidia-driver: Updated for version 319.17.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
parent
76741d75a7
commit
aa006fb2dc
4 changed files with 125 additions and 71 deletions
|
@ -7,7 +7,9 @@ Installing the 32-bit compatibility libraries is available: if desired, do:
|
|||
|
||||
Several useful utilities are included: nvidia-xsettings, nvidia-smi, and
|
||||
nvidia-settings. Please refer to the Nvidia documentation and man pages
|
||||
for details and usage.
|
||||
for details and usage. Two optional utilities, nvidia-modprobe and
|
||||
nvidia-persistenced, can be installed with:
|
||||
OPTAPPS="yes" ./nvidia-driver.SlackBuild
|
||||
|
||||
Since this nvidia-driver conflicts with some files of xorg, it's a bit
|
||||
complex to install/uninstall the driver. However, installation of the
|
||||
|
@ -17,7 +19,8 @@ nvidia-specific files into place.
|
|||
Included is a script called nvidia-switch, which is used to switch from the
|
||||
xorg driver to the nvidia driver, but it will not edit xorg.conf for you;
|
||||
you have to do that manually. The nvidia-switch script is installed to
|
||||
/usr/sbin. NOTE: nvidia-switch is not supported in a COMPAT32 environment.
|
||||
/usr/sbin. NOTE: Although nvidia-switch is aware of a COMPAT32 environment,
|
||||
its use therein is not supported.
|
||||
|
||||
Usage of nvidia-switch:
|
||||
nvidia-switch --install <--> install the nvidia files and save the
|
||||
|
@ -32,9 +35,6 @@ Before uninstalling or upgrading this package, it is important that you execute
|
|||
and remove all links created by nvidia-switch during installation. If you forget
|
||||
to do this, you'll have to do the switch manually, or xorg won't work on next startup.
|
||||
Here are the affected files:
|
||||
/usr/lib/libGL.so.1.2
|
||||
/usr/lib/xorg/modules/extensions/{libglx.so libglx.la}
|
||||
or, for Slackware64,
|
||||
/usr/lib64/libGL.so.1.2
|
||||
/usr/lib64/xorg/modules/extensions/{libglx.so libglx.la}
|
||||
/usr/lib[64]/libGL.so.1.2
|
||||
/usr/lib[64]/xorg/modules/extensions/{libglx.so libglx.la}
|
||||
Simply remove the dead nvidia symlinks and rename the saved '-xorg' appended files.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Slackware build script for nvidia-driver
|
||||
|
||||
# Copyright 2007-2011 Heinz Wiesinger, Amsterdam, The Netherlands
|
||||
# Copyright 2011-2012 Edward W. koenig, Vancouver, WA, USA
|
||||
# Copyright 2011-2013 Edward W. Koenig, Vancouver, WA, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -39,13 +39,15 @@
|
|||
# 2.1 25-AUG-2012 new version -Long Lived Branch, fixed symlinks (per Das email)
|
||||
# 2.2 22-NOV-2012 new version -Long Lived Branch. Updates: libs, apps
|
||||
# 2.3 15-FEB-2013 new version -Long Lived Branch.
|
||||
# 2.4 19-MAY-2013 new version -Long Lived Branch.
|
||||
|
||||
PRGNAM=nvidia-driver
|
||||
VERSION=310.32
|
||||
MVERS=310
|
||||
VERSION=319.17
|
||||
MVERS=319
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
CPROXY=${CPROXY:-no}
|
||||
OPTAPPS=${OPTAPPS:-no}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
|
@ -92,6 +94,10 @@ rm -rf nvidia-settings-$VERSION
|
|||
tar xvf $CWD/nvidia-settings-$VERSION.tar.bz2
|
||||
rm -rf nvidia-xconfig-$VERSION
|
||||
tar xvf $CWD/nvidia-xconfig-$VERSION.tar.bz2
|
||||
rm -rf nvidia-modprobe-$VERSION.tar.bz2
|
||||
tar xvf $CWD/nvidia-modprobe-$VERSION.tar.bz2
|
||||
rm -rf nvidia-persistenced-$VERSION.tar.bz2
|
||||
tar xvf $CWD/nvidia-persistenced-$VERSION.tar.bz2
|
||||
rm -rf $SRCNAM
|
||||
sh $CWD/$SRCNAM.run --extract-only
|
||||
cd $SRCNAM
|
||||
|
@ -124,23 +130,22 @@ install -m 755 libnvidia-wfb.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/
|
|||
|
||||
# Don't forget separate libvdpau package on SBo.
|
||||
install -m 755 libvdpau_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
install -m 755 libvdpau_trace.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
|
||||
|
||||
install -m 644 nvidia.icd $PKG/etc/OpenCL/vendors/
|
||||
|
||||
|
||||
# Add optional 32-bit support
|
||||
if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
|
||||
mkdir -p $PKG/usr/lib/tls
|
||||
|
||||
install -m 755 32/libcuda.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/libGL.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/libGL.so.$VERSION $PKG/usr/lib/libGL.so.$VERSION-nvidia
|
||||
install -m 755 32/libGL.la $PKG/usr/lib/
|
||||
install -m 755 32/libnvcuvid.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/libnvidia-compiler.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/libnvidia-encode.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/libnvidia-glcore.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/libnvidia-opencl.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/libcuda.so.$VERSION $PKG/usr/lib/
|
||||
install -m 755 32/tls/libnvidia-tls.so.$VERSION $PKG/usr/lib/tls/
|
||||
install -m 755 32/libOpenCL.so.1.0.0 $PKG/usr/lib/
|
||||
install -m 755 32/libvdpau_nvidia.so.$VERSION $PKG/usr/lib/
|
||||
|
@ -164,8 +169,6 @@ cd -
|
|||
# symlinks for optional 32-bit support
|
||||
if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
|
||||
cd $PKG/usr/lib
|
||||
ln -sf libGL.so.$VERSION libGL.so.$MVERS
|
||||
ln -sf libGL.so.$MVERS libGL.so
|
||||
ln -sf libcuda.so.$VERSION libcuda.so.$MVERS
|
||||
ln -sf libcuda.so.$MVERS libcuda.so
|
||||
ln -sf libOpenCL.so.1.0.0 libOpenCL.so.1.0
|
||||
|
@ -188,19 +191,18 @@ install -m 644 nvidia-smi.1.gz $PKG/usr/man/man1/
|
|||
# New CUDA proxy server for 64-bit Linux only, and requires a device that supports
|
||||
# Unified Virtual Address (UVA) and CUDA 4.0+.
|
||||
if [ "$ARCH" = "x86_64" -a "${CPROXY}" = "yes" ]; then
|
||||
install -m 755 nvidia-cuda-proxy-control $PKG/usr/bin/
|
||||
install -m 755 nvidia-cuda-proxy-server $PKG/usr/bin/
|
||||
install -m 644 nvidia-cuda-proxy-control.1.gz $PKG/usr/man/man1/
|
||||
install -m 755 nvidia-cuda-mps-control $PKG/usr/bin/
|
||||
install -m 755 nvidia-cuda-mps-server $PKG/usr/bin/
|
||||
install -m 644 nvidia-cuda-mps-control.1.gz $PKG/usr/man/man1/
|
||||
fi
|
||||
|
||||
# Compiling nvidia-installer from source
|
||||
# Not really needed for this SBo package
|
||||
cd $TMP/nvidia-installer-$VERSION
|
||||
chown -R root:root .
|
||||
chmod -R u+w,go+r-w,a-s .
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
LDFLAGS="-lz" \
|
||||
make
|
||||
CFLAGS="$SLKCFLAGS" LDFLAGS="-lz" make
|
||||
|
||||
install -m 755 _out/Linux_$TARGET/nvidia-installer $PKG/usr/bin/
|
||||
install -m 644 _out/Linux_$TARGET/nvidia-installer.1.gz $PKG/usr/man/man1/
|
||||
|
@ -238,14 +240,44 @@ cd $TMP/nvidia-xconfig-$VERSION
|
|||
install -m 644 _out/Linux_$TARGET/nvidia-xconfig.1.gz $PKG/usr/man/man1/
|
||||
cd -
|
||||
|
||||
# Some new optional "useless" utilities. FIXME: Needs cleanup at a later date.
|
||||
if [ "${OPTAPPS}" = "yes" ]; then
|
||||
|
||||
# Compiling nvidia-xconfig from source
|
||||
cd $TMP/nvidia-modprobe-$VERSION
|
||||
chown -R root:root .
|
||||
chmod -R u+w,go+r-w,a-s .
|
||||
|
||||
CFLAGS="$SLKCFLAGS" make
|
||||
|
||||
install -m 755 _out/Linux_$TARGET/nvidia-modprobe $PKG/usr/bin/
|
||||
install -m 644 _out/Linux_$TARGET/nvidia-modprobe.1.gz $PKG/usr/man/man1/
|
||||
cd -
|
||||
# Compiling nvidia-persistenced from source
|
||||
cd $TMP/nvidia-persistenced-$VERSION
|
||||
chown -R root:root .
|
||||
chmod -R u+w,go+r-w,a-s .
|
||||
|
||||
CFLAGS="$SLKCFLAGS" make
|
||||
#FIXME: need rc.nvidia-persistenced script
|
||||
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/
|
||||
cd -
|
||||
fi
|
||||
|
||||
# Bash script to cleanly install (in doinst.sh) and uninstall the nvidia files
|
||||
# so we don't stomp on the overlapping xorg files.
|
||||
# Note: switching "on the fly" is no longer supported.
|
||||
install -m 0755 $CWD/nvidia-switch $PKG/usr/sbin/
|
||||
sed -i s/PKGVERSION/$VERSION/g $PKG/usr/sbin/nvidia-switch
|
||||
sed -i s/LIBDIRSUFFIX/$LIBDIRSUFFIX/g $PKG/usr/sbin/nvidia-switch
|
||||
if [ ${COMPAT32} = "yes" ]; then
|
||||
sed -i s/LIB32FLAG/yes/g $PKG/usr/sbin/nvidia-switch
|
||||
else
|
||||
sed -i s/LIB32FLAG/no/g $PKG/usr/sbin/nvidia-switch
|
||||
fi
|
||||
|
||||
# These correct wrong paths
|
||||
# These update placeholders and correct wrong paths
|
||||
sed -i "s|__LIBGL_PATH__|/usr/lib$LIBDIRSUFFIX/|" $PKG/usr/lib$LIBDIRSUFFIX/libGL.la
|
||||
sed -i "s|/usr/X11R6/lib|/usr/lib$LIBDIRSUFFIX/|" $PKG/usr/lib$LIBDIRSUFFIX/libGL.la
|
||||
sed -i "s|__UTILS_PATH__|/usr/bin|" \
|
||||
|
@ -257,6 +289,7 @@ sed -i "s|__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__|Application;Settings;|" \
|
|||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cd $TMP/$SRCNAM
|
||||
|
||||
cp -a LICENSE NVIDIA_Changelog README.txt html $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
|
|
@ -1,22 +1,30 @@
|
|||
PRGNAM="nvidia-driver"
|
||||
VERSION="310.32"
|
||||
VERSION="319.17"
|
||||
HOMEPAGE="http://www.nvidia.com"
|
||||
DOWNLOAD="ftp://download.nvidia.com/XFree86/Linux-x86/310.32/NVIDIA-Linux-x86-310.32.run \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-310.32.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-310.32.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-310.32.tar.bz2"
|
||||
MD5SUM="219608da023a318e2c023497e5ba9296 \
|
||||
3e1821e8a398824f1ecbaf232f568578 \
|
||||
f2ac57a1e659549555205bbb3815dd37 \
|
||||
1a1767f08d7d2df09c684faaa968527a"
|
||||
DOWNLOAD_x86_64="ftp://download.nvidia.com/XFree86/Linux-x86_64/310.32/NVIDIA-Linux-x86_64-310.32.run \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-310.32.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-310.32.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-310.32.tar.bz2"
|
||||
MD5SUM_x86_64="a6c9882e2cb00f0e7f84fa133b1e2840 \
|
||||
3e1821e8a398824f1ecbaf232f568578 \
|
||||
f2ac57a1e659549555205bbb3815dd37 \
|
||||
1a1767f08d7d2df09c684faaa968527a"
|
||||
DOWNLOAD="ftp://download.nvidia.com/XFree86/Linux-x86/319.17/NVIDIA-Linux-x86-319.17.run \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-319.17.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-319.17.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-319.17.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-319.17.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-319.17.tar.bz2"
|
||||
MD5SUM="993eee683aea53b7965a853ccde3d740 \
|
||||
eb2d16d7d0cd4b3a96e0cd5f5023983c \
|
||||
01ab515aab9a695b63e716477e54ffc0 \
|
||||
ad1bf30d3eb65ee1a147e723fbe7e6ca \
|
||||
f42533abc718058ed3470f37b03890f8 \
|
||||
8491e9e9093cda28fa55e43c2466f344"
|
||||
DOWNLOAD_x86_64="ftp://download.nvidia.com/XFree86/Linux-x86_64/319.17/NVIDIA-Linux-x86_64-319.17.run \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-319.17.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-319.17.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-319.17.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-319.17.tar.bz2 \
|
||||
ftp://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-319.17.tar.bz2"
|
||||
MD5SUM_x86_64="13b3afaa8981ae62526f9dc9e9464ce4 \
|
||||
eb2d16d7d0cd4b3a96e0cd5f5023983c \
|
||||
01ab515aab9a695b63e716477e54ffc0 \
|
||||
ad1bf30d3eb65ee1a147e723fbe7e6ca \
|
||||
f42533abc718058ed3470f37b03890f8 \
|
||||
8491e9e9093cda28fa55e43c2466f344"
|
||||
REQUIRES="libvdpau nvidia-kernel"
|
||||
MAINTAINER="Edward Koenig"
|
||||
EMAIL="kingbeowulf@gmail.com"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright 2012 Edward W. Koenig, Vancouver, WA, USA
|
||||
# Copyright 2012-2013 Edward W. Koenig, Vancouver, WA, USA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -20,21 +20,23 @@
|
|||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# nvidia-switch utility 2.0.0
|
||||
# nvidia-switch utility 2.0.1
|
||||
#
|
||||
# A tool to install and cleanly remove the nvidia driver without stomping on the xorg files.
|
||||
# Note: this tool "should" allow switching on the fly, but why? Pick a driver! You will still
|
||||
# need to edit a bunch of other config files
|
||||
|
||||
# TO-DO: Bounds/error checking, add COMPAT32
|
||||
# TO-DO: Bounds/error checking, add more COMPAT32?
|
||||
|
||||
set -e
|
||||
|
||||
ROOT="/"
|
||||
CWD=$(pwd)
|
||||
LIBSUFFIX="LIBDIRSUFFIX" # This will be replaced in the build script
|
||||
COMPAT32="LIB32FLAG" # This will be replaced in the build script (yes | no)
|
||||
INC="${ROOT}usr/include/GL"
|
||||
LIB="${ROOT}usr/lib${LIBSUFFIX}"
|
||||
LIB32="${ROOT}usr/lib"
|
||||
XMOD="${LIB}/xorg/modules"
|
||||
XLIB="$XMOD/extensions"
|
||||
NV_VERSION='PKGVERSION' # This will be replaced in the build script
|
||||
|
@ -50,11 +52,33 @@ save_GL(){
|
|||
ln -sf libGL.so.$NV_VERSION-nvidia libGL.so.$NV_VERSION
|
||||
ln -sf libGL.so.$NV_VERSION libGL.so.1
|
||||
ln -sf libGL.so.1 libGL.so
|
||||
# Check for multilib configuration
|
||||
if [ "$COMPAT32" = "yes" ]; then
|
||||
cd $LIB32
|
||||
if [ -f libGL.so.$GL_VERSION ]; then
|
||||
mv libGL.so.$GL_VERSION libGL.so.$GL_VERSION-xorg
|
||||
fi
|
||||
ln -sf libGL.so.$NV_VERSION-nvidia libGL.so.$NV_VERSION
|
||||
ln -sf libGL.so.$NV_VERSION libGL.so.1
|
||||
ln -sf libGL.so.1 libGL.so
|
||||
fi
|
||||
elif [ "$1" = "xorg" ]; then
|
||||
mv libGL.so.$GL_VERSION-xorg libGL.so.$GL_VERSION
|
||||
ln -sf libGL.so.$GL_VERSION libGL.so.1
|
||||
ln -sf libGL.so.1 libGL.so
|
||||
rm -f libGL.so.$NV_VERSION
|
||||
# Check for multilib and reverse any "damage"
|
||||
if [ "$COMPAT32" = "yes" ]; then
|
||||
cd $LIB32
|
||||
rm -f libGL.so
|
||||
rm -f libGL.so.1
|
||||
rm -f libGL.so.$NV_VERSION
|
||||
if [ -f libGL.so.$GL_VERSION-xorg ]; then
|
||||
mv libGL.so.$GL_VERSION-xorg libGL.so.$GL_VERSION
|
||||
fi
|
||||
ln -sf libGL.so.$GL_VERSION libGL.so.1
|
||||
ln -sf libGL.so.1 libGL.so
|
||||
fi
|
||||
fi
|
||||
cd "$CWD"
|
||||
}
|
||||
|
@ -77,7 +101,6 @@ save_wfb(){
|
|||
mv libwfb.so-xorg libwfb.so
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
cd "$CWD"
|
||||
}
|
||||
|
@ -108,13 +131,15 @@ nvidia_ldconfig(){
|
|||
|
||||
nvidia_install(){
|
||||
echo $'Installing to nvidia-driver files!\n'
|
||||
echo "Make sure the nvidia driver is ENABLED in /etc/X11/xorg.conf."
|
||||
echo "Make sure the nvidia driver is ENABLED in /etc/X11/xorg.conf"
|
||||
echo "and in /etc/X11/xorg.conf.d."
|
||||
echo "Otherwise, this may lead to improperly working drivers."
|
||||
|
||||
save_GL "nvidia"
|
||||
save_wfb "nvidia"
|
||||
save_glx "nvidia"
|
||||
|
||||
|
||||
LD_NVIDIA="${LIB}/libGL.so.$NV_VERSION-nvidia"
|
||||
nvidia_ldconfig $LD_NVIDIA
|
||||
}
|
||||
|
@ -123,7 +148,6 @@ nvidia_remove(){
|
|||
echo $'Returning to stock xorg files!\n'
|
||||
echo "Make sure the nvidia driver is DISABLED in /etc/X11/xorg.conf"
|
||||
echo "and in /etc/X11/xorg.conf.d."
|
||||
echo "Don't forget /usr/share/X11/xorg.conf.d/10-nvidia.conf if you use it!"
|
||||
echo "Otherwise, this may lead to improperly working drivers."
|
||||
|
||||
save_GL "xorg"
|
||||
|
@ -135,7 +159,7 @@ nvidia_remove(){
|
|||
rm -f $NV_CONF
|
||||
fi
|
||||
|
||||
LD_NVIDIA="${LIB}/libGL.so.1.2"
|
||||
LD_NVIDIA="${LIB}/libGL.so.$GL_VERSION"
|
||||
nvidia_ldconfig $LD_NVIDIA
|
||||
}
|
||||
|
||||
|
@ -147,17 +171,6 @@ usage(){
|
|||
}
|
||||
|
||||
if [ "$1" = '--install' ]; then
|
||||
ROOT="/"
|
||||
CWD=$(pwd)
|
||||
if [ -e "${ROOT}usr/lib64" ]; then
|
||||
LIBSUFFIX="64"
|
||||
else
|
||||
LIBSUFFIX=""
|
||||
fi
|
||||
INC="${ROOT}usr/include/GL"
|
||||
LIB="${ROOT}usr/lib${LIBSUFFIX}"
|
||||
XMOD="${LIB}/xorg/modules"
|
||||
XLIB="$XMOD/extensions"
|
||||
nvidia_install
|
||||
elif [ "$1" = '--remove' ]; then
|
||||
nvidia_remove
|
||||
|
|
Loading…
Reference in a new issue