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