wok-6.x view nvidia/receipt @ rev 10807
python: add BUILD_DEPENDS
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Jun 05 00:58:57 2011 +0200 (2011-06-05) |
parents | a894aa42f46b |
children |
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 WEB_SITE="http://www.nvidia.com/"
9 SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg0"
10 TARBALL="${SOURCE}.run"
11 WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL"
12 TAGS="drivers graphic video"
13 RUN_OPTS="--extract-only"
15 DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm"
16 BUILD_DEPENDS="linux-module-headers coreutils-file-summarize"
18 # 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 \
33 $fs/usr/share/licenses/$PACKAGE \
34 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video \
35 $fs/usr/share/doc/$PACKAGE
37 # Compress and install module
38 echo "Compressing nvidia.ko module..."
39 lzma e $src/usr/src/nv/nvidia.ko \
40 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.gz
41 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/*.ko.gz
42 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/*.ko.gz
44 echo "Installing files in pkg fs..."
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/share/pixmaps $fs/usr/share
51 cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/
52 cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11
54 echo "Creating libraries symlinks..."
55 ln -s libglx.so.$VERSION $fs/usr/lib/X11/modules/extensions/libglx.so
56 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so
57 ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so.1
58 ln -s libGLcore.so.$VERSION $fs/usr/lib/libGLcore.so.1
59 ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so.1
60 ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/libnvidia-tls.so.1
61 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so.1
62 ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so
63 ln -s libvdpau.so.$VERSION $fs/usr/lib/libvdpau.so.1
64 ln -s libvdpau_nvidia.so.$VERSION $fs/usr/lib/libvdpau_nvidia.so.1
65 ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/X11/libXvMCNVIDIA_dynamic.so.1
66 }
68 pre_install()
69 {
70 echo ""
71 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
72 echo "================================================================================"
73 echo "You are installing a package with proprietary license."
74 echo "You must accept the license."
75 echo "================================================================================"
76 echo ""
77 }
79 post_install()
80 {
81 echo "Processing post-install commands..."
82 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
84 # correct .desktop file file
85 sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
86 sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
88 echo ""
89 echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2"
90 echo "================================================================================"
91 echo "For installing this package, you have to accept the $PACKAGE license."
92 echo "The license is stored in /usr/share/licenses/$PACKAGE "
93 if [ "$(tty)" != "not a tty" -a "$step_running" !=
94 "Looking for build dependencies" ]; then
95 echo -n "Would you like to read the license (y/N) : "; read anser
96 if [ "$anser" = "y" ]; then
97 more < /usr/share/licenses/"$PACKAGE"/LICENSE
98 echo ""
99 fi
100 echo "================================================================================"
101 echo -n "Do you accept the license (y/N) : "; read anser
102 if [ "$anser" = "N" ]; then
103 echo "You did not accept the license, Removing the pkg."
104 tazpkg remove "$PACKAGE"
105 fi
106 fi
107 }
109 post_remove()
110 {
111 echo "Processing post-remove commands..."
112 depmod -a
113 }