wok-current view catalyst/receipt @ rev 7959

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