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