wok view nvidia/receipt @ rev 5013

tazbb: add TAZBB_NO_INSTALL support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 01 13:06:49 2010 +0100 (2010-03-01)
parents 5b44af8c1257
children 5e3273070c54
line source
1 # SliTaz package receipt.
3 PACKAGE="nvidia"
4 VERSION="190.42"
5 CATEGORY="network"
6 MAINTAINER="jozee@slitaz.org"
7 SHORT_DESC="NVIDIA drivers (non-free)"
8 DEPENDS="linux xorg-server gtk+ cairo-xcb"
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
43 # Compress and install module
44 lzma e $_pkg/usr/src/nv/nvidia.ko \
45 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
46 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
47 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
49 cp -a $_pkg/LICENSE $fs/usr/share/licenses/$PACKAGE
50 cp -a $_pkg/usr/bin $fs/usr
51 cp -a $_pkg/nvidia-installer $fs/usr/bin
52 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib/
53 cp -a $_pkg/usr/lib/tls $fs/usr/lib/
54 cp -a $_pkg/usr/share/pixmaps $fs/usr/share
55 cp -a $_pkg/usr/share/doc $fs/usr/share
56 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 echo ""
79 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2"
80 echo "================================================================================"
81 echo "For installing this package, you have to accept the $PACKAGE license."
82 echo "The license is stored in /usr/share/licenses/$PACKAGE "
83 echo -n "Would you like to read the license (y/N) : "; read anser
84 if [ "$anser" = "y" ]; then
85 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more
86 echo ""
87 fi
88 echo "================================================================================"
89 echo -n "Do you accept the license (y/N) : "; read anser
90 if [ "$anser" = "N" ]; then
91 echo "You did not accept the license, Removing the pkg."
92 tazpkg remove "$PACKAGE"
93 fi
95 }
97 post_remove()
98 {
99 echo "Processing post-remove commands..."
100 depmod -a
101 }
103 TAZBB_NO_INSTALL="because this is not hardware neutral"