wok-6.x annotate catalyst/receipt @ rev 5602

catalyst: improve category
author Rohit Joshi <jozee@slitaz.org>
date Tue May 18 08:29:19 2010 -0400 (2010-05-18)
parents cba7b9cb50f9
children d46894f3a9e4
rev   line source
jozee@4603 1 # SliTaz package receipt.
jozee@4603 2
jozee@4603 3 PACKAGE="catalyst"
jozee@5601 4 VERSION="10.4"
jozee@5602 5 CATEGORY="x-window"
jozee@4603 6 MAINTAINER="jozee@slitaz.org"
jozee@4603 7 SHORT_DESC="AMD/ATI beta drivers (non-free) for Radeon brand cards "
jozee@4603 8 WEB_SITE="http://www.ati.amd.com"
jozee@5112 9 DEPENDS="xorg-server mesa mesa-dri libdrm linux-drm fontconfig linux-agp xorg-libSM xorg-libXi xorg-libXcursor"
jozee@4603 10 BUILD_DEPENDS="linux xorg-server"
jozee@4603 11 TARBALL="ati-driver-installer-$VERSION-x86.x86_64.run"
jozee@4603 12 TAGS="drivers graphic video"
jozee@4603 13
jozee@4603 14 # Rules to configure and make the package.
jozee@4603 15
jozee@4603 16 compile_rules() {
jozee@4603 17
jozee@4603 18 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
jozee@4603 19 WGET_URL="http://www2.ati.com/drivers/linux/$TARBALL"
jozee@4603 20
jozee@4603 21 [ -d $WOK/linux/taz ] || tazwok cook linux
jozee@4603 22
pascal@5552 23 cd $WOK/$PACKAGE
pascal@5552 24 [ -f $SOURCES_REPOSITORY/$TARBALL ] && cp $SOURCES_REPOSITORY/$TARBALL .
pascal@5552 25 if [ ! -f $TARBALL ]; then
pascal@5552 26 wget $WGET_URL
pascal@5552 27 cp $TARBALL $SOURCES_REPOSITORY
pascal@5552 28 fi
jozee@4603 29
jozee@4603 30 chmod +x $TARBALL
jozee@4603 31 [ -d $PACKAGE-$VERSION ] || sh $TARBALL --extract $PACKAGE-$VERSION
jozee@4603 32
pascal@5552 33 for i in autoconf.h utsrelease.h ; do
pascal@5552 34 grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|"
pascal@5552 35 done
jozee@4603 36 cd $src/common/lib/modules/fglrx/build_mod
jozee@4603 37 cp $src/arch/x86/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC4 .
jozee@4603 38 cp 2.6.x/Makefile .
jozee@4603 39 make -C $WOK/linux/linux-$KERNEL_VERSION SUBDIRS="`pwd`" modules
jozee@4603 40 }
jozee@4603 41
jozee@4603 42 # Rules to gen a SliTaz package suitable for Tazpkg.
jozee@4603 43 genpkg_rules()
jozee@4603 44 {
jozee@4603 45 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
jozee@4603 46 EXTRAVERSION=_$KERNEL_VERSION
jozee@4603 47
jozee@4603 48 mkdir -p $fs/usr/share/pixmaps \
jozee@4603 49 $fs/usr/bin \
jozee@4603 50 $fs/usr/lib/xorg/modules \
jozee@4603 51 $fs/usr/share/licenses/$PACKAGE \
jozee@4603 52 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video \
jozee@4603 53 $fs/etc
jozee@4603 54
jozee@4603 55 # Compress and install module
jozee@4603 56 lzma e $src/common/lib/modules/fglrx/build_mod/fglrx.ko \
jozee@4603 57 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/fglrx.ko.gz
jozee@4603 58 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/fglrx.ko.gz
jozee@4603 59 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/video/fglrx.ko.gz
jozee@4603 60
jozee@4603 61 cp -a $src/ATI_LICENSE.TXT $fs/usr/share/licenses/$PACKAGE
jozee@4603 62
jozee@4603 63 cp -a $src/x740/usr/X11R6/lib/modules $fs/usr/lib/xorg
jozee@4603 64
jozee@4603 65 cp -a $src/arch/x86/usr/lib/*.so $fs/usr/lib/
jozee@4603 66 cp -a $src/arch/x86/usr/sbin $fs/usr
jozee@4603 67 cp -a $src/arch/x86/usr/X11R6/bin/* $fs/usr/bin/
jozee@4603 68
jozee@4603 69 cp -a $src/arch/x86/usr/X11R6/lib/*.so* $fs/usr/lib
jozee@4603 70 cp -a $src/arch/x86/usr/X11R6/lib/modules $fs/usr/lib/xorg
jozee@4603 71
jozee@4603 72 cp -a $src/common/etc $fs
jozee@4603 73 chmod 755 $fs/etc/ati/authatieventsd.sh
jozee@4603 74 cp -a $src/common/usr/sbin $fs/usr
jozee@4603 75
jozee@4603 76 cp -a $src/common/usr/share/icons/* $fs/usr/share/pixmaps
jozee@4603 77 cp -a $src/common/usr/share/applications $fs/usr/share
jozee@4603 78 cp -a $src/common/usr/share/doc $fs/usr/share
jozee@4603 79 cp -a $src/common/usr/share/ati $fs/usr/share
jozee@4603 80 cp -a $src/common/usr/X11R6/bin/* $fs/usr/bin
jozee@4603 81
jozee@4603 82
jozee@4603 83 }
jozee@4603 84
jozee@4603 85 pre_install()
jozee@4603 86 {
jozee@4603 87 echo ""
jozee@4603 88 echo -e "\033[1m PROPRIETARY LICENSE:\033[0m $2"
jozee@4603 89 echo "================================================================================"
jozee@4603 90 echo "You are installing a package with proprietary license."
jozee@4603 91 echo "You must accept the license."
jozee@4603 92 echo "================================================================================"
jozee@4603 93 echo ""
jozee@4603 94
jozee@4603 95 }
jozee@4603 96
jozee@4603 97 post_install()
jozee@4603 98 {
jozee@4603 99 echo "Processing post-install commands..."
jozee@4603 100 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
jozee@4603 101
jozee@4603 102 ln -sf $1/usr/lib/xorg/modules/dri $1/usr/lib/dri
jozee@4603 103 ln -sf $1/usr/lib/libfglrx_dm.so.1.0 $1/usr/lib/libfglrx_dm.so.1
jozee@4603 104 ln -sf $1/usr/lib/libfglrx_pp.so.1.0 $1/usr/lib/libfglrx_pp.so.1
jozee@4603 105 ln -sf $1/usr/lib/libfglrx_tvout.so.1.0 $1/usr/lib/libfglrx_tvout.so.1
jozee@4603 106 ln -sf $1/usr/lib/libfglrx_gamma.so.1.0 $1/usr/lib/libfglrx_gamma.so.1
jozee@4603 107 ln -sf $1/usr/lib/libGL.so.1.2 $1/usr/lib/libGL.so.1
jozee@4603 108 ln -sf $1/usr/lib/libGL.so.1.2 $1/usr/lib/libGL.so
jozee@4603 109
jozee@4603 110 echo ""
jozee@4603 111 echo -e "\033[1m ATI LICENSE INFORMATION:\033[0m $2"
jozee@4603 112 echo "================================================================================"
jozee@4603 113 echo "For installing this package, you have to accept the $PACKAGE license."
jozee@4603 114 echo "The license is stored in /usr/share/licenses/$PACKAGE "
jozee@4603 115 echo -n "Would you like to read the license (y/N) : "; read anser
jozee@4603 116 if [ "$anser" = "y" ]; then
jozee@4603 117 cat /usr/share/licenses/"$PACKAGE"/ATI_LICENSE.txt | more
jozee@4603 118 echo ""
jozee@4603 119 fi
jozee@4603 120 echo "================================================================================"
jozee@4603 121 echo -n "Do you accept the license (y/N) : "; read anser
jozee@4603 122 if [ "$anser" = "N" ]; then
jozee@4603 123 echo "You did not accept the license, Removing the pkg."
jozee@4603 124 tazpkg remove "$PACKAGE"
jozee@4603 125 fi
jozee@4603 126
jozee@4603 127
jozee@4603 128 }
jozee@4603 129
jozee@4603 130 post_remove()
jozee@4603 131 {
jozee@4603 132 echo "Processing post-remove commands..."
jozee@4603 133 depmod -a
jozee@4603 134 }
pascal@5013 135
pascal@5013 136 TAZBB_NO_INSTALL="because this is not hardware neutral"