wok-current annotate nvidia-173xx/receipt @ rev 25535
updated imlib2 and imlib2-dev 1.8.0 -> 1.10.0
author | Hans-G?nter Theisgen |
---|---|
date | Thu Mar 02 09:40:16 2023 +0100 (22 months ago) |
parents | d7522d21c4d3 |
children |
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)" |
pascal@25438 | 9 WEB_SITE="https://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 |
pascal@24500 | 20 # What is the latest version available today? |
pascal@24500 | 21 current_version() |
pascal@24500 | 22 { |
pascal@24500 | 23 wget -O - ${WGET_URL%/*/*}/ 2>/dev/null | \ |
pascal@24500 | 24 sed '/173.[0-9]/!d;s|.*>173|173|;s|/.*||' | sort -Vr | sed q |
pascal@24500 | 25 } |
pascal@24500 | 26 |
mojo@11768 | 27 # Rules to configure and make the package. |
mojo@11768 | 28 |
mojo@11768 | 29 compile_rules() |
mojo@11768 | 30 { |
mojo@11768 | 31 cd $src/usr/src/nv/ |
pascal@20396 | 32 sed -i 's|.*utsname.*|&\n#include <linux/acpi.h>|' nv-linux.h |
pascal@20212 | 33 sed -i 's|uname -m|echo i486|' Makefile* |
mojo@11768 | 34 # Only use .unblocked_ioctl since 2.6.36 |
mojo@11768 | 35 sed -i 's|\.ioctl|// &|' nv.c |
mojo@11768 | 36 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' |
pascal@15587 | 37 xz nvidia.ko |
mojo@11768 | 38 } |
al@18734 | 39 |
mojo@11768 | 40 # Rules to gen a SliTaz package suitable for Tazpkg. |
mojo@11768 | 41 genpkg_rules() |
al@18734 | 42 { |
pankso@15855 | 43 EXTRAVERSION=_${kvers} |
al@18734 | 44 |
al@18734 | 45 mkdir -p \ |
al@18734 | 46 $fs/usr/share \ |
al@18734 | 47 $fs/usr/lib/X11 \ |
al@18734 | 48 $fs/usr/share/licenses/$PACKAGE \ |
al@18734 | 49 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video \ |
al@18734 | 50 $fs/usr/share/doc/$PACKAGE |
al@18734 | 51 |
pascal@15587 | 52 cp $src/usr/src/nv/nvidia.ko.xz \ |
al@18734 | 53 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/ |
pascal@13278 | 54 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz |
al@18734 | 55 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz |
al@18734 | 56 |
mojo@11768 | 57 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE |
mojo@11768 | 58 cp -a $src/usr/bin $fs/usr |
mojo@11768 | 59 cp -a $src/nvidia-installer $fs/usr/bin |
mojo@11768 | 60 cp -a $src/usr/lib/*.so* $fs/usr/lib/ |
mojo@11768 | 61 cp -a $src/usr/lib/tls $fs/usr/lib/ |
al@18734 | 62 cp -a $src/usr/X11R6/lib/libXvMCNVIDIA.so.$VERSION $fs/usr/lib |
al@18734 | 63 cp -a $src/usr/X11R6/lib/modules $fs/usr/lib/X11/ |
al@18734 | 64 cp -a $src/usr/share/applications $fs/usr/share |
mojo@11768 | 65 cp -a $src/usr/share/pixmaps $fs/usr/share |
mojo@11768 | 66 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/ |
mojo@11768 | 67 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11 |
mojo@11768 | 68 |
al@18734 | 69 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so |
mojo@11768 | 70 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so.1 |
mojo@11768 | 71 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so |
mojo@11768 | 72 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so.1 |
psychomaniak@18852 | 73 # exclude from files.list (for tazpkg's "find-depends") |
psychomaniak@18852 | 74 cd $fs/usr/lib |
psychomaniak@18852 | 75 for i in $(ls libGL.so*) ; do mv -f $i ${i//./-.-} ; done |
psychomaniak@18852 | 76 |
mojo@11768 | 77 ln -s libGLcore.so.$VERSION $fs/usr/lib/libGLcore.so.1 |
mojo@11768 | 78 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so |
mojo@11768 | 79 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so.1 |
mojo@11768 | 80 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/libnvidia-tls.so.1 |
mojo@11768 | 81 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/tls/libnvidia-tls.so.1 |
mojo@11768 | 82 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so.1 |
mojo@11768 | 83 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so |
mojo@11768 | 84 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so.1 |
mojo@11768 | 85 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so |
mojo@11768 | 86 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so |
mojo@11768 | 87 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so.1 |
al@18734 | 88 ln -s libglx.so.$VERSION $fs/usr/lib/X11/modules/extensions/libglx.so |
mojo@11768 | 89 } |
mojo@11768 | 90 |
mojo@11768 | 91 pre_install() |
mojo@11768 | 92 { |
al@18734 | 93 title "PROPRIETARY LICENSE" |
mojo@11768 | 94 echo "You are installing a package with proprietary license." |
mojo@11768 | 95 echo "You must accept the license." |
al@18734 | 96 footer |
mojo@11768 | 97 } |
mojo@11768 | 98 |
mojo@11768 | 99 post_install() |
mojo@11768 | 100 { |
psychomaniak@18852 | 101 # Restore excluded from files.list (for tazpkg's "find-depends") |
psychomaniak@18852 | 102 cd $1/usr/lib |
psychomaniak@18852 | 103 for i in $(ls libGL.so*) ; do mv -f $i ${i//-.-/.} ; done |
psychomaniak@18852 | 104 |
al@18734 | 105 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz |
al@18734 | 106 |
mojo@11768 | 107 # correct .desktop file file |
pascal@18730 | 108 sed -i 's:__UTILS_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop" |
pascal@18730 | 109 sed -i 's:__PIXMAP_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop" |
al@18734 | 110 |
al@18734 | 111 title "NVIDIA LICENSE INFORMATION" |
mojo@11768 | 112 echo "For installing this package, you have to accept the $PACKAGE license." |
al@18734 | 113 echo "The license is stored in /usr/share/licenses/$PACKAGE " |
al@18734 | 114 echo -n "Would you like to read the license (y/N) : "; read anser |
pascal@20892 | 115 if [ "$anser" = 'y' ]; then |
al@18734 | 116 more "$1/usr/share/licenses/$PACKAGE/LICENSE" |
al@18734 | 117 newline |
mojo@11768 | 118 fi |
al@18734 | 119 separator |
al@18734 | 120 echo -n 'Do you accept the license (y/N) : '; read anser |
pascal@20892 | 121 if [ "$anser" = 'N' ]; then |
al@18734 | 122 echo 'You did not accept the license, Removing the pkg.' |
al@18734 | 123 tazpkg remove "$PACKAGE" |
mojo@11768 | 124 fi |
mojo@11768 | 125 } |