wok-next view nvidia-173xx/receipt @ rev 15584
Add some licenses
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Nov 30 17:02:58 2013 +0000 (2013-11-30) |
parents | 9b6bb1d6033f |
children | 164fcaca1cd0 |
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 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"
16 DEPENDS="linux xorg-server gtk+ cairo linux-agp xorg-libXv"
17 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz"
19 # Rules to configure and make the package.
21 compile_rules()
22 {
23 cd $src/usr/src/nv/
24 # Only use .unblocked_ioctl since 2.6.36
25 sed -i 's|\.ioctl|// &|' nv.c
26 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/'
27 }
29 # Rules to gen a SliTaz package suitable for Tazpkg.
30 genpkg_rules()
31 {
32 EXTRAVERSION=_${kvers%.*}
34 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE \
35 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video \
36 $fs/usr/share/doc/$PACKAGE
38 # Compress and install module
39 cp $src/usr/src/nv/nvidia.ko \
40 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/
41 xz $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko
42 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
43 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
45 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE
46 cp -a $src/usr/bin $fs/usr
47 cp -a $src/nvidia-installer $fs/usr/bin
48 cp -a $src/usr/lib/*.so* $fs/usr/lib/
49 cp -a $src/usr/lib/tls $fs/usr/lib/
50 cp -a $src/usr/X11R6/lib/libXvMCNVIDIA.so.$VERSION $fs/usr/lib
51 cp -a $src/usr/X11R6/lib/modules $fs/usr/lib/X11/
52 cp -a $src/usr/share/applications $fs/usr/share
53 cp -a $src/usr/share/pixmaps $fs/usr/share
54 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
55 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11
57 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so
58 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so.1
59 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so
60 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so.1
61 ln -s libGLcore.so.$VERSION $fs/usr/lib/libGLcore.so.1
62 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so
63 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so.1
64 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/libnvidia-tls.so.1
65 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/tls/libnvidia-tls.so.1
66 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so.1
67 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so
68 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so.1
69 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so
70 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so
71 ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so.1
72 ln -s libglx.so.$VERSION $fs/usr/lib/X11/modules/extensions/libglx.so
73 }
75 pre_install()
76 {
77 echo ""
78 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
79 echo "================================================================================"
80 echo "You are installing a package with proprietary license."
81 echo "You must accept the license."
82 echo "================================================================================"
83 echo ""
85 }
87 post_install()
88 {
89 echo "Processing post-install commands..."
90 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
92 # correct .desktop file file
93 sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
94 sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
96 echo ""
97 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2"
98 echo "================================================================================"
99 echo "For installing this package, you have to accept the $PACKAGE license."
100 echo "The license is stored in /usr/share/licenses/$PACKAGE "
101 echo -n "Would you like to read the license (y/N) : "; read anser
102 if [ "$anser" = "y" ]; then
103 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more
104 echo ""
105 fi
106 echo "================================================================================"
107 echo -n "Do you accept the license (y/N) : "; read anser
108 if [ "$anser" = "N" ]; then
109 echo "You did not accept the license, Removing the pkg."
110 tazpkg remove "$PACKAGE"
111 fi
113 }
115 post_remove()
116 {
117 echo "Processing post-remove commands..."
118 depmod -a
119 }
121 TAZBB_NO_INSTALL="because this is not hardware neutral"