wok-undigest view nvidia-173xx/receipt @ rev 453
fbvnc: fix compile_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 07 22:42:53 2011 +0200 (2011-09-07) |
parents | a7c7f0ab7a40 |
children | 4d10cce9d421 |
line source
1 # SliTaz package receipt.
3 PACKAGE="nvidia-173xx"
4 VERSION="173.14.25"
5 CATEGORY="network"
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}-pkg0"
10 TARBALL="${SOURCE}.run"
11 RUN_OPTS="--extract-only"
12 TAGS="drivers graphic video"
14 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm"
15 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize"
17 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src/usr/src/nv/
22 # Only use .unblocked_ioctl since 2.6.36
23 sed -i 's|\.ioctl|// &|' nv.c
24 make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/'
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 EXTRAVERSION=_${kvers}
32 mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE \
33 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video \
34 $fs/usr/share/doc/$PACKAGE
36 # Compress and install module
37 lzma e $src/usr/src/nv/nvidia.ko \
38 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
39 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
40 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/nvidia.ko.gz
42 cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE
43 cp -a $src/usr/bin $fs/usr
44 cp -a $src/nvidia-installer $fs/usr/bin
45 cp -a $src/usr/lib/*.so* $fs/usr/lib/
46 cp -a $src/usr/lib/tls $fs/usr/lib/
47 cp -a $src/usr/share/pixmaps $fs/usr/share
48 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
49 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11
51 }
53 pre_install()
54 {
55 echo ""
56 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
57 echo "================================================================================"
58 echo "You are installing a package with proprietary license."
59 echo "You must accept the license."
60 echo "================================================================================"
61 echo ""
63 }
65 post_install()
66 {
67 echo "Processing post-install commands..."
68 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
70 # correct .desktop file file
71 sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
72 sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
74 echo ""
75 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2"
76 echo "================================================================================"
77 echo "For installing this package, you have to accept the $PACKAGE license."
78 echo "The license is stored in /usr/share/licenses/$PACKAGE "
79 echo -n "Would you like to read the license (y/N) : "; read anser
80 if [ "$anser" = "y" ]; then
81 cat /usr/share/licenses/"$PACKAGE"/LICENSE | more
82 echo ""
83 fi
84 echo "================================================================================"
85 echo -n "Do you accept the license (y/N) : "; read anser
86 if [ "$anser" = "N" ]; then
87 echo "You did not accept the license, Removing the pkg."
88 tazpkg remove "$PACKAGE"
89 fi
91 }
93 post_remove()
94 {
95 echo "Processing post-remove commands..."
96 depmod -a
97 }
99 TAZBB_NO_INSTALL="because this is not hardware neutral"