diff options
Diffstat (limited to 'system/nvidia-driver/nvidia-driver.SlackBuild')
-rw-r--r-- | system/nvidia-driver/nvidia-driver.SlackBuild | 131 |
1 files changed, 85 insertions, 46 deletions
diff --git a/system/nvidia-driver/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild index 1040a6760f..a24b2c2378 100644 --- a/system/nvidia-driver/nvidia-driver.SlackBuild +++ b/system/nvidia-driver/nvidia-driver.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for nvidia-driver # Copyright 2007-2011 Heinz Wiesinger, Amsterdam, The Netherlands -# Copyright 2012-2015 Edward W. Koenig, Vancouver, WA, USA +# Copyright 2012-2016 Edward W. Koenig, Vancouver, WA, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,11 +26,11 @@ # see changelog.txt PRGNAM=nvidia-driver -VERSION=${VERSION:-352.63} -MVERS=340 +VERSION=${VERSION:-361.28} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} CPROXY=${CPROXY:-no} +#GLVND=${GLVND:-no} # possibly switch needed? set -e @@ -71,8 +71,6 @@ SRCNAM=NVIDIA-Linux-$TARGET-${VERSION} rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf nvidia-installer-$VERSION -tar xvf $CWD/nvidia-installer-$VERSION.tar.bz2 rm -rf nvidia-settings-$VERSION tar xvf $CWD/nvidia-settings-$VERSION.tar.bz2 rm -rf nvidia-xconfig-$VERSION @@ -98,57 +96,94 @@ mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \ # Get all the libs to the right place install -m 755 nvidia_drv.so $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/drivers/ +install -m 755 libGL.la $PKG/usr/lib$LIBDIRSUFFIX/libGL.la-nvidia +## GLVND libGL libraries for future consideration, conflict with non-GLVND versions +#install -m 755 libGL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/libGL.so.1.0.0-nvidia +#install -m 755 libGLX.so.0 $PKG/usr/lib$LIBDIRSUFFIX/ +# +# non-GLVND GLX client libraries are the default +install -m 755 libGL.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 755 libnvidia-glcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 755 tls/libnvidia-tls.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/tls/ +# +# we'll try leaving these in to get EGL etc support that needs GLVND (see README.txt) +install -m 755 libEGL.so.1 $PKG/usr/lib$LIBDIRSUFFIX/libEGL.so.1-nvidia +install -m 755 libGLESv1_CM.so.1 $PKG/usr/lib$LIBDIRSUFFIX/libGLESv1_CM.so.1-nvidia +install -m 755 libGLESv2.so.2 $PKG/usr/lib$LIBDIRSUFFIX/libGLESv2.so.2-nvidia +install -m 755 libGLESv1_CM_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 755 libGLESv2_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 755 libEGL_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 755 libGLdispatch.so.0 $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 755 libnvidia-eglcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 755 libOpenGL.so.0 $PKG/usr/lib$LIBDIRSUFFIX/ +# +# Recommended GLVD bit +install -m 755 libGLX_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ + +# All the rest... install -m 755 libcuda.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ install -m 755 libglx.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/extensions/libglx.so.$VERSION-nvidia -install -m 755 libGL.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/libGL.so.$VERSION-nvidia -install -m 755 libGL.la $PKG/usr/lib$LIBDIRSUFFIX/libGL.la-nvidia -install -m 755 libEGL.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/libEGL.so.$VERSION-nvidia install -m 755 libOpenCL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/ install -m 755 libnvcuvid.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ install -m 755 libnvidia-cfg.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ install -m 755 libnvidia-compiler.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 755 libnvidia-eglcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX install -m 755 libnvidia-encode.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 755 libnvidia-fatbinaryloader.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ install -m 755 libnvidia-fbc.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 755 libnvidia-glcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 755 libnvidia-ifr.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ install -m 755 libnvidia-glsi.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 755 libnvidia-ifr.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ install -m 755 libnvidia-ml.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ install -m 755 libnvidia-opencl.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ -install -m 755 tls/libnvidia-tls.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/tls/ -install -m 755 libGLESv1_CM.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/libGLESv1_CM.so.$VERSION -install -m 755 libGLESv2.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/libGLESv2.so.$VERSION +install -m 755 libnvidia-ptxjitcompiler.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ +install -m 755 libvdpau_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ # For nvidia-settings GUI support install -m 755 libnvidia-gtk2.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ install -m 755 libnvidia-gtk3.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/ -# Don't forget separate libvdpau package on SBo. -install -m 755 libvdpau_nvidia.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/libGL.so.$VERSION-nvidia install -m 755 32/libGL.la $PKG/usr/lib/libGL.la-nvidia - install -m 755 32/libEGL.so.$VERSION $PKG/usr/lib/libEGL.so.$VERSION-nvidia - install -m 755 32/libGLESv1_CM.so.$VERSION $PKG/usr/lib/libGLESv1_CM.so.$VERSION - install -m 755 32/libGLESv2.so.$VERSION $PKG/usr/lib/libGLESv2.so.$VERSION + + ## GLVND libGL libraries for future consideration, conflict with non-GLVND versions +#install -m 755 32/libGL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/libGL.so.1.0.0-nvidia +#install -m 755 32/libGLX.so.0 $PKG/usr/lib$LIBDIRSUFFIX/ +# +# non-GLVND GLX client libraries are the default + install -m 755 32/libGL.so.$VERSION $PKG/usr/lib/ + install -m 755 32/libnvidia-glcore.so.$VERSION $PKG/usr/lib/ + install -m 755 32/tls/libnvidia-tls.so.$VERSION $PKG/usr/lib/tls/ +# +# we'll try leaving these in to get EGL etc support that needs GLVND (see README.txt) + install -m 755 32/libEGL.so.1 $PKG/usr/lib/libEGL.so.1-nvidia + install -m 755 32/libGLESv1_CM.so.1 $PKG/usr/lib/libGLESv1_CM.so.1-nvidia + install -m 755 32/libGLESv2.so.2 $PKG/usr/lib/libGLESv2.so.2-nvidia + install -m 755 32/libGLESv1_CM_nvidia.so.$VERSION $PKG/usr/lib/ + install -m 755 32/libGLESv2_nvidia.so.$VERSION $PKG/usr/lib/ + install -m 755 32/libEGL_nvidia.so.$VERSION $PKG/usr/lib/ + install -m 755 32/libGLdispatch.so.0 $PKG/usr/lib/ + install -m 755 32/libnvidia-eglcore.so.$VERSION $PKG/usr/lib/ + install -m 755 32/libOpenGL.so.0 $PKG/usr/lib/ +# +# Recommended GLVD bit + install -m 755 32/libGLX_nvidia.so.$VERSION $PKG/usr/lib/ + +# And the others... + install -m 755 32/libcuda.so.$VERSION $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-eglcore.so.$VERSION $PKG/usr/lib/ install -m 755 32/libnvidia-encode.so.$VERSION $PKG/usr/lib/ + install -m 755 32/libnvidia-fatbinaryloader.so.$VERSION $PKG/usr/lib/ install -m 755 32/libnvidia-fbc.so.$VERSION $PKG/usr/lib/ - install -m 755 32/libnvidia-glcore.so.$VERSION $PKG/usr/lib/ install -m 755 32/libnvidia-glsi.so.$VERSION $PKG/usr/lib/ install -m 755 32/libnvidia-ifr.so.$VERSION $PKG/usr/lib/ install -m 755 32/libnvidia-ml.so.$VERSION $PKG/usr/lib/ install -m 755 32/libnvidia-opencl.so.$VERSION $PKG/usr/lib/ - install -m 755 32/tls/libnvidia-tls.so.$VERSION $PKG/usr/lib/tls/ + install -m 755 32/libnvidia-ptxjitcompiler.so.$VERSION $PKG/usr/lib/ install -m 755 32/libOpenCL.so.1.0.0 $PKG/usr/lib/ install -m 755 32/libvdpau_nvidia.so.$VERSION $PKG/usr/lib/ fi @@ -165,22 +200,40 @@ cd $PKG/usr/lib$LIBDIRSUFFIX ln -sf libnvcuvid.so.$VERSION libnvcuvid.so.1 ln -sf libnvcuvid.so.1 libnvcuvid.so ln -sf libvdpau_nvidia.so.$VERSION libvdpau_nvidia.so - ln -sf tls/libnvidia-tls.so.$VERSION libnvidia-tls.so.$VERSION + ln -sf libGLX_nvidia.so.$VERSION libGLX_nvidia.so.0 + ln -sf libGLX_nvidia.so.$VERSION libGLX_indirect.so.0 + ln -sf libOpenGL.so.0 libOpenGL.so + ln -sf libEGL_nvidia.so.$VERSION libEGL_nvidia.so.0 + ln -sf libGLESv1_CM_nvidia.so.$VERSION libGLESv1_CM_nvidia.so.1 + ln -sf libGLESv2_nvidia.so.$VERSION libGLESv2_nvidia.so.2 +cd - +cd $PKG/usr/lib$LIBDIRSUFFIX/tls + ln -sf libnvidia-tls.so.$VERSION libnvidia-tls.so cd - +ln -sf $PKG/usr/lib$LIBDIRSUFFIX/tls/libnvidia-tls.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/libnvidia-tls.so # symlinks for optional 32-bit support if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then cd $PKG/usr/lib - ln -sf libcuda.so.$VERSION libcuda.so.$MVERS - ln -sf libcuda.so.$MVERS libcuda.so + ln -sf libcuda.so.$VERSION libcuda.so.1 + ln -sf libcuda.so.1 libcuda.so ln -sf libOpenCL.so.1.0.0 libOpenCL.so.1.0 ln -sf libOpenCL.so.1.0 libOpenCL.so.1 ln -sf libOpenCL.so.1 libOpenCL.so ln -sf libnvcuvid.so.$VERSION libnvcuvid.so.1 ln -sf libnvcuvid.so.1 libnvcuvid.so ln -sf libvdpau_nvidia.so.$VERSION libvdpau_nvidia.so - ln -sf tls/libnvidia-tls.so.$VERSION libnvidia-tls.so.$VERSION + ln -sf libGLX_nvidia.so.$VERSION libGLX_nvidia.so.0 + ln -sf libGLX_nvidia.so.$VERSION libGLX_indirect.so.0 + ln -sf libOpenGL.so.0 libOpenGL.so + ln -sf libEGL_nvidia.so.$VERSION libEGL_nvidia.so.0 + ln -sf libGLESv1_CM_nvidia.so.$VERSION libGLESv1_CM_nvidia.so.1 + ln -sf libGLESv2_nvidia.so.$VERSION libGLESv2_nvidia.so.2 cd - + cd $PKG/usr/lib$LIBDIRSUFFIX/tls + ln -sf libnvidia-tls.so.$VERSION libnvidia-tls.so + cd - + ln -sf $PKG/usr/lib$LIBDIRSUFFIX/tls/libnvidia-tls.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/libnvidia-tls.so fi # Next come the apps @@ -198,22 +251,6 @@ if [ "$ARCH" = "x86_64" -a "${CPROXY}" = "yes" ]; then 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 . - find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - - 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/ -cd - - # Compiling nvidia-settings from source cd $TMP/nvidia-settings-$VERSION chown -R root:root . @@ -282,7 +319,7 @@ cd - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" make -#FIXME: need rc.nvidia-persistenced script +#FIXME: need rc.nvidia-persistenced script; see doc 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 - @@ -312,7 +349,9 @@ 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 +# sample start/stop scripts for nvidia-persistenced cp -a nvidia-persistenced-init.tar.bz2 $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 |