wok view nvidia-173xx/receipt @ rev 20719

updated apulse (0.1.10 -> 0.1.12)
author Hans-G?nter Theisgen
date Fri Feb 08 14:58:54 2019 +0100 (2019-02-08)
parents 3705d68ed8f3
children 02c70d036ea0
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 # Rules to configure and make the package.
22 compile_rules()
23 {
24 cd $src/usr/src/nv/
25 sed -i 's|.*utsname.*|&\n#include <linux/acpi.h>|' nv-linux.h
26 sed -i 's|uname -m|echo i486|' Makefile*
27 # Only use .unblocked_ioctl since 2.6.36
28 sed -i 's|\.ioctl|// &|' nv.c
29 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/'
30 xz nvidia.ko
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 EXTRAVERSION=_${kvers}
38 mkdir -p \
39 $fs/usr/share \
40 $fs/usr/lib/X11 \
41 $fs/usr/share/licenses/$PACKAGE \
42 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video \
43 $fs/usr/share/doc/$PACKAGE
45 cp $src/usr/src/nv/nvidia.ko.xz \
46 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/
47 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
48 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
50 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE
51 cp -a $src/usr/bin $fs/usr
52 cp -a $src/nvidia-installer $fs/usr/bin
53 cp -a $src/usr/lib/*.so* $fs/usr/lib/
54 cp -a $src/usr/lib/tls $fs/usr/lib/
55 cp -a $src/usr/X11R6/lib/libXvMCNVIDIA.so.$VERSION $fs/usr/lib
56 cp -a $src/usr/X11R6/lib/modules $fs/usr/lib/X11/
57 cp -a $src/usr/share/applications $fs/usr/share
58 cp -a $src/usr/share/pixmaps $fs/usr/share
59 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
60 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11
62 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so
63 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so.1
64 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so
65 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so.1
66 # exclude from files.list (for tazpkg's "find-depends")
67 cd $fs/usr/lib
68 for i in $(ls libGL.so*) ; do mv -f $i ${i//./-.-} ; done
70 ln -s libGLcore.so.$VERSION $fs/usr/lib/libGLcore.so.1
71 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so
72 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so.1
73 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/libnvidia-tls.so.1
74 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/tls/libnvidia-tls.so.1
75 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so.1
76 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so
77 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so.1
78 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so
79 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so
80 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so.1
81 ln -s libglx.so.$VERSION $fs/usr/lib/X11/modules/extensions/libglx.so
82 }
84 pre_install()
85 {
86 title "PROPRIETARY LICENSE"
87 echo "You are installing a package with proprietary license."
88 echo "You must accept the license."
89 footer
90 }
92 post_install()
93 {
94 # Restore excluded from files.list (for tazpkg's "find-depends")
95 cd $1/usr/lib
96 for i in $(ls libGL.so*) ; do mv -f $i ${i//-.-/.} ; done
98 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
100 # correct .desktop file file
101 sed -i 's:__UTILS_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
102 sed -i 's:__PIXMAP_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
104 title "NVIDIA LICENSE INFORMATION"
105 echo "For installing this package, you have to accept the $PACKAGE license."
106 echo "The license is stored in /usr/share/licenses/$PACKAGE "
107 echo -n "Would you like to read the license (y/N) : "; read anser
108 if [ "$anser" == 'y' ]; then
109 more "$1/usr/share/licenses/$PACKAGE/LICENSE"
110 newline
111 fi
112 separator
113 echo -n 'Do you accept the license (y/N) : '; read anser
114 if [ "$anser" == 'N' ]; then
115 echo 'You did not accept the license, Removing the pkg.'
116 tazpkg remove "$PACKAGE"
117 fi
118 }