wok-current view nvidia-173xx/receipt @ rev 25185

mplayer: added dependency ffmpeg
author Hans-G?nter Theisgen
date Tue Jul 12 09:50:00 2022 +0100 (2022-07-12)
parents 02c70d036ea0
children 8ea0030e77cb
line source
1 # SliTaz package receipt.
3 PACKAGE="nvidia-173xx"
4 VERSION="173.14.39"
5 CATEGORY="non-free"
6 MAINTAINER="jozee@slitaz.org"
7 LICENSE="other"
8 SHORT_DESC="NVIDIA drivers (non-free)"
9 WEB_SITE="http://www.nvidia.com/"
10 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg1"
11 TARBALL="${SOURCE}.run"
12 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL"
13 RUN_OPTS="--extract-only"
14 TAGS="driver graphic video"
15 PROVIDE="nvidia mesa"
17 DEPENDS="linux xorg-server gtk+ cairo linux-agp xorg-libXv"
18 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz"
20 # What is the latest version available today?
21 current_version()
22 {
23 wget -O - ${WGET_URL%/*/*}/ 2>/dev/null | \
24 sed '/173.[0-9]/!d;s|.*>173|173|;s|/.*||' | sort -Vr | sed q
25 }
27 # Rules to configure and make the package.
29 compile_rules()
30 {
31 cd $src/usr/src/nv/
32 sed -i 's|.*utsname.*|&\n#include <linux/acpi.h>|' nv-linux.h
33 sed -i 's|uname -m|echo i486|' Makefile*
34 # Only use .unblocked_ioctl since 2.6.36
35 sed -i 's|\.ioctl|// &|' nv.c
36 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/'
37 xz nvidia.ko
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 EXTRAVERSION=_${kvers}
45 mkdir -p \
46 $fs/usr/share \
47 $fs/usr/lib/X11 \
48 $fs/usr/share/licenses/$PACKAGE \
49 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video \
50 $fs/usr/share/doc/$PACKAGE
52 cp $src/usr/src/nv/nvidia.ko.xz \
53 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/
54 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
55 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
57 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE
58 cp -a $src/usr/bin $fs/usr
59 cp -a $src/nvidia-installer $fs/usr/bin
60 cp -a $src/usr/lib/*.so* $fs/usr/lib/
61 cp -a $src/usr/lib/tls $fs/usr/lib/
62 cp -a $src/usr/X11R6/lib/libXvMCNVIDIA.so.$VERSION $fs/usr/lib
63 cp -a $src/usr/X11R6/lib/modules $fs/usr/lib/X11/
64 cp -a $src/usr/share/applications $fs/usr/share
65 cp -a $src/usr/share/pixmaps $fs/usr/share
66 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
67 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11
69 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so
70 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so.1
71 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so
72 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so.1
73 # exclude from files.list (for tazpkg's "find-depends")
74 cd $fs/usr/lib
75 for i in $(ls libGL.so*) ; do mv -f $i ${i//./-.-} ; done
77 ln -s libGLcore.so.$VERSION $fs/usr/lib/libGLcore.so.1
78 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so
79 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so.1
80 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/libnvidia-tls.so.1
81 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/tls/libnvidia-tls.so.1
82 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so.1
83 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so
84 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so.1
85 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so
86 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so
87 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so.1
88 ln -s libglx.so.$VERSION $fs/usr/lib/X11/modules/extensions/libglx.so
89 }
91 pre_install()
92 {
93 title "PROPRIETARY LICENSE"
94 echo "You are installing a package with proprietary license."
95 echo "You must accept the license."
96 footer
97 }
99 post_install()
100 {
101 # Restore excluded from files.list (for tazpkg's "find-depends")
102 cd $1/usr/lib
103 for i in $(ls libGL.so*) ; do mv -f $i ${i//-.-/.} ; done
105 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
107 # correct .desktop file file
108 sed -i 's:__UTILS_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
109 sed -i 's:__PIXMAP_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
111 title "NVIDIA LICENSE INFORMATION"
112 echo "For installing this package, you have to accept the $PACKAGE license."
113 echo "The license is stored in /usr/share/licenses/$PACKAGE "
114 echo -n "Would you like to read the license (y/N) : "; read anser
115 if [ "$anser" = 'y' ]; then
116 more "$1/usr/share/licenses/$PACKAGE/LICENSE"
117 newline
118 fi
119 separator
120 echo -n 'Do you accept the license (y/N) : '; read anser
121 if [ "$anser" = 'N' ]; then
122 echo 'You did not accept the license, Removing the pkg.'
123 tazpkg remove "$PACKAGE"
124 fi
125 }