wok-undigest annotate nvidia-96xx/receipt @ rev 622

Add: gdal
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Wed Feb 01 07:46:15 2012 +0100 (2012-02-01)
parents a7c7f0ab7a40
children 08522bf057e9
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)"
jozee@86 8 WEB_SITE="http://www.nvidia.com/"
jozee@86 9 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg0"
jozee@86 10 TARBALL="${SOURCE}.run"
pascal@427 11 RUN_OPTS="--extract-only"
jozee@86 12 TAGS="drivers graphic video"
jozee@86 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@86 17 # Rules to configure and make the package.
jozee@86 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@86 25 }
jozee@86 26
jozee@86 27 # Rules to gen a SliTaz package suitable for Tazpkg.
jozee@86 28 genpkg_rules()
jozee@86 29 {
pascal@427 30 EXTRAVERSION=_${kvers}
jozee@86 31
jozee@86 32 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE \
jozee@86 33 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video \
jozee@86 34 $fs/usr/share/doc/$PACKAGE
jozee@86 35
jozee@86 36 # Compress and install module
pascal@427 37 lzma e $src/usr/src/nv/nvidia.ko \
jozee@86 38 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
jozee@86 39 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
jozee@86 40 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
jozee@86 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@86 50
jozee@86 51 }
jozee@86 52
jozee@86 53 pre_install()
jozee@86 54 {
jozee@86 55 echo ""
jozee@86 56 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
jozee@86 57 echo "================================================================================"
jozee@86 58 echo "You are installing a package with proprietary license."
jozee@86 59 echo "You must accept the license."
jozee@86 60 echo "================================================================================"
jozee@86 61 echo ""
jozee@86 62
jozee@86 63 }
jozee@86 64
jozee@86 65 post_install()
jozee@86 66 {
jozee@86 67 echo "Processing post-install commands..."
jozee@86 68 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
jozee@86 69
jozee@86 70 # correct .desktop file file
jozee@86 71 sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
jozee@86 72 sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
jozee@86 73
jozee@86 74 echo ""
jozee@86 75 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2"
jozee@86 76 echo "================================================================================"
jozee@86 77 echo "For installing this package, you have to accept the $PACKAGE license."
jozee@86 78 echo "The license is stored in /usr/share/licenses/$PACKAGE "
jozee@86 79 echo -n "Would you like to read the license (y/N) : "; read anser
jozee@86 80 if [ "$anser" = "y" ]; then
jozee@86 81 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more
jozee@86 82 echo ""
jozee@86 83 fi
jozee@86 84 echo "================================================================================"
jozee@86 85 echo -n "Do you accept the license (y/N) : "; read anser
jozee@86 86 if [ "$anser" = "N" ]; then
jozee@86 87 echo "You did not accept the license, Removing the pkg."
jozee@86 88 tazpkg remove "$PACKAGE"
jozee@86 89 fi
jozee@86 90
jozee@86 91 }
jozee@86 92
jozee@86 93 post_remove()
jozee@86 94 {
jozee@86 95 echo "Processing post-remove commands..."
jozee@86 96 depmod -a
jozee@86 97 }
jozee@86 98
jozee@86 99 TAZBB_NO_INSTALL="because this is not hardware neutral"