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