wok-6.x annotate nvidia-173xx/receipt @ rev 20690

Update some WEB_SITE
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jan 31 23:57:12 2019 +0100 (2019-01-31)
parents 3705d68ed8f3
children 02c70d036ea0
rev   line source
mojo@11768 1 # SliTaz package receipt.
mojo@11768 2
mojo@11768 3 PACKAGE="nvidia-173xx"
psychomaniak@18528 4 VERSION="173.14.39"
gokhlayeh@12012 5 CATEGORY="non-free"
mojo@11768 6 MAINTAINER="jozee@slitaz.org"
pascal@15584 7 LICENSE="other"
mojo@11768 8 SHORT_DESC="NVIDIA drivers (non-free)"
mojo@11768 9 WEB_SITE="http://www.nvidia.com/"
mojo@11768 10 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg1"
mojo@11768 11 TARBALL="${SOURCE}.run"
mojo@11768 12 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL"
mojo@11768 13 RUN_OPTS="--extract-only"
pascal@14528 14 TAGS="driver graphic video"
psychomaniak@18852 15 PROVIDE="nvidia mesa"
mojo@11768 16
mojo@11807 17 DEPENDS="linux xorg-server gtk+ cairo linux-agp xorg-libXv"
pascal@13278 18 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz"
mojo@11768 19
mojo@11768 20 # Rules to configure and make the package.
mojo@11768 21
mojo@11768 22 compile_rules()
mojo@11768 23 {
mojo@11768 24 cd $src/usr/src/nv/
pascal@20396 25 sed -i 's|.*utsname.*|&\n#include <linux/acpi.h>|' nv-linux.h
pascal@20212 26 sed -i 's|uname -m|echo i486|' Makefile*
mojo@11768 27 # Only use .unblocked_ioctl since 2.6.36
mojo@11768 28 sed -i 's|\.ioctl|// &|' nv.c
mojo@11768 29 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/'
pascal@15587 30 xz nvidia.ko
mojo@11768 31 }
al@18734 32
mojo@11768 33 # Rules to gen a SliTaz package suitable for Tazpkg.
mojo@11768 34 genpkg_rules()
al@18734 35 {
pankso@15855 36 EXTRAVERSION=_${kvers}
al@18734 37
al@18734 38 mkdir -p \
al@18734 39 $fs/usr/share \
al@18734 40 $fs/usr/lib/X11 \
al@18734 41 $fs/usr/share/licenses/$PACKAGE \
al@18734 42 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video \
al@18734 43 $fs/usr/share/doc/$PACKAGE
al@18734 44
pascal@15587 45 cp $src/usr/src/nv/nvidia.ko.xz \
al@18734 46 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/
pascal@13278 47 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
al@18734 48 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
al@18734 49
mojo@11768 50 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE
mojo@11768 51 cp -a $src/usr/bin $fs/usr
mojo@11768 52 cp -a $src/nvidia-installer $fs/usr/bin
mojo@11768 53 cp -a $src/usr/lib/*.so* $fs/usr/lib/
mojo@11768 54 cp -a $src/usr/lib/tls $fs/usr/lib/
al@18734 55 cp -a $src/usr/X11R6/lib/libXvMCNVIDIA.so.$VERSION $fs/usr/lib
al@18734 56 cp -a $src/usr/X11R6/lib/modules $fs/usr/lib/X11/
al@18734 57 cp -a $src/usr/share/applications $fs/usr/share
mojo@11768 58 cp -a $src/usr/share/pixmaps $fs/usr/share
mojo@11768 59 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
mojo@11768 60 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11
mojo@11768 61
al@18734 62 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so
mojo@11768 63 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so.1
mojo@11768 64 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so
mojo@11768 65 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so.1
psychomaniak@18852 66 # exclude from files.list (for tazpkg's "find-depends")
psychomaniak@18852 67 cd $fs/usr/lib
psychomaniak@18852 68 for i in $(ls libGL.so*) ; do mv -f $i ${i//./-.-} ; done
psychomaniak@18852 69
mojo@11768 70 ln -s libGLcore.so.$VERSION $fs/usr/lib/libGLcore.so.1
mojo@11768 71 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so
mojo@11768 72 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so.1
mojo@11768 73 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/libnvidia-tls.so.1
mojo@11768 74 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/tls/libnvidia-tls.so.1
mojo@11768 75 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so.1
mojo@11768 76 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so
mojo@11768 77 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so.1
mojo@11768 78 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so
mojo@11768 79 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so
mojo@11768 80 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so.1
al@18734 81 ln -s libglx.so.$VERSION $fs/usr/lib/X11/modules/extensions/libglx.so
mojo@11768 82 }
mojo@11768 83
mojo@11768 84 pre_install()
mojo@11768 85 {
al@18734 86 title "PROPRIETARY LICENSE"
mojo@11768 87 echo "You are installing a package with proprietary license."
mojo@11768 88 echo "You must accept the license."
al@18734 89 footer
mojo@11768 90 }
mojo@11768 91
mojo@11768 92 post_install()
mojo@11768 93 {
psychomaniak@18852 94 # Restore excluded from files.list (for tazpkg's "find-depends")
psychomaniak@18852 95 cd $1/usr/lib
psychomaniak@18852 96 for i in $(ls libGL.so*) ; do mv -f $i ${i//-.-/.} ; done
psychomaniak@18852 97
al@18734 98 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
al@18734 99
mojo@11768 100 # correct .desktop file file
pascal@18730 101 sed -i 's:__UTILS_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
pascal@18730 102 sed -i 's:__PIXMAP_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
al@18734 103
al@18734 104 title "NVIDIA LICENSE INFORMATION"
mojo@11768 105 echo "For installing this package, you have to accept the $PACKAGE license."
al@18734 106 echo "The license is stored in /usr/share/licenses/$PACKAGE "
al@18734 107 echo -n "Would you like to read the license (y/N) : "; read anser
al@18734 108 if [ "$anser" == 'y' ]; then
al@18734 109 more "$1/usr/share/licenses/$PACKAGE/LICENSE"
al@18734 110 newline
mojo@11768 111 fi
al@18734 112 separator
al@18734 113 echo -n 'Do you accept the license (y/N) : '; read anser
al@18734 114 if [ "$anser" == 'N' ]; then
al@18734 115 echo 'You did not accept the license, Removing the pkg.'
al@18734 116 tazpkg remove "$PACKAGE"
mojo@11768 117 fi
mojo@11768 118 }