summaryrefslogtreecommitdiff
path: root/system/nvidia-driver/nvidia-driver.SlackBuild
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2010-05-13 00:41:07 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:41:07 +0200
commitd43ed837763e40fb47bd62cdfbec71a20ea82680 (patch)
tree50ef1809461039fb7fad91aa591c310a903a54bf /system/nvidia-driver/nvidia-driver.SlackBuild
parenta317d2ef48033955273dd47601b64ca1dab4ef04 (diff)
downloadslackbuilds-d43ed837763e40fb47bd62cdfbec71a20ea82680.tar.gz
system/nvidia-driver: Updated for version 190.42
Diffstat (limited to 'system/nvidia-driver/nvidia-driver.SlackBuild')
-rw-r--r--system/nvidia-driver/nvidia-driver.SlackBuild54
1 files changed, 34 insertions, 20 deletions
diff --git a/system/nvidia-driver/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild
index a7b38bcc80..ab1a3ae556 100644
--- a/system/nvidia-driver/nvidia-driver.SlackBuild
+++ b/system/nvidia-driver/nvidia-driver.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for nvidia-driver
-# Copyright 2007-2009 Heinz Wiesinger <pprkut@liwjatan.at>
+# Copyright 2007-2009 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,8 +25,8 @@
# Thanks to Robby Workman for suggestions to improve this script.
PRGNAM=nvidia-driver
-VERSION=180.29
-ARCH=${ARCH:-i586}
+VERSION=190.42
+ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -35,7 +35,18 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-SRCNAM=NVIDIA-Linux-x86-$VERSION-pkg0
+if [ "$ARCH" = "i486" ]; then
+ TARGET="x86"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ TARGET="x86"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ TARGET="x86_64"
+ LIBDIRSUFFIX="64"
+fi
+
+SRCNAM=NVIDIA-Linux-$TARGET-$VERSION-pkg0
set -e
@@ -48,28 +59,30 @@ cd $SRCNAM
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-mkdir -p $PKG/usr/{bin,share,lib,sbin} $PKG/usr/include/GL \
- $PKG/usr/lib/xorg/modules/{drivers,extensions}
+mkdir -p $PKG/usr/{bin,share,lib$LIBDIRSUFFIX,sbin} $PKG/usr/include/GL \
+ $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions}
# Start with the libraries
cd usr/lib
- cp -a * $PKG/usr/lib
+ #Do not copy libvdpau and libvdpau_trace, those are now a separate script
+ rm libvdpau.so.$VERSION libvdpau_trace.so.$VERSION
+ cp -a * $PKG/usr/lib$LIBDIRSUFFIX
#Rename those files which would overwrite xorg's original files
for i in libGL.so.$VERSION libGLcore.so.$VERSION; do
- mv $PKG/usr/lib/$i $PKG/usr/lib/$i-nvidia ;
+ mv $PKG/usr/lib$LIBDIRSUFFIX/$i $PKG/usr/lib$LIBDIRSUFFIX/$i-nvidia ;
done
cd -
# This is the driver itself
cd usr/X11R6/lib
- cp -a * $PKG/usr/lib/xorg/
+ cp -a * $PKG/usr/lib$LIBDIRSUFFIX/xorg/
for i in libXvMCNVIDIA.a libXvMCNVIDIA.so.$VERSION; do
- mv $PKG/usr/lib/xorg/$i $PKG/usr/lib/ ;
+ mv $PKG/usr/lib$LIBDIRSUFFIX/xorg/$i $PKG/usr/lib$LIBDIRSUFFIX/ ;
done
# Rename those files which would overwrite xorg's original files
- mv $PKG/usr/lib/xorg/modules/extensions/libglx.so.$VERSION \
- $PKG/usr/lib/xorg/modules/extensions/libglx.so.$VERSION-nvidia
+ mv $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/extensions/libglx.so.$VERSION \
+ $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/extensions/libglx.so.$VERSION-nvidia
cd -
# These are the includes
@@ -80,7 +93,6 @@ cd usr/include/GL
cd -
cp -a usr/include/cuda $PKG/usr/include/cuda
-cp -a usr/include/vdpau $PKG/usr/include/vdpau
# Next come the apps
cp -a nvidia-installer $PKG/usr/bin/
@@ -103,13 +115,14 @@ cd -
# after installation.
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
# These correct wrong paths
-sed -i 's|__LIBGL_PATH__|/usr/lib/|' $PKG/usr/lib/libGL.la
-sed -i 's|/usr/X11R6/lib|/usr/lib/|' $PKG/usr/lib/libGL.la
-sed -i 's|__UTILS_PATH__|/usr/bin|' \
+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|" \
$PKG/usr/share/applications/nvidia-settings.desktop
-sed -i 's|__PIXMAP_PATH__|/usr/share/pixmaps|' \
+sed -i "s|__PIXMAP_PATH__|/usr/share/pixmaps|" \
$PKG/usr/share/applications/nvidia-settings.desktop
cd $TMP/$SRCNAM
@@ -119,8 +132,9 @@ cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
-sed s/PKGVERSION/$VERSION/g $CWD/slack-desc > $PKG/install/slack-desc
-sed s/PKGVERSION/$VERSION/g $CWD/doinst.sh > $PKG/install/doinst.sh
+sed "s/PKGVERSION/$VERSION/g" $CWD/slack-desc > $PKG/install/slack-desc
+sed "s/PKGVERSION/$VERSION/g" $CWD/doinst.sh > $PKG/install/doinst.sh
+sed -i "s/LIBDIRSUFFIX/$LIBDIRSUFFIX/g" $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l n -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l n -c n $OUTPUT/$PRGNAM-$VERSION-$TARGET-$BUILD$TAG.${PKGTYPE:-tgz}