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