From 953c8fb3fc46f5eb175647fcbbfac643cbe869be Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Thu, 13 May 2010 00:41:09 +0200 Subject: system/nvidia-legacy173-driver: Updated for version 173.14.22 --- .../nvidia-legacy173-driver.SlackBuild | 58 +++++++++++++--------- 1 file changed, 34 insertions(+), 24 deletions(-) (limited to 'system/nvidia-legacy173-driver/nvidia-legacy173-driver.SlackBuild') diff --git a/system/nvidia-legacy173-driver/nvidia-legacy173-driver.SlackBuild b/system/nvidia-legacy173-driver/nvidia-legacy173-driver.SlackBuild index 2be6816062..fa7722ee38 100644 --- a/system/nvidia-legacy173-driver/nvidia-legacy173-driver.SlackBuild +++ b/system/nvidia-legacy173-driver/nvidia-legacy173-driver.SlackBuild @@ -1,8 +1,8 @@ #!/bin/sh -# Slackware build script for nvidia-driver +# Slackware build script for nvidia-legacy173-driver -# Copyright 2007-2009 Heinz Wiesinger +# 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-legacy173-driver -VERSION=173.14.18 -ARCH=${ARCH:-i586} +VERSION=173.14.22 +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,28 @@ 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 + 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 @@ -79,10 +90,7 @@ cd usr/include/GL done cd - -mkdir -p $PKG/usr/include/cuda/ -cd usr/include/cuda - cp -a * $PKG/usr/include/cuda/ -cd - +cp -a usr/include/cuda $PKG/usr/include/cuda # Next come the apps cp -a nvidia-installer $PKG/usr/bin/ @@ -105,13 +113,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 @@ -121,8 +130,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} -- cgit v1.2.3