diff options
author | Heinz Wiesinger <pprkut@liwjatan.at> | 2011-01-09 12:44:22 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2011-01-10 15:04:45 -0600 |
commit | a7d9001ae24cc00dafbad5b7b0950eb321df0b21 (patch) | |
tree | 53f4bb8f0209cd6b047cbe61897f8a8639f2d8b4 /system/nvidia-driver/nvidia-driver.SlackBuild | |
parent | a6112d0b9bb2d36ff0ccec728705d2b5153f34ea (diff) | |
download | slackbuilds-a7d9001ae24cc00dafbad5b7b0950eb321df0b21.tar.gz |
system/nvidia-driver: Updated for version 260.19.29.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/nvidia-driver/nvidia-driver.SlackBuild')
-rw-r--r-- | system/nvidia-driver/nvidia-driver.SlackBuild | 89 |
1 files changed, 64 insertions, 25 deletions
diff --git a/system/nvidia-driver/nvidia-driver.SlackBuild b/system/nvidia-driver/nvidia-driver.SlackBuild index b711add41d..c063fa2340 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-2010 Heinz Wiesinger, Amsterdam, The Netherlands +# Copyright 2007-2011 Heinz Wiesinger, Amsterdam, The Netherlands # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,7 +25,7 @@ # Thanks to Robby Workman for suggestions to improve this script. PRGNAM=nvidia-driver -VERSION=256.44 +VERSION=260.19.29 BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -43,14 +43,17 @@ PKG=$TMP/package-$PRGNAM 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="-no-compat32" LIBDIRSUFFIX="64" @@ -67,6 +70,12 @@ set -e 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 +tar xvf $CWD/nvidia-xconfig-$VERSION.tar.bz2 rm -rf $SRCNAM sh $CWD/$SRCNAM.run --extract-only cd $SRCNAM @@ -74,9 +83,8 @@ chown -R root:root . chmod -R u+w,go+r-w,a-s . mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/{drivers,extensions} \ - $PKG/usr/include/{CL,cuda,GL} $PKG/etc/OpenCL/vendors/ \ - $PKG/usr/lib$LIBDIRSUFFIX/{tls,vdpau} $PKG/usr/{bin,man/man1,sbin} \ - $PKG/usr/share/{applications,pixmaps} + $PKG/etc/OpenCL/vendors/ $PKG/usr/lib$LIBDIRSUFFIX/{tls,vdpau} \ + $PKG/usr/{bin,man/man1,sbin} $PKG/usr/share/{applications,pixmaps} install -m 755 nvidia_drv.so $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules/drivers/ install -m 755 libglx.so.$VERSION \ @@ -94,32 +102,14 @@ install -m 755 libOpenCL.so.1.0.0 $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/ -for i in glxext.h glext.h gl.h glx.h; do - install -m 644 $i $PKG/usr/include/GL/$i-nvidia -done - -for i in cuda.h cudaGL.h cudaVDPAU.h; do - install -m 644 $i $PKG/usr/include/cuda/$i -done - -for i in cl.h cl_gl.h cl_platform.h; do - install -m 644 $i $PKG/usr/include/CL/$i -done - install -m 644 nvidia.icd $PKG/etc/OpenCL/vendors/ # # Next come the apps -for i in nvidia-installer nvidia-xconfig nvidia-settings \ - nvidia-smi nvidia-bug-report.sh; do +for i in nvidia-smi nvidia-bug-report.sh; do install -m 755 $i $PKG/usr/bin/ done -install -m 644 nvidia-settings.desktop $PKG/usr/share/applications/ -install -m 644 nvidia-settings.png $PKG/usr/share/pixmaps/ - -for i in *.1.gz; do - install -m 644 $i $PKG/usr/man/man1/$i -done +install -m 644 nvidia-smi.1.gz $PKG/usr/man/man1/ # symlinks cd $PKG/usr/lib$LIBDIRSUFFIX @@ -144,6 +134,52 @@ cd $PKG/usr/lib$LIBDIRSUFFIX/xorg/modules ln -sf libnvidia-wfb.so.$VERSION libnvidia-wfb.so.1 cd - +# Compiling nvidia-installer from source +cd $TMP/nvidia-installer-$VERSION + chown -R root:root . + chmod -R u+w,go+r-w,a-s . + + 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 . + chmod -R u+w,go+r-w,a-s . + + cd src/libXNVCtrl + make clean + CFLAGS="$SLKCFLAGS" \ + make + cd ../../ + + CFLAGS="$SLKCFLAGS" \ + make + + install -m 755 _out/Linux_$TARGET/nvidia-settings $PKG/usr/bin/ + install -m 644 _out/Linux_$TARGET/nvidia-settings.1.gz $PKG/usr/man/man1/ + install -m 644 doc/nvidia-settings.desktop $PKG/usr/share/applications/ + install -m 644 doc/nvidia-settings.png $PKG/usr/share/pixmaps/ +cd ../ + +# Compiling nvidia-xconfig from source +cd $TMP/nvidia-xconfig-$VERSION + chown -R root:root . + chmod -R u+w,go+r-w,a-s . + + CFLAGS="$SLKCFLAGS" \ + make + + install -m 755 _out/Linux_$TARGET/nvidia-xconfig $PKG/usr/bin/ + install -m 644 _out/Linux_$TARGET/nvidia-xconfig.1.gz $PKG/usr/man/man1/ +cd - + + # Self written bash script which I use to switch between nvidia and nv. # It is now also used by doinst.sh to switch to the nvidia-driver right # after installation. @@ -158,8 +194,11 @@ sed -i "s|__UTILS_PATH__|/usr/bin|" \ $PKG/usr/share/applications/nvidia-settings.desktop sed -i "s|__PIXMAP_PATH__|/usr/share/pixmaps|" \ $PKG/usr/share/applications/nvidia-settings.desktop +sed -i "s|__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__|Application;Settings;|" \ + $PKG/usr/share/applications/nvidia-settings.desktop 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 |