wok-6.x annotate nvidia/receipt @ rev 7418

nvidia: only use .unblocked_ioctl since 2.6.36
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 28 12:56:09 2010 +0100 (2010-11-28)
parents f027a129902c
children 2d215b2df1eb
rev   line source
jozee@4602 1 # SliTaz package receipt.
jozee@4602 2
jozee@4602 3 PACKAGE="nvidia"
jozee@5339 4 VERSION="195.36.15"
jozee@5602 5 CATEGORY="x-window"
jozee@4602 6 MAINTAINER="jozee@slitaz.org"
jozee@4602 7 SHORT_DESC="NVIDIA drivers (non-free)"
jozee@5532 8 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm"
jozee@4602 9 BUILD_DEPENDS="$DEPENDS"
jozee@4602 10 WEB_SITE="http://www.nvidia.com/"
jozee@4602 11 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg0"
jozee@4602 12 TARBALL="${SOURCE}.run"
jozee@4602 13 TAGS="drivers graphic video"
jozee@4602 14
jozee@4602 15 # Rules to configure and make the package.
jozee@4602 16
jozee@4602 17 compile_rules() {
jozee@4602 18 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
jozee@4602 19 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL"
jozee@4602 20
jozee@4602 21 [ -d $WOK/linux/taz ] || tazwok cook linux
jozee@4602 22
jozee@4602 23 cd $WOK/$PACKAGE
pascal@5553 24 [ -f $SOURCES_REPOSITORY/$TARBALL ] || wget $WGET_URL -P $SOURCES_REPOSITORY
jozee@4602 25
pascal@5553 26 chmod +x $SOURCES_REPOSITORY/$TARBALL
pascal@5553 27 sh $SOURCES_REPOSITORY/$TARBALL --extract-only
jozee@4602 28
jozee@4602 29 cd $SOURCE/usr/src/nv/
pascal@7418 30 sed -i 's|\.ioctl|// &|' nv.c # only use .unblocked_ioctl since 2.6.36
jozee@4602 31 make SYSSRC="$WOK/linux/linux-$KERNEL_VERSION" module
jozee@4602 32 }
jozee@4602 33
jozee@4602 34 # Rules to gen a SliTaz package suitable for Tazpkg.
jozee@4602 35 genpkg_rules()
jozee@4602 36 {
jozee@4602 37 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
jozee@4602 38 EXTRAVERSION=_$KERNEL_VERSION
jozee@4602 39 _pkg="$WOK/$PACKAGE/$SOURCE"
jozee@4602 40
jozee@4602 41 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE \
jozee@5069 42 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video \
jozee@5070 43 $fs/usr/share/doc/$PACKAGE
jozee@4602 44
jozee@4602 45 # Compress and install module
jozee@4602 46 lzma e $_pkg/usr/src/nv/nvidia.ko \
jozee@4602 47 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
jozee@4602 48 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
jozee@4602 49 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
jozee@4602 50
jozee@4602 51 cp -a $_pkg/LICENSE $fs/usr/share/licenses/$PACKAGE
jozee@4602 52 cp -a $_pkg/usr/bin $fs/usr
jozee@4602 53 cp -a $_pkg/nvidia-installer $fs/usr/bin
jozee@4602 54 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib/
jozee@4602 55 cp -a $_pkg/usr/lib/tls $fs/usr/lib/
jozee@4602 56 cp -a $_pkg/usr/share/pixmaps $fs/usr/share
jozee@5069 57 cp -a $_pkg/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
jozee@5069 58 cp -a $_pkg/usr/X11R6/lib/* $fs/usr/lib/X11
jozee@5572 59
jozee@5572 60 cd $fs/usr/lib/X11/modules/extensions
jozee@5572 61 ln -s libglx.so.$VERSION libglx.so
jozee@5572 62
jozee@5572 63 cd $fs/usr/lib/
jozee@5572 64 ln -s libGL.so.$VERSION libGL.so
jozee@5572 65 ln -s libGL.so.$VERSION libGL.so.1
jozee@5572 66 ln -s libGLcore.so.$VERSION libGLcore.so.1
jozee@5572 67 ln -s libnvidia-cfg.so.$VERSION libnvidia-cfg.so.1
jozee@5572 68 ln -s libnvidia-tls.so.$VERSION libnvidia-tls.so.1
jozee@5572 69 ln -s libcuda.so.$VERSION libcuda.so.1
jozee@5572 70 ln -s libcuda.so.$VERSION libcuda.so
jozee@5572 71 ln -s libvdpau.so.$VERSION libvdpau.so.1
jozee@5572 72 ln -s libvdpau_nvidia.so.$VERSION libvdpau_nvidia.so.1
jozee@5572 73
jozee@5572 74 cd $fs/usr/lib/X11
jozee@5572 75 ln -s libXvMCNVIDIA.so.$VERSION libXvMCNVIDIA_dynamic.so.1
jozee@4602 76
jozee@4602 77 }
jozee@4602 78
jozee@4602 79 pre_install()
jozee@4602 80 {
jozee@4602 81 echo ""
jozee@4602 82 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
jozee@4602 83 echo "================================================================================"
jozee@4602 84 echo "You are installing a package with proprietary license."
jozee@4602 85 echo "You must accept the license."
jozee@4602 86 echo "================================================================================"
jozee@4602 87 echo ""
jozee@4602 88
jozee@4602 89 }
jozee@4602 90
jozee@4602 91 post_install()
jozee@4602 92 {
jozee@4602 93 echo "Processing post-install commands..."
jozee@4602 94 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
jozee@4602 95
jozee@5069 96 # correct .desktop file file
jozee@5069 97 sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
jozee@5069 98 sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
jozee@5069 99
jozee@4602 100 echo ""
jozee@4602 101 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2"
jozee@4602 102 echo "================================================================================"
jozee@4602 103 echo "For installing this package, you have to accept the $PACKAGE license."
jozee@4602 104 echo "The license is stored in /usr/share/licenses/$PACKAGE "
jozee@4602 105 echo -n "Would you like to read the license (y/N) : "; read anser
jozee@4602 106 if [ "$anser" = "y" ]; then
jozee@4602 107 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more
jozee@4602 108 echo ""
jozee@4602 109 fi
jozee@4602 110 echo "================================================================================"
jozee@4602 111 echo -n "Do you accept the license (y/N) : "; read anser
jozee@4602 112 if [ "$anser" = "N" ]; then
jozee@4602 113 echo "You did not accept the license, Removing the pkg."
jozee@4602 114 tazpkg remove "$PACKAGE"
jozee@4602 115 fi
jozee@4602 116
jozee@4602 117 }
jozee@4602 118
jozee@4602 119 post_remove()
jozee@4602 120 {
jozee@4602 121 echo "Processing post-remove commands..."
jozee@4602 122 depmod -a
jozee@4602 123 }
jozee@4602 124
pascal@5013 125 TAZBB_NO_INSTALL="because this is not hardware neutral"