wok view nvidia/receipt @ rev 5480
Fix VERSION in ruby to be 1.9.1-p378.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu May 06 02:11:33 2010 +0000 (2010-05-06) |
parents | ec066bd77049 |
children | 8c58aa3d62a3 |
line source
1 # SliTaz package receipt.
3 PACKAGE="nvidia"
4 VERSION="195.36.15"
5 CATEGORY="network"
6 MAINTAINER="jozee@slitaz.org"
7 SHORT_DESC="NVIDIA drivers (non-free)"
8 DEPENDS="linux xorg-server gtk+ cairo linux-agp"
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 $TARBALL ] || wget $WGET_URL
26 chmod +x $TARBALL
27 sh $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 }
61 pre_install()
62 {
63 echo ""
64 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
65 echo "================================================================================"
66 echo "You are installing a package with proprietary license."
67 echo "You must accept the license."
68 echo "================================================================================"
69 echo ""
71 }
73 post_install()
74 {
75 echo "Processing post-install commands..."
76 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
78 # correct .desktop file file
79 sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
80 sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
82 echo ""
83 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2"
84 echo "================================================================================"
85 echo "For installing this package, you have to accept the $PACKAGE license."
86 echo "The license is stored in /usr/share/licenses/$PACKAGE "
87 echo -n "Would you like to read the license (y/N) : "; read anser
88 if [ "$anser" = "y" ]; then
89 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more
90 echo ""
91 fi
92 echo "================================================================================"
93 echo -n "Do you accept the license (y/N) : "; read anser
94 if [ "$anser" = "N" ]; then
95 echo "You did not accept the license, Removing the pkg."
96 tazpkg remove "$PACKAGE"
97 fi
99 }
101 post_remove()
102 {
103 echo "Processing post-remove commands..."
104 depmod -a
105 }
107 TAZBB_NO_INSTALL="because this is not hardware neutral"