summaryrefslogtreecommitdiff
path: root/ati/Pkgfile
blob: af7df5b7fa59262247bac63283484bbe54785d4c (plain)
    1 # Description: ATI Proprietary Linux Display Driver
    2 # URL: http://www.ati.com/support/drivers/linux/radeon-linux.html
    3 # Maintainer: Jose V Beneyto, sepen at users dot sourceforge dot net
    4 # Packager: Jose V Beneyto, sepen at users dot sourceforge dot net
    5 # Depends on: mesa3d, gl-select
    6 
    7 name=ati
    8 version=9.3
    9 release=1
   10 source=(http://www2.ati.com/drivers/linux/$name-driver-installer-${version/./-}-x86.x86_64.run \
   11         atieventsd)
   12 
   13 build() {
   14 
   15   chmod +x ${name}-driver-installer-${version/./-}-x86.x86_64.run
   16   ./$name-driver-installer-${version/./-}-x86.x86_64.run --extract $SRC/tmp
   17 
   18   # force to build kernel 
   19   [ ! -z $KVER ] && sed -e "s|^uname_r=.*|uname_r=$KVER|g" \
   20     -i $SRC/tmp/common/lib/modules/fglrx/build_mod/make.sh
   21   
   22   # make
   23   cd $SRC/tmp/common/lib/modules/fglrx/build_mod
   24   ln -s $SRC/tmp/arch/x86/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC4 .
   25   chmod +x make.sh
   26   ./make.sh
   27 
   28   # install kernel module
   29   install -D -m 0644 $SRC/tmp/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko \
   30   $PKG/lib/modules/`uname -r`/kernel/drivers/char/drm/fglrx.ko
   31   
   32   # install xorg
   33   install -d $PKG/usr/{bin,sbin}
   34   install -m 0755 $SRC/tmp/arch/x86/usr/X11R6/bin/* $PKG/usr/bin
   35   install -m 0755 $SRC/tmp/arch/x86/usr/sbin/* $PKG/usr/sbin
   36   install -d $PKG/usr/lib/{dri,xorg/modules}
   37   install -m 0644 $SRC/tmp/arch/x86/usr/X11R6/lib/*.* $PKG/usr/lib
   38   install -m 0644 $SRC/tmp/arch/x86/usr/X11R6/lib/modules/dri/* $PKG/usr/lib/dri
   39   mv $SRC/tmp/x740/usr/X11R6/lib/modules/* $PKG/usr/lib/xorg/modules
   40   mv $SRC/tmp/common/usr/X11R6/include $PKG/usr
   41   mv $SRC/tmp/common/usr/include/GL $PKG/usr/include
   42   install -m 0755 $SRC/tmp/common/usr/sbin/atigetsysteminfo.sh $PKG/usr/sbin
   43   sed -e 's|/usr/X11/XF86Config*||' -i $PKG/usr/sbin/atigetsysteminfo.sh 
   44   install -D -m 0444 $SRC/tmp/common/usr/share/man/man8/atieventsd.8 \
   45     $PKG/usr/man/man8/atieventsd.8
   46   mv $SRC/tmp/common/etc $PKG
   47   rm -f $PKG/etc/ati/*logo*  
   48 
   49   # setup file modes
   50   find $PKG/usr/lib -type f -name '*.so*' -exec chmod 0755 {} \;
   51   find $PKG/usr/lib -type f -name '*.la' -exec chmod 0644 {} \;
   52   find $PKG/usr/include -type f -name '*.h' -exec chmod 0444 {} \;
   53   
   54   # finetune the installation
   55   ln -sf /usr/lib/libfglrx_pp.so.1.0 $PKG/usr/lib/libfglrx_pp.so.1
   56   ln -sf /usr/lib/libfglrx_gamma.so.1.0 $PKG/usr/lib/libfglrx_gamma.so.1
   57   install -D -m 0755 $SRC/atieventsd $PKG/etc/rc.d/atieventsd
   58   
   59   # required for use xorg-gl-select
   60   mv $PKG/usr/lib/xorg/modules/extensions/libglx{.so,_so_ati}
   61   mv $PKG/usr/lib/xorg/modules/extensions/libdri{.so,_so_ati}
   62   mv $PKG/usr/lib/libGL{.so.1.2,_so_1_2_ati}
   63 
   64   # patching file to avoid X11R6 paths
   65   perl -pi -e "s/\0\/usr\/X11R6\/lib\/modules\/dri\0/\0\/usr\/lib\/dri\0padpadpadpadpa/" \
   66     $PKG/usr/lib/libGL_so_1_2_ati
   67 }

Generated by cgit