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