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