wok-6.x diff nvidia-96xx/receipt @ rev 18428

shutdown: add simple shutdown wrapper script for other tool compatibility
author Nathan Neulinger <nneul@neulinger.org>
date Mon Sep 21 13:17:35 2015 +0000 (2015-09-21)
parents
children 9e01bc6321ea
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nvidia-96xx/receipt	Mon Sep 21 13:17:35 2015 +0000
     1.3 @@ -0,0 +1,107 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="nvidia-96xx"
     1.7 +VERSION="96.43.23"
     1.8 +CATEGORY="network"
     1.9 +MAINTAINER="psychomaniak@xakep.ru"
    1.10 +LICENSE="other"
    1.11 +SHORT_DESC="NVIDIA-legacy drivers (from Geforce MX200 to 7950) (non-free)"
    1.12 +WEB_SITE="http://www.nvidia.com/"
    1.13 +SOURCE="NVIDIA-Linux-x86-${VERSION}-pkg0"
    1.14 +TARBALL="${SOURCE}.run"
    1.15 +WGET_URL="http://download.nvidia.com/XFree86/Linux-x86/$VERSION/$TARBALL"
    1.16 +RUN_OPTS="--extract-only"
    1.17 +TAGS="drivers graphic video"
    1.18 +
    1.19 +DEPENDS="linux xorg-server gtk+ cairo linux-agp linux-drm"
    1.20 +BUILD_DEPENDS="linux-module-headers coreutils-file-summarize xz"
    1.21 +
    1.22 +# Rules to configure and make the package.
    1.23 +
    1.24 +compile_rules()
    1.25 +{
    1.26 +	cd $src/usr/src/nv/
    1.27 +	# Only use .unblocked_ioctl since 2.6.36
    1.28 +	sed -i 's|\.ioctl|// &|' nv.c
    1.29 +	make SYSSRC="/usr/src/linux" module 2>&1 | sed s'/ERROR:/error:/' &&
    1.30 +	xz nvidia.ko
    1.31 +}
    1.32 +	
    1.33 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.34 +genpkg_rules()
    1.35 +{
    1.36 +	EXTRAVERSION=_${kvers}
    1.37 +
    1.38 +	mkdir -p $fs/usr/share $fs/usr/lib/X11 $fs/usr/share/licenses/$PACKAGE
    1.39 +	mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/video
    1.40 +	mkdir -p $fs/usr/share/doc/$PACKAGE 
    1.41 +	
    1.42 +	# Compress and install module
    1.43 +	cp $src/usr/src/nv/nvidia.ko.xz \
    1.44 +	$fs/lib/modules/$kvers-slitaz/kernel/drivers/video/
    1.45 +
    1.46 +	chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
    1.47 +	chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/video/nvidia.ko.xz
    1.48 +
    1.49 +	cp -a $src/LICENSE $fs/usr/share/licenses/$PACKAGE
    1.50 +	cp -a $src/usr/bin $fs/usr
    1.51 +	cp -a $src/nvidia-installer $fs/usr/bin
    1.52 +	cp -a $src/usr/lib/*.so* $fs/usr/lib/
    1.53 +	cp -a $src/usr/lib/tls $fs/usr/lib/
    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 +	# Links
    1.59 +	for i in `find $fs -iname *.so*`; do
    1.60 +		ln -s `basename $i` `dirname $i`/`basename ${i/so.${VERSION}/so/}`
    1.61 +		ln -s `basename $i` `dirname $i`/`basename ${i/so.${VERSION}/so.1/}`
    1.62 +	done
    1.63 +}
    1.64 +
    1.65 +pre_install()
    1.66 +{
    1.67 +	echo ""
    1.68 +	echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
    1.69 +	echo "================================================================================"
    1.70 +	echo "You are installing a package with proprietary license."
    1.71 +	echo "You must accept the license."
    1.72 +    echo "================================================================================"
    1.73 +    echo ""
    1.74 +}
    1.75 +
    1.76 +post_install()
    1.77 +{
    1.78 +	echo "Processing post-install commands..."
    1.79 +	chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
    1.80 +
    1.81 +	# correct .desktop file file
    1.82 +	sed -i 's:__UTILS_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
    1.83 +	sed -i 's:__PIXMAP_PATH__/::' $1/usr/share/applications/nvidia-settings.desktop
    1.84 +
    1.85 +	echo ""
    1.86 +	echo -e "\033[1m NVIDIA LICENSE INFORMATION:\033[0m $2"
    1.87 +	echo "================================================================================"
    1.88 +	echo "For installing this package, you have to accept the $PACKAGE license."
    1.89 +	echo "The license is stored in /usr/share/licenses/$PACKAGE "    
    1.90 +	echo -n "Would you like to read the license (y/N) : "; read anser
    1.91 +	if [ "$anser" = "y" ]; then
    1.92 +		cat /usr/share/licenses/"$PACKAGE"/LICENSE | more	
    1.93 +		echo "" 		
    1.94 +	fi
    1.95 +	echo "================================================================================"
    1.96 +	echo -n "Do you accept the license (y/N) : "; read anser
    1.97 +	if [ "$anser" = "N" ]; then
    1.98 +		echo "You did not accept the license, Removing the pkg."	
    1.99 +		tazpkg remove "$PACKAGE"		
   1.100 +	fi
   1.101 +
   1.102 +}
   1.103 +
   1.104 +post_remove()
   1.105 +{
   1.106 +	echo "Processing post-remove commands..."
   1.107 +	depmod -a
   1.108 +}
   1.109 +
   1.110 +TAZBB_NO_INSTALL="because this is not hardware neutral"