wok-6.x rev 11768
nvdia-173xx: moved from undigest
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Wed Feb 22 23:24:06 2012 +0000 (2012-02-22) |
parents | 605079172258 |
children | 8abb690cb86e |
files | nvidia-173xx/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/nvidia-173xx/receipt Wed Feb 22 23:24:06 2012 +0000 1.3 @@ -0,0 +1,119 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="nvidia-173xx" 1.7 +VERSION="173.14.31" 1.8 +CATEGORY="x-window" 1.9 +MAINTAINER="jozee@slitaz.org" 1.10 +SHORT_DESC="NVIDIA drivers (non-free)" 1.11 +WEB_SITE="http://www.nvidia.com/" 1.12 +SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg1" 1.13 +TARBALL="${SOURCE}.run" 1.14 +WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL" 1.15 +RUN_OPTS="--extract-only" 1.16 +TAGS="drivers graphic video" 1.17 + 1.18 +DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm xorg-libXv" 1.19 +BUILD_DEPENDS="linux-module-headers coreutils-file-summarize" 1.20 + 1.21 +# Rules to configure and make the package. 1.22 + 1.23 +compile_rules() 1.24 +{ 1.25 + cd $src/usr/src/nv/ 1.26 + # Only use .unblocked_ioctl since 2.6.36 1.27 + sed -i 's|\.ioctl|// &|' nv.c 1.28 + make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' 1.29 +} 1.30 + 1.31 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.32 +genpkg_rules() 1.33 +{ 1.34 + EXTRAVERSION=_${kvers} 1.35 + 1.36 + mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE \ 1.37 + $fs/lib/modules/$kvers-slitaz/kernel/drivers/video \ 1.38 + $fs/usr/share/doc/$PACKAGE 1.39 + 1.40 + # Compress and install module 1.41 + lzma e $src/usr/src/nv/nvidia.ko \ 1.42 + $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.gz 1.43 + chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.gz 1.44 + chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.gz 1.45 + 1.46 + cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE 1.47 + cp -a $src/usr/bin $fs/usr 1.48 + cp -a $src/nvidia-installer $fs/usr/bin 1.49 + cp -a $src/usr/lib/*.so* $fs/usr/lib/ 1.50 + cp -a $src/usr/lib/tls $fs/usr/lib/ 1.51 + cp -a $src/usr/X11R6/lib/libXvMCNVIDIA.so.$VERSION $fs/usr/lib 1.52 + cp -a $src/usr/X11R6/lib/modules $fs/usr/lib/X11/ 1.53 + cp -a $src/usr/share/applications $fs/usr/share 1.54 + cp -a $src/usr/share/pixmaps $fs/usr/share 1.55 + cp -a $src/usr/share/doc/* $fs/usr/share/doc/$PACKAGE/ 1.56 + cp -a $src/usr/X11R6/lib/* $fs/usr/lib/X11 1.57 + 1.58 + ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so 1.59 + ln -s libcuda.so.$VERSION $fs/usr/lib/libcuda.so.1 1.60 + ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so 1.61 + ln -s libGL.so.$VERSION $fs/usr/lib/libGL.so.1 1.62 + ln -s libGLcore.so.$VERSION $fs/usr/lib/libGLcore.so.1 1.63 + ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so 1.64 + ln -s libnvidia-cfg.so.$VERSION $fs/usr/lib/libnvidia-cfg.so.1 1.65 + ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/libnvidia-tls.so.1 1.66 + ln -s libnvidia-tls.so.$VERSION $fs/usr/lib/tls/libnvidia-tls.so.1 1.67 + ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so.1 1.68 + ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA.so 1.69 + ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so.1 1.70 + ln -s libXvMCNVIDIA.so.$VERSION $fs/usr/lib/libXvMCNVIDIA_dynamic.so 1.71 + ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so 1.72 + ln -s libnvidia-wfb.so.$VERSION $fs/usr/lib/X11/modules/libnvidia-wfb.so.1 1.73 + ln -s libglx.so.$VERSION $fs/usr/lib/X11/modules/extensions/libglx.so 1.74 +} 1.75 + 1.76 +pre_install() 1.77 +{ 1.78 + echo "" 1.79 + echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2" 1.80 + echo "================================================================================" 1.81 + echo "You are installing a package with proprietary license." 1.82 + echo "You must accept the license." 1.83 + echo "================================================================================" 1.84 + echo "" 1.85 + 1.86 +} 1.87 + 1.88 +post_install() 1.89 +{ 1.90 + echo "Processing post-install commands..." 1.91 + chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz 1.92 + 1.93 + # correct .desktop file file 1.94 + sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop 1.95 + sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop 1.96 + 1.97 + echo "" 1.98 + echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2" 1.99 + echo "================================================================================" 1.100 + echo "For installing this package, you have to accept the $PACKAGE license." 1.101 + echo "The license is stored in /usr/share/licenses/$PACKAGE " 1.102 + echo -n "Would you like to read the license (y/N) : "; read anser 1.103 + if [ "$anser" = "y" ]; then 1.104 + cat /usr/share/licenses/"$PACKAGE"/LICENSE | more 1.105 + echo "" 1.106 + fi 1.107 + echo "================================================================================" 1.108 + echo -n "Do you accept the license (y/N) : "; read anser 1.109 + if [ "$anser" = "N" ]; then 1.110 + echo "You did not accept the license, Removing the pkg." 1.111 + tazpkg remove "$PACKAGE" 1.112 + fi 1.113 + 1.114 +} 1.115 + 1.116 +post_remove() 1.117 +{ 1.118 + echo "Processing post-remove commands..." 1.119 + depmod -a 1.120 +} 1.121 + 1.122 +TAZBB_NO_INSTALL="because this is not hardware neutral"