wok-4.x rev 10682
nvidia: let it build!
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri May 27 15:23:30 2011 +0200 (2011-05-27) |
parents | 42fbb057e6bc |
children | 7e7204152cf9 |
files | nvidia/receipt |
line diff
1.1 --- a/nvidia/receipt Fri May 27 12:54:54 2011 +0200 1.2 +++ b/nvidia/receipt Fri May 27 15:23:30 2011 +0200 1.3 @@ -5,56 +5,53 @@ 1.4 CATEGORY="x-window" 1.5 MAINTAINER="jozee@slitaz.org" 1.6 SHORT_DESC="NVIDIA drivers (non-free)" 1.7 -DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm" 1.8 -BUILD_DEPENDS="$DEPENDS linux-module-headers coreutils-file-summarize" 1.9 WEB_SITE="http://www.nvidia.com/" 1.10 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg0" 1.11 TARBALL="${SOURCE}.run" 1.12 +WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL" 1.13 TAGS="drivers graphic video" 1.14 +RUN_OPTS="--extract-only" 1.15 + 1.16 +DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm" 1.17 +BUILD_DEPENDS="linux-module-headers coreutils-file-summarize" 1.18 1.19 # Rules to configure and make the package. 1.20 - 1.21 -compile_rules() { 1.22 - KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` 1.23 - WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL" 1.24 - 1.25 - cd $WOK/$PACKAGE 1.26 - [ -f $SOURCES_REPOSITORY/$TARBALL ] || wget $WGET_URL -P $SOURCES_REPOSITORY 1.27 - 1.28 - chmod +x $SOURCES_REPOSITORY/$TARBALL 1.29 - sh $SOURCES_REPOSITORY/$TARBALL --extract-only 1.30 - 1.31 - cd $SOURCE/usr/src/nv/ 1.32 - sed -i 's|\.ioctl|// &|' nv.c # only use .unblocked_ioctl since 2.6.36 1.33 - make SYSSRC="/usr/src/linux" module 1.34 +compile_rules() 1.35 +{ 1.36 + cd $src/usr/src/nv 1.37 + # Only use .unblocked_ioctl since 2.6.36 1.38 + sed -i 's|\.ioctl|// &|' nv.c 1.39 + make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' 1.40 } 1.41 1.42 # Rules to gen a SliTaz package suitable for Tazpkg. 1.43 genpkg_rules() 1.44 { 1.45 - KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` 1.46 - EXTRAVERSION=_$KERNEL_VERSION 1.47 - _pkg="$WOK/$PACKAGE/$SOURCE" 1.48 - 1.49 - mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE \ 1.50 - $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video \ 1.51 - $fs/usr/share/doc/$PACKAGE 1.52 + EXTRAVERSION=_${kvers} 1.53 + 1.54 + mkdir -p $fs/usr/share $fs/usr/lib/X11 \ 1.55 + $fs/usr/share/licenses/$PACKAGE \ 1.56 + $fs/lib/modules/$kvers-slitaz/kernel/drivers/video \ 1.57 + $fs/usr/share/doc/$PACKAGE 1.58 1.59 # Compress and install module 1.60 - lzma e $_pkg/usr/src/nv/nvidia.ko \ 1.61 - $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz 1.62 - chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz 1.63 - chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz 1.64 - 1.65 - cp -a $_pkg/LICENSE $fs/usr/share/licenses/$PACKAGE 1.66 - cp -a $_pkg/usr/bin $fs/usr 1.67 - cp -a $_pkg/nvidia-installer $fs/usr/bin 1.68 - cp -a $_pkg/usr/lib/*.so* $fs/usr/lib/ 1.69 - cp -a $_pkg/usr/lib/tls $fs/usr/lib/ 1.70 - cp -a $_pkg/usr/share/pixmaps $fs/usr/share 1.71 - cp -a $_pkg/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/ 1.72 - cp -a $_pkg/usr/X11R6/lib/* $fs/usr/lib/X11 1.73 - 1.74 + echo "Compressing nvidia.ko module..." 1.75 + lzma e $src/usr/src/nv/nvidia.ko \ 1.76 + $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.gz 1.77 + chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/*.ko.gz 1.78 + chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/*.ko.gz 1.79 + 1.80 + echo "Installing files in pkg fs..." 1.81 + cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE 1.82 + cp -a $src/usr/bin $fs/usr 1.83 + cp -a $src/nvidia-installer $fs/usr/bin 1.84 + cp -a $src/usr/lib/*.so* $fs/usr/lib/ 1.85 + cp -a $src/usr/lib/tls $fs/usr/lib/ 1.86 + cp -a $src/usr/share/pixmaps $fs/usr/share 1.87 + cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/ 1.88 + cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11 1.89 + 1.90 + echo "Creating libraries symlinks..." 1.91 ln -s libglx.so.$VERSION $fs/usr/lib/X11/modules/extensions/libglx.so 1.92 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so 1.93 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so.1 1.94 @@ -77,7 +74,6 @@ 1.95 echo "You must accept the license." 1.96 echo "================================================================================" 1.97 echo "" 1.98 - 1.99 } 1.100 1.101 post_install() 1.102 @@ -115,5 +111,3 @@ 1.103 echo "Processing post-remove commands..." 1.104 depmod -a 1.105 } 1.106 - 1.107 -TAZBB_NO_INSTALL="because this is not hardware neutral"