wok-6.x annotate nvidia/receipt @ rev 4888
espeak: enable devel file
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Sat Feb 06 11:26:23 2010 +0000 (2010-02-06) |
parents | |
children | 5b44af8c1257 |
rev | line source |
---|---|
jozee@4602 | 1 # SliTaz package receipt. |
jozee@4602 | 2 |
jozee@4602 | 3 PACKAGE="nvidia" |
jozee@4602 | 4 VERSION="190.42" |
jozee@4602 | 5 CATEGORY="network" |
jozee@4602 | 6 MAINTAINER="jozee@slitaz.org" |
jozee@4602 | 7 SHORT_DESC="NVIDIA drivers (non-free)" |
jozee@4602 | 8 DEPENDS="linux xorg-server" |
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 |
jozee@4602 | 24 [ -f $TARBALL ] || wget $WGET_URL |
jozee@4602 | 25 |
jozee@4602 | 26 chmod +x $TARBALL |
jozee@4602 | 27 sh $TARBALL --extract-only |
jozee@4602 | 28 |
jozee@4602 | 29 cd $SOURCE/usr/src/nv/ |
jozee@4602 | 30 make SYSSRC="$WOK/linux/linux-$KERNEL_VERSION" module |
jozee@4602 | 31 } |
jozee@4602 | 32 |
jozee@4602 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@4602 | 34 genpkg_rules() |
jozee@4602 | 35 { |
jozee@4602 | 36 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` |
jozee@4602 | 37 EXTRAVERSION=_$KERNEL_VERSION |
jozee@4602 | 38 _pkg="$WOK/$PACKAGE/$SOURCE" |
jozee@4602 | 39 |
jozee@4602 | 40 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE \ |
jozee@4602 | 41 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video |
jozee@4602 | 42 |
jozee@4602 | 43 # Compress and install module |
jozee@4602 | 44 lzma e $_pkg/usr/src/nv/nvidia.ko \ |
jozee@4602 | 45 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz |
jozee@4602 | 46 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz |
jozee@4602 | 47 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz |
jozee@4602 | 48 |
jozee@4602 | 49 cp -a $_pkg/LICENSE $fs/usr/share/licenses/$PACKAGE |
jozee@4602 | 50 cp -a $_pkg/usr/bin $fs/usr |
jozee@4602 | 51 cp -a $_pkg/nvidia-installer $fs/usr/bin |
jozee@4602 | 52 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib/ |
jozee@4602 | 53 cp -a $_pkg/usr/lib/tls $fs/usr/lib/ |
jozee@4602 | 54 cp -a $_pkg/usr/share/pixmaps $fs/usr/share |
jozee@4602 | 55 cp -a $_pkg/usr/share/doc $fs/usr/share |
jozee@4602 | 56 cp -a $_pkg/usr/X11R6/lib/* $fs/usr/lib/X11 |
jozee@4602 | 57 |
jozee@4602 | 58 |
jozee@4602 | 59 } |
jozee@4602 | 60 |
jozee@4602 | 61 pre_install() |
jozee@4602 | 62 { |
jozee@4602 | 63 echo "" |
jozee@4602 | 64 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2" |
jozee@4602 | 65 echo "================================================================================" |
jozee@4602 | 66 echo "You are installing a package with proprietary license." |
jozee@4602 | 67 echo "You must accept the license." |
jozee@4602 | 68 echo "================================================================================" |
jozee@4602 | 69 echo "" |
jozee@4602 | 70 |
jozee@4602 | 71 } |
jozee@4602 | 72 |
jozee@4602 | 73 post_install() |
jozee@4602 | 74 { |
jozee@4602 | 75 echo "Processing post-install commands..." |
jozee@4602 | 76 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz |
jozee@4602 | 77 |
jozee@4602 | 78 echo "" |
jozee@4602 | 79 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2" |
jozee@4602 | 80 echo "================================================================================" |
jozee@4602 | 81 echo "For installing this package, you have to accept the $PACKAGE license." |
jozee@4602 | 82 echo "The license is stored in /usr/share/licenses/$PACKAGE " |
jozee@4602 | 83 echo -n "Would you like to read the license (y/N) : "; read anser |
jozee@4602 | 84 if [ "$anser" = "y" ]; then |
jozee@4602 | 85 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more |
jozee@4602 | 86 echo "" |
jozee@4602 | 87 fi |
jozee@4602 | 88 echo "================================================================================" |
jozee@4602 | 89 echo -n "Do you accept the license (y/N) : "; read anser |
jozee@4602 | 90 if [ "$anser" = "N" ]; then |
jozee@4602 | 91 echo "You did not accept the license, Removing the pkg." |
jozee@4602 | 92 tazpkg remove "$PACKAGE" |
jozee@4602 | 93 fi |
jozee@4602 | 94 |
jozee@4602 | 95 } |
jozee@4602 | 96 |
jozee@4602 | 97 post_remove() |
jozee@4602 | 98 { |
jozee@4602 | 99 echo "Processing post-remove commands..." |
jozee@4602 | 100 depmod -a |
jozee@4602 | 101 } |
jozee@4602 | 102 |
jozee@4602 | 103 |