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