wok-undigest annotate nvidia-96xx/receipt @ rev 1038
gcc: remove wrong error trigger (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Oct 14 22:33:37 2013 +0000 (2013-10-14) |
parents | 57f4e7e045e8 |
children | 135ad0e1fc7d |
rev | line source |
---|---|
jozee@86 | 1 # SliTaz package receipt. |
jozee@86 | 2 |
jozee@86 | 3 PACKAGE="nvidia-96xx" |
mojo@659 | 4 VERSION="96.43.20" |
jozee@86 | 5 CATEGORY="network" |
jozee@86 | 6 MAINTAINER="jozee@slitaz.org" |
jozee@86 | 7 SHORT_DESC="NVIDIA drivers (non-free)" |
jozee@86 | 8 WEB_SITE="http://www.nvidia.com/" |
jozee@86 | 9 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg0" |
jozee@86 | 10 TARBALL="${SOURCE}.run" |
mojo@659 | 11 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL" |
pascal@427 | 12 RUN_OPTS="--extract-only" |
jozee@86 | 13 TAGS="drivers graphic video" |
jozee@86 | 14 |
pascal@427 | 15 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm" |
pascal@827 | 16 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz" |
pascal@427 | 17 |
jozee@86 | 18 # Rules to configure and make the package. |
jozee@86 | 19 |
pascal@427 | 20 compile_rules() |
pascal@427 | 21 { |
pascal@427 | 22 cd $src/usr/src/nv/ |
pascal@428 | 23 # Only use .unblocked_ioctl since 2.6.36 |
pascal@428 | 24 sed -i 's|\.ioctl|// &|' nv.c |
pascal@828 | 25 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' && |
pascal@828 | 26 xz nvidia.ko |
jozee@86 | 27 } |
jozee@86 | 28 |
jozee@86 | 29 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@86 | 30 genpkg_rules() |
jozee@86 | 31 { |
pascal@427 | 32 EXTRAVERSION=_${kvers} |
jozee@86 | 33 |
mojo@659 | 34 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE |
mojo@659 | 35 mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/video |
mojo@659 | 36 mkdir -p $fs/usr/share/doc/$PACKAGE |
jozee@86 | 37 |
jozee@86 | 38 # Compress and install module |
pascal@828 | 39 cp $src/usr/src/nv/nvidia.ko.xz \ |
pascal@827 | 40 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/ |
pascal@827 | 41 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz |
pascal@827 | 42 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz |
mojo@659 | 43 |
pascal@427 | 44 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE |
pascal@427 | 45 cp -a $src/usr/bin $fs/usr |
pascal@427 | 46 cp -a $src/nvidia-installer $fs/usr/bin |
pascal@427 | 47 cp -a $src/usr/lib/*.so* $fs/usr/lib/ |
pascal@427 | 48 cp -a $src/usr/lib/tls $fs/usr/lib/ |
pascal@427 | 49 cp -a $src/usr/share/pixmaps $fs/usr/share |
pascal@427 | 50 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/ |
pascal@427 | 51 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11 |
jozee@86 | 52 |
jozee@86 | 53 } |
jozee@86 | 54 |
jozee@86 | 55 pre_install() |
jozee@86 | 56 { |
jozee@86 | 57 echo "" |
jozee@86 | 58 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2" |
jozee@86 | 59 echo "================================================================================" |
jozee@86 | 60 echo "You are installing a package with proprietary license." |
jozee@86 | 61 echo "You must accept the license." |
jozee@86 | 62 echo "================================================================================" |
jozee@86 | 63 echo "" |
jozee@86 | 64 |
jozee@86 | 65 } |
jozee@86 | 66 |
jozee@86 | 67 post_install() |
jozee@86 | 68 { |
jozee@86 | 69 echo "Processing post-install commands..." |
jozee@86 | 70 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz |
jozee@86 | 71 |
jozee@86 | 72 # correct .desktop file file |
jozee@86 | 73 sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop |
jozee@86 | 74 sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop |
jozee@86 | 75 |
jozee@86 | 76 echo "" |
jozee@86 | 77 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2" |
jozee@86 | 78 echo "================================================================================" |
jozee@86 | 79 echo "For installing this package, you have to accept the $PACKAGE license." |
jozee@86 | 80 echo "The license is stored in /usr/share/licenses/$PACKAGE " |
jozee@86 | 81 echo -n "Would you like to read the license (y/N) : "; read anser |
jozee@86 | 82 if [ "$anser" = "y" ]; then |
jozee@86 | 83 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more |
jozee@86 | 84 echo "" |
jozee@86 | 85 fi |
jozee@86 | 86 echo "================================================================================" |
jozee@86 | 87 echo -n "Do you accept the license (y/N) : "; read anser |
jozee@86 | 88 if [ "$anser" = "N" ]; then |
jozee@86 | 89 echo "You did not accept the license, Removing the pkg." |
jozee@86 | 90 tazpkg remove "$PACKAGE" |
jozee@86 | 91 fi |
jozee@86 | 92 |
jozee@86 | 93 } |
jozee@86 | 94 |
jozee@86 | 95 post_remove() |
jozee@86 | 96 { |
jozee@86 | 97 echo "Processing post-remove commands..." |
jozee@86 | 98 depmod -a |
jozee@86 | 99 } |
jozee@86 | 100 |
jozee@86 | 101 TAZBB_NO_INSTALL="because this is not hardware neutral" |