summaryrefslogtreecommitdiff
path: root/system/nvidia-driver/nvidia-driver.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/nvidia-driver/nvidia-driver.SlackBuild')
-rw-r--r--system/nvidia-driver/nvidia-driver.SlackBuild40
1 files changed, 23 insertions, 17 deletions
diff --git a/system/nvidia-driver/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild
index 5fc3c92121..759dc2224d 100644
--- a/system/nvidia-driver/nvidia-driver.SlackBuild
+++ b/system/nvidia-driver/nvidia-driver.SlackBuild
@@ -29,9 +29,13 @@
# 1.0 20-MAR-2011 New Maintainer: Edward W. Koenig <kingbeowulf@gmail.com>
# 1.1 10-APR-2011 updated to new version, testing 13.37rc4.6692
# 1.2 27-MAY-2011 new version, allow multilib option, minor edits
+# 1.2.1 20-JUNE-2011 minor edits, thanks to Robby and Roberto
+# 1.5 01-JUNLY-2011 new version, single driver download, add switch to select
+# pure x86_64 or x86_64 with 32-bit compatibility.
+#
PRGNAM=nvidia-driver
-VERSION=270.41.19
+VERSION=275.09.07
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -51,26 +55,23 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
TARGET="x86"
- SRCSUFFIX=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
TARGET="x86"
- SRCSUFFIX=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
TARGET="x86_64"
- SRCSUFFIX=${SCRSUFFIX:--no-compat32}
-# Pass SRCSUFFIX="" if you d/l the pure full package with 32-bit compatibility.
- LIBDIRSUFFIX="64"
+ LIBDIRSUFFIX="64"
+# Set 32-bit compatibility flag default
+ COMPAT32=${COMPAT32:-no}
else
SLKCFLAGS="-O2"
- SRCSUFFIX=""
LIBDIRSUFFIX=""
fi
-SRCNAM=NVIDIA-Linux-$TARGET-${VERSION}${SRCSUFFIX}
+SRCNAM=NVIDIA-Linux-$TARGET-${VERSION}
set -e
@@ -96,23 +97,24 @@ mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \
install -m 755 nvidia_drv.so $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/drivers/
install -m 755 libglx.so.$VERSION \
$PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/extensions/libglx.so.$VERSION-nvidia
-install -m 755 libnvidia-wfb.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/
install -m 755 libGL.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/libGL.so.$VERSION-nvidia
install -m 755 libGL.la $PKG/usr/lib$LIBDIRSUFFIX/
-install -m 755 libnvidia-glcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
+install -m 755 libOpenCL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/
install -m 444 libXvMCNVIDIA.a $PKG/usr/lib$LIBDIRSUFFIX/
install -m 755 libXvMCNVIDIA.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
install -m 755 libvdpau_nvidia.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/vdpau/
install -m 755 libcuda.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
-install -m 755 tls/libnvidia-tls.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/tls/
-install -m 755 libOpenCL.so.1.0.0 $PKG/usr/lib$LIBDIRSUFFIX/
+install -m 755 libnvidia-glcore.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
+install -m 755 libnvidia-wfb.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/
install -m 755 libnvidia-cfg.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
+install -m 755 libnvidia-ml.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
+install -m 755 libnvcuvid.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
install -m 755 libnvidia-compiler.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/
-
install -m 644 nvidia.icd $PKG/etc/OpenCL/vendors/
+install -m 755 tls/libnvidia-tls.so.$VERSION $PKG/usr/lib$LIBDIRSUFFIX/tls/
# Optional 32-bit support; NOTE! nvidia-switch does not operate here.
-if [ "$ARCH" = "x86_64" -a "${SRCSUFFIX}" != "-no-compat32" ]; then
+if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
mkdir -p $PKG/usr/lib/{tls,vdpau}
install -m 755 32/libGL.so.$VERSION $PKG/usr/lib/
@@ -125,7 +127,7 @@ if [ "$ARCH" = "x86_64" -a "${SRCSUFFIX}" != "-no-compat32" ]; then
install -m 755 32/libnvidia-compiler.so.$VERSION $PKG/usr/lib/
fi
-# # Next come the apps
+# Next come the apps
for i in nvidia-smi nvidia-bug-report.sh; do
install -m 755 $i $PKG/usr/bin/
done
@@ -143,6 +145,8 @@ cd $PKG/usr/lib$LIBDIRSUFFIX
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 libnvcuvidv.so.$VERSION libnvcuvid.so
ln -sf tls/libnvidia-tls.so.$VERSION libnvidia-tls.so.$VERSION
cd -
@@ -156,8 +160,10 @@ cd $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules
cd -
# symlinks for optional 32-bit support
-if [ "${SRCSUFFIX}" != "-no-compat32" ]; then
+if [ "$ARCH" = "x86_64" -a "${COMPAT32}" = "yes" ]; then
cd $PKG/usr/lib
+ ln -sf libGL.so.$VERSION libGL.so.1
+ ln -sf libGL.so.1 libGL.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
@@ -214,7 +220,7 @@ cd -
# Self written bash script which I (H.W.) use to switch between nvidia and nv.
# It is now also used by doinst.sh to switch to the nvidia-driver right
-# after installation. For pure 64-bit only (EWK).
+# after installation. For 32-bit and pure 64-bit only (EWK).
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