wok-4.x view nvidia/receipt @ rev 7314
Up: xorg-xinit to 1.3.0.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Nov 17 17:37:52 2010 +0000 (2010-11-17) |
parents | 96f8f0d779a5 |
children | 5d335118e140 |
line source
1 # SliTaz package receipt.
3 PACKAGE="nvidia"
4 VERSION="195.36.15"
5 CATEGORY="x-window"
6 MAINTAINER="jozee@slitaz.org"
7 SHORT_DESC="NVIDIA drivers (non-free)"
8 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm"
9 BUILD_DEPENDS="$DEPENDS"
10 WEB_SITE="http://www.nvidia.com/"
11 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg0"
12 TARBALL="${SOURCE}.run"
13 TAGS="drivers graphic video"
15 # Rules to configure and make the package.
17 compile_rules() {
18 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
19 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL"
21 [ -d $WOK/linux/taz ] || tazwok cook linux
23 cd $WOK/$PACKAGE
24 [ -f $SOURCES_REPOSITORY/$TARBALL ] || wget $WGET_URL -P $SOURCES_REPOSITORY
26 chmod +x $SOURCES_REPOSITORY/$TARBALL
27 sh $SOURCES_REPOSITORY/$TARBALL --extract-only
29 cd $SOURCE/usr/src/nv/
30 make SYSSRC="$WOK/linux/linux-$KERNEL_VERSION" module
31 }
33 # Rules to gen a SliTaz package suitable for Tazpkg.
34 genpkg_rules()
35 {
36 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
37 EXTRAVERSION=_$KERNEL_VERSION
38 _pkg="$WOK/$PACKAGE/$SOURCE"
40 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE \
41 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video \
42 $fs/usr/share/doc/$PACKAGE
44 # Compress and install module
45 lzma e $_pkg/usr/src/nv/nvidia.ko \
46 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
47 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
48 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
50 cp -a $_pkg/LICENSE $fs/usr/share/licenses/$PACKAGE
51 cp -a $_pkg/usr/bin $fs/usr
52 cp -a $_pkg/nvidia-installer $fs/usr/bin
53 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib/
54 cp -a $_pkg/usr/lib/tls $fs/usr/lib/
55 cp -a $_pkg/usr/share/pixmaps $fs/usr/share
56 cp -a $_pkg/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
57 cp -a $_pkg/usr/X11R6/lib/* $fs/usr/lib/X11
59 cd $fs/usr/lib/X11/modules/extensions
60 ln -s libglx.so.$VERSION libglx.so
62 cd $fs/usr/lib/
63 ln -s libGL.so.$VERSION libGL.so
64 ln -s libGL.so.$VERSION libGL.so.1
65 ln -s libGLcore.so.$VERSION libGLcore.so.1
66 ln -s libnvidia-cfg.so.$VERSION libnvidia-cfg.so.1
67 ln -s libnvidia-tls.so.$VERSION libnvidia-tls.so.1
68 ln -s libcuda.so.$VERSION libcuda.so.1
69 ln -s libcuda.so.$VERSION libcuda.so
70 ln -s libvdpau.so.$VERSION libvdpau.so.1
71 ln -s libvdpau_nvidia.so.$VERSION libvdpau_nvidia.so.1
73 cd $fs/usr/lib/X11
74 ln -s libXvMCNVIDIA.so.$VERSION libXvMCNVIDIA_dynamic.so.1
76 }
78 pre_install()
79 {
80 echo ""
81 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
82 echo "================================================================================"
83 echo "You are installing a package with proprietary license."
84 echo "You must accept the license."
85 echo "================================================================================"
86 echo ""
88 }
90 post_install()
91 {
92 echo "Processing post-install commands..."
93 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
95 # correct .desktop file file
96 sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
97 sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
99 echo ""
100 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2"
101 echo "================================================================================"
102 echo "For installing this package, you have to accept the $PACKAGE license."
103 echo "The license is stored in /usr/share/licenses/$PACKAGE "
104 echo -n "Would you like to read the license (y/N) : "; read anser
105 if [ "$anser" = "y" ]; then
106 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more
107 echo ""
108 fi
109 echo "================================================================================"
110 echo -n "Do you accept the license (y/N) : "; read anser
111 if [ "$anser" = "N" ]; then
112 echo "You did not accept the license, Removing the pkg."
113 tazpkg remove "$PACKAGE"
114 fi
116 }
118 post_remove()
119 {
120 echo "Processing post-remove commands..."
121 depmod -a
122 }
124 TAZBB_NO_INSTALL="because this is not hardware neutral"