wok-6.x view nvidia-173xx/receipt @ rev 13180
Up: git to 1.7.11.4.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Aug 01 07:35:59 2012 +0000 (2012-08-01) |
parents | 184f3daf3b55 |
children | ab6b8c6c469c |
line source
1 # SliTaz package receipt.
3 PACKAGE="nvidia-173xx"
4 VERSION="173.14.31"
5 CATEGORY="non-free"
6 MAINTAINER="jozee@slitaz.org"
7 SHORT_DESC="NVIDIA drivers (non-free)"
8 WEB_SITE="http://www.nvidia.com/"
9 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg1"
10 TARBALL="${SOURCE}.run"
11 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL"
12 RUN_OPTS="--extract-only"
13 TAGS="drivers graphic video"
15 DEPENDS="linux xorg-server gtk+ cairo linux-agp xorg-libXv"
16 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize"
18 # Rules to configure and make the package.
20 compile_rules()
21 {
22 cd $src/usr/src/nv/
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 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 EXTRAVERSION=_${kvers%.*}
33 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE \
34 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video \
35 $fs/usr/share/doc/$PACKAGE
37 # Compress and install module
38 lzma e $src/usr/src/nv/nvidia.ko \
39 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.gz
40 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.gz
41 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.gz
43 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE
44 cp -a $src/usr/bin $fs/usr
45 cp -a $src/nvidia-installer $fs/usr/bin
46 cp -a $src/usr/lib/*.so* $fs/usr/lib/
47 cp -a $src/usr/lib/tls $fs/usr/lib/
48 cp -a $src/usr/X11R6/lib/libXvMCNVIDIA.so.$VERSION $fs/usr/lib
49 cp -a $src/usr/X11R6/lib/modules $fs/usr/lib/X11/
50 cp -a $src/usr/share/applications $fs/usr/share
51 cp -a $src/usr/share/pixmaps $fs/usr/share
52 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
53 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11
55 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so
56 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so.1
57 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so
58 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so.1
59 ln -s libGLcore.so.$VERSION $fs/usr/lib/libGLcore.so.1
60 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so
61 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so.1
62 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/libnvidia-tls.so.1
63 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/tls/libnvidia-tls.so.1
64 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so.1
65 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so
66 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so.1
67 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so
68 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so
69 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so.1
70 ln -s libglx.so.$VERSION $fs/usr/lib/X11/modules/extensions/libglx.so
71 }
73 pre_install()
74 {
75 echo ""
76 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
77 echo "================================================================================"
78 echo "You are installing a package with proprietary license."
79 echo "You must accept the license."
80 echo "================================================================================"
81 echo ""
83 }
85 post_install()
86 {
87 echo "Processing post-install commands..."
88 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
90 # correct .desktop file file
91 sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
92 sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
94 echo ""
95 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2"
96 echo "================================================================================"
97 echo "For installing this package, you have to accept the $PACKAGE license."
98 echo "The license is stored in /usr/share/licenses/$PACKAGE "
99 echo -n "Would you like to read the license (y/N) : "; read anser
100 if [ "$anser" = "y" ]; then
101 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more
102 echo ""
103 fi
104 echo "================================================================================"
105 echo -n "Do you accept the license (y/N) : "; read anser
106 if [ "$anser" = "N" ]; then
107 echo "You did not accept the license, Removing the pkg."
108 tazpkg remove "$PACKAGE"
109 fi
111 }
113 post_remove()
114 {
115 echo "Processing post-remove commands..."
116 depmod -a
117 }
119 TAZBB_NO_INSTALL="because this is not hardware neutral"