wok-next view nvidia-173xx/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | f48456621a9d |
children | d457c4e37c1b |
line source
1 # SliTaz package receipt.
3 PACKAGE="nvidia-173xx"
4 VERSION="173.14.39"
5 EXTRAVERSION="_$kvers"
6 CATEGORY="non-free"
7 MAINTAINER="devel@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"
18 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz"
20 compile_rules() {
21 cd $src/usr/src/nv/
22 sed -i 's|.*utsname.*|&\n#include <linux/acpi.h>|' nv-linux.h
23 # Only use .unblocked_ioctl since 2.6.36
24 sed -i 's|\.ioctl|// &|' nv.c
25 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/'
26 xz nvidia.ko
27 }
29 genpkg_rules() {
30 mkdir -p \
31 $fs/usr/share \
32 $fs/usr/lib/X11 \
33 $fs/usr/share/licenses/$PACKAGE \
34 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video \
35 $fs/usr/share/doc/$PACKAGE
37 cp $src/usr/src/nv/nvidia.ko.xz \
38 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/
39 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
40 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
42 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE
43 cp -a $src/usr/bin $fs/usr
44 cp -a $src/nvidia-installer $fs/usr/bin
45 cp -a $src/usr/lib/*.so* $fs/usr/lib/
46 cp -a $src/usr/lib/tls $fs/usr/lib/
47 cp -a $src/usr/X11R6/lib/libXvMCNVIDIA.so.$VERSION $fs/usr/lib
48 cp -a $src/usr/X11R6/lib/modules $fs/usr/lib/X11/
49 cp -a $src/usr/share/applications $fs/usr/share
50 cp -a $src/usr/share/pixmaps $fs/usr/share
51 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
52 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11
54 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so
55 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so.1
56 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so
57 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so.1
59 # exclude from files.list (for tazpkg's "find-depends")
60 cd $fs/usr/lib
61 for i in $(ls libGL.so*); do
62 mv -f $i ${i//./-.-}
63 done
65 ln -s libGLcore.so.$VERSION $fs/usr/lib/libGLcore.so.1
66 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so
67 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so.1
68 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/libnvidia-tls.so.1
69 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/tls/libnvidia-tls.so.1
70 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so.1
71 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so
72 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so.1
73 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so
74 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so
75 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so.1
76 ln -s libglx.so.$VERSION $fs/usr/lib/X11/modules/extensions/libglx.so
78 DEPENDS="linux xorg-server gtk2 cairo linux-agp xorg-libXv"
79 PROVIDE="nvidia mesa"
80 TAGS="driver graphic video"
81 }
83 pre_install() {
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 # Restore excluded from files.list (for tazpkg's "find-depends")
92 cd $1/usr/lib
93 for i in $(ls libGL.so*); do
94 mv -f $i ${i//-.-/.}
95 done
97 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
99 # correct .desktop file file
100 sed -i 's:__UTILS_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
101 sed -i 's:__PIXMAP_PATH__/::' "$1/usr/share/applications/nvidia-settings.desktop"
103 title "NVIDIA LICENSE INFORMATION"
104 echo "For installing this package, you have to accept the $PACKAGE license."
105 echo "The license is stored in /usr/share/licenses/$PACKAGE "
106 echo -n "Would you like to read the license (y/N) : "; read anser
107 if [ "$anser" == 'y' ]; then
108 more "$1/usr/share/licenses/$PACKAGE/LICENSE"
109 newline
110 fi
111 separator
112 echo -n 'Do you accept the license (y/N) : '; read anser
113 if [ "$anser" == 'N' ]; then
114 echo 'You did not accept the license, Removing the pkg.'
115 tazpkg remove "$PACKAGE"
116 fi
117 }