wok-6.x rev 4603

Add catalyst (AMD/ATI proprietary driver, bin, libs)
author Rohit Joshi <jozee@slitaz.org>
date Mon Dec 14 15:53:12 2009 +0000 (2009-12-14)
parents b8a24186fc43
children 9fc3ddc15b30
files catalyst/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/catalyst/receipt	Mon Dec 14 15:53:12 2009 +0000
     1.3 @@ -0,0 +1,127 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="catalyst"
     1.7 +VERSION="9-11"
     1.8 +CATEGORY="network"
     1.9 +MAINTAINER="jozee@slitaz.org"
    1.10 +SHORT_DESC="AMD/ATI beta drivers (non-free) for Radeon brand cards "
    1.11 +WEB_SITE="http://www.ati.amd.com"
    1.12 +DEPENDS="xorg-server mesa"
    1.13 +BUILD_DEPENDS="linux xorg-server"
    1.14 +TARBALL="ati-driver-installer-$VERSION-x86.x86_64.run"
    1.15 +TAGS="drivers graphic video"
    1.16 +
    1.17 +# Rules to configure and make the package.
    1.18 +
    1.19 +compile_rules() {
    1.20 +
    1.21 +	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    1.22 +	WGET_URL="http://www2.ati.com/drivers/linux/$TARBALL"
    1.23 +	
    1.24 +	[ -d $WOK/linux/taz ] || tazwok cook linux
    1.25 +   
    1.26 +    cd $WOK/$PACKAGE
    1.27 +    [ -f $TARBALL ] || wget $WGET_URL
    1.28 +    
    1.29 +	chmod +x $TARBALL
    1.30 +	[ -d $PACKAGE-$VERSION ]  || sh $TARBALL --extract $PACKAGE-$VERSION
    1.31 +	
    1.32 +	cd $src/common/lib/modules/fglrx/build_mod
    1.33 +	cp $src/arch/x86/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC4 . 
    1.34 +	cp 2.6.x/Makefile .
    1.35 +	make -C $WOK/linux/linux-$KERNEL_VERSION SUBDIRS="`pwd`" modules 
    1.36 +}	
    1.37 +
    1.38 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.39 +genpkg_rules()
    1.40 +{
    1.41 +	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    1.42 +	EXTRAVERSION=_$KERNEL_VERSION
    1.43 +
    1.44 +	mkdir -p  $fs/usr/share/pixmaps \
    1.45 +			  $fs/usr/bin \
    1.46 +			  $fs/usr/lib/xorg/modules \
    1.47 +			  $fs/usr/share/licenses/$PACKAGE \
    1.48 +			  $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video \
    1.49 +			  $fs/etc
    1.50 +	
    1.51 +	# Compress and install module
    1.52 +	lzma e $src/common/lib/modules/fglrx/build_mod/fglrx.ko \
    1.53 +			$fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/fglrx.ko.gz
    1.54 +	chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/fglrx.ko.gz
    1.55 +	chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/fglrx.ko.gz	
    1.56 +	
    1.57 +	cp -a $src/ATI_LICENSE.TXT $fs/usr/share/licenses/$PACKAGE
    1.58 +		
    1.59 +	cp -a $src/x740/usr/X11R6/lib/modules $fs/usr/lib/xorg
    1.60 +	
    1.61 +	cp -a $src/arch/x86/usr/lib/*.so $fs/usr/lib/
    1.62 +	cp -a $src/arch/x86/usr/sbin $fs/usr
    1.63 +	cp -a $src/arch/x86/usr/X11R6/bin/* $fs/usr/bin/
    1.64 +	
    1.65 +	cp -a $src/arch/x86/usr/X11R6/lib/*.so* $fs/usr/lib
    1.66 +	cp -a $src/arch/x86/usr/X11R6/lib/modules $fs/usr/lib/xorg	
    1.67 +	
    1.68 +	cp -a $src/common/etc $fs
    1.69 +	chmod 755 $fs/etc/ati/authatieventsd.sh 	
    1.70 +	cp -a $src/common/usr/sbin $fs/usr
    1.71 +	
    1.72 +	cp -a $src/common/usr/share/icons/* $fs/usr/share/pixmaps
    1.73 +	cp -a $src/common/usr/share/applications $fs/usr/share
    1.74 +	cp -a $src/common/usr/share/doc $fs/usr/share
    1.75 +	cp -a $src/common/usr/share/ati $fs/usr/share
    1.76 +	cp -a $src/common/usr/X11R6/bin/* $fs/usr/bin		
    1.77 +	
    1.78 +
    1.79 +}
    1.80 +
    1.81 +pre_install()
    1.82 +{
    1.83 +	echo ""
    1.84 +	echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
    1.85 +	echo "================================================================================"
    1.86 +	echo "You are installing a package with proprietary license."
    1.87 +	echo "You must accept the license."
    1.88 +    echo "================================================================================"
    1.89 +    echo ""
    1.90 +	
    1.91 +}
    1.92 +
    1.93 +post_install()
    1.94 +{
    1.95 +	echo "Processing post-install commands..."
    1.96 +	chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
    1.97 +	
    1.98 +	ln -sf $1/usr/lib/xorg/modules/dri $1/usr/lib/dri
    1.99 +	ln -sf $1/usr/lib/libfglrx_dm.so.1.0 $1/usr/lib/libfglrx_dm.so.1
   1.100 +	ln -sf $1/usr/lib/libfglrx_pp.so.1.0 $1/usr/lib/libfglrx_pp.so.1
   1.101 +	ln -sf $1/usr/lib/libfglrx_tvout.so.1.0 $1/usr/lib/libfglrx_tvout.so.1
   1.102 +	ln -sf $1/usr/lib/libfglrx_gamma.so.1.0 $1/usr/lib/libfglrx_gamma.so.1
   1.103 +	ln -sf $1/usr/lib/libGL.so.1.2 $1/usr/lib/libGL.so.1
   1.104 +	ln -sf $1/usr/lib/libGL.so.1.2 $1/usr/lib/libGL.so
   1.105 +	
   1.106 +	echo ""
   1.107 +	echo -e "\033[1m ATI LICENSE INFORMATION:\033[0m $2"
   1.108 +	echo "================================================================================"
   1.109 +	echo "For installing this package, you have to accept the $PACKAGE license."
   1.110 +    echo "The license is stored in /usr/share/licenses/$PACKAGE "    
   1.111 +    echo -n "Would you like to read the license (y/N) : "; read anser
   1.112 +    if [ "$anser" = "y" ]; then
   1.113 +		cat /usr/share/licenses/"$PACKAGE"/ATI_LICENSE.txt | more	
   1.114 +		echo "" 		
   1.115 +	fi
   1.116 +	echo "================================================================================"
   1.117 +	 echo -n "Do you accept the license (y/N) : "; read anser
   1.118 +    if [ "$anser" = "N" ]; then
   1.119 +		echo "You did not accept the license, Removing the pkg."	
   1.120 +		tazpkg remove "$PACKAGE"		
   1.121 +	fi
   1.122 +
   1.123 +  
   1.124 +}
   1.125 +
   1.126 +post_remove()
   1.127 +{
   1.128 +	echo "Processing post-remove commands..."
   1.129 +	depmod -a
   1.130 +}