wok-next annotate nvidia/receipt @ rev 11047
Up: clamtk to 4.36.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Oct 16 22:44:10 2011 +0000 (2011-10-16) |
parents | a894aa42f46b |
children |
rev | line source |
---|---|
jozee@4602 | 1 # SliTaz package receipt. |
jozee@4602 | 2 |
jozee@4602 | 3 PACKAGE="nvidia" |
jozee@5339 | 4 VERSION="195.36.15" |
jozee@5602 | 5 CATEGORY="x-window" |
jozee@4602 | 6 MAINTAINER="jozee@slitaz.org" |
jozee@4602 | 7 SHORT_DESC="NVIDIA drivers (non-free)" |
jozee@4602 | 8 WEB_SITE="http://www.nvidia.com/" |
jozee@4602 | 9 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg0" |
jozee@4602 | 10 TARBALL="${SOURCE}.run" |
pankso@10682 | 11 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL" |
jozee@4602 | 12 TAGS="drivers graphic video" |
pankso@10682 | 13 RUN_OPTS="--extract-only" |
pankso@10682 | 14 |
pankso@10682 | 15 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm" |
pankso@10682 | 16 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize" |
jozee@4602 | 17 |
jozee@4602 | 18 # Rules to configure and make the package. |
pankso@10682 | 19 compile_rules() |
pankso@10682 | 20 { |
pankso@10682 | 21 cd $src/usr/src/nv |
pankso@10682 | 22 # Only use .unblocked_ioctl since 2.6.36 |
pankso@10682 | 23 sed -i 's|\.ioctl|// &|' nv.c |
pankso@10682 | 24 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' |
jozee@4602 | 25 } |
jozee@4602 | 26 |
jozee@4602 | 27 # Rules to gen a SliTaz package suitable for Tazpkg. |
jozee@4602 | 28 genpkg_rules() |
jozee@4602 | 29 { |
pankso@10682 | 30 EXTRAVERSION=_${kvers} |
pankso@10682 | 31 |
pankso@10682 | 32 mkdir -p $fs/usr/share $fs/usr/lib/X11 \ |
pankso@10682 | 33 $fs/usr/share/licenses/$PACKAGE \ |
pankso@10682 | 34 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video \ |
pankso@10682 | 35 $fs/usr/share/doc/$PACKAGE |
jozee@4602 | 36 |
jozee@4602 | 37 # Compress and install module |
pankso@10682 | 38 echo "Compressing nvidia.ko module..." |
pankso@10682 | 39 lzma e $src/usr/src/nv/nvidia.ko \ |
pankso@10682 | 40 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.gz |
pankso@10682 | 41 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/*.ko.gz |
pankso@10682 | 42 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/*.ko.gz |
pankso@10682 | 43 |
pankso@10682 | 44 echo "Installing files in pkg fs..." |
pankso@10682 | 45 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE |
pankso@10682 | 46 cp -a $src/usr/bin $fs/usr |
pankso@10682 | 47 cp -a $src/nvidia-installer $fs/usr/bin |
pankso@10682 | 48 cp -a $src/usr/lib/*.so* $fs/usr/lib/ |
pankso@10682 | 49 cp -a $src/usr/lib/tls $fs/usr/lib/ |
pankso@10682 | 50 cp -a $src/usr/share/pixmaps $fs/usr/share |
pankso@10682 | 51 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/ |
pankso@10682 | 52 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11 |
pankso@10682 | 53 |
pankso@10682 | 54 echo "Creating libraries symlinks..." |
slaxemulator@7420 | 55 ln -s libglx.so.$VERSION $fs/usr/lib/X11/modules/extensions/libglx.so |
slaxemulator@7420 | 56 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so |
slaxemulator@7420 | 57 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so.1 |
slaxemulator@7420 | 58 ln -s libGLcore.so.$VERSION $fs/usr/lib/libGLcore.so.1 |
slaxemulator@7420 | 59 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so.1 |
slaxemulator@7420 | 60 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/libnvidia-tls.so.1 |
slaxemulator@7420 | 61 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so.1 |
slaxemulator@7420 | 62 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so |
slaxemulator@7420 | 63 ln -s libvdpau.so.$VERSION $fs/usr/lib/libvdpau.so.1 |
slaxemulator@7420 | 64 ln -s libvdpau_nvidia.so.$VERSION $fs/usr/lib/libvdpau_nvidia.so.1 |
slaxemulator@7420 | 65 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/X11/libXvMCNVIDIA_dynamic.so.1 |
jozee@4602 | 66 } |
jozee@4602 | 67 |
jozee@4602 | 68 pre_install() |
jozee@4602 | 69 { |
jozee@4602 | 70 echo "" |
jozee@4602 | 71 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2" |
jozee@4602 | 72 echo "================================================================================" |
jozee@4602 | 73 echo "You are installing a package with proprietary license." |
jozee@4602 | 74 echo "You must accept the license." |
slaxemulator@7420 | 75 echo "================================================================================" |
slaxemulator@7420 | 76 echo "" |
jozee@4602 | 77 } |
jozee@4602 | 78 |
jozee@4602 | 79 post_install() |
jozee@4602 | 80 { |
jozee@4602 | 81 echo "Processing post-install commands..." |
jozee@4602 | 82 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz |
jozee@4602 | 83 |
jozee@5069 | 84 # correct .desktop file file |
jozee@5069 | 85 sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop |
jozee@5069 | 86 sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop |
jozee@5069 | 87 |
jozee@4602 | 88 echo "" |
jozee@4602 | 89 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2" |
jozee@4602 | 90 echo "================================================================================" |
jozee@4602 | 91 echo "For installing this package, you have to accept the $PACKAGE license." |
slaxemulator@7420 | 92 echo "The license is stored in /usr/share/licenses/$PACKAGE " |
pascal@9214 | 93 if [ "$(tty)" != "not a tty" -a "$step_running" != |
pascal@9214 | 94 "Looking for build dependencies" ]; then |
pascal@9213 | 95 echo -n "Would you like to read the license (y/N) : "; read anser |
pascal@9213 | 96 if [ "$anser" = "y" ]; then |
pascal@9213 | 97 more < /usr/share/licenses/"$PACKAGE"/LICENSE |
pascal@9213 | 98 echo "" |
pascal@9213 | 99 fi |
pascal@9213 | 100 echo "================================================================================" |
pascal@9213 | 101 echo -n "Do you accept the license (y/N) : "; read anser |
pascal@9213 | 102 if [ "$anser" = "N" ]; then |
pascal@9213 | 103 echo "You did not accept the license, Removing the pkg." |
pascal@9213 | 104 tazpkg remove "$PACKAGE" |
pascal@9213 | 105 fi |
jozee@4602 | 106 fi |
jozee@4602 | 107 } |
jozee@4602 | 108 |
jozee@4602 | 109 post_remove() |
jozee@4602 | 110 { |
jozee@4602 | 111 echo "Processing post-remove commands..." |
jozee@4602 | 112 depmod -a |
jozee@4602 | 113 } |