1 # Contributor: Giuseppe Calderaro <giuseppecalderaro@gmail.com>
2 # Contributor: Alessandro Sagratini <ale_sagra@hotmail.com>
3 # Contributor: Vincent Viaud <lsuntzu@gmail.com>
9 pkgdesc="Proprietary AMD/ATI kernel drivers for Radeon brand cards. For kernel26tp.."
10 arch=('i686' 'x86_64')
11 url="http://www.ati.amd.com"
13 depends=("catalyst-utils>=${pkgver}" "kernel26tp>=${_kernel_version}")
15 replaces=('ati-fglrx' 'fglrx') # Yay rebranding
16 install=${pkgname}.install
17 source=(http://www2.ati.com/drivers/linux/ati-driver-installer-${pkgver/./-}-x86.x86_64.run)
18 md5sums=('f0df93149fc44a8aacabcd9fc58e6d3c')
20 _kernver=${_kernel_version}-tp
25 [ "$CARCH" = "i686" ] && _arch="x86"
26 [ "$CARCH" = "x86_64" ] && _arch="x86_64"
28 /bin/sh ./ati-driver-installer-${pkgver/./-}-x86.x86_64.run --extract archive_files
30 cp $startdir/src/archive_files/arch/${_arch}/* $startdir/src/ -r
31 cp $startdir/src/archive_files/common/* $startdir/src/ -r
33 if [ "$CARCH" == "x86_64" ]; then
34 cp $startdir/src/archive_files/x710_64a/* $startdir/src/ -r
36 cp $startdir/src/archive_files/x710/* $startdir/src/ -r
39 cd $startdir/src/lib/modules/fglrx/build_mod/
41 # Build the kernel module
43 make -C /lib/modules/${_kernver}/build SUBDIRS="`pwd`" modules || return 1
45 # Install the kernel module
46 install -m 644 -D $startdir/src/lib/modules/fglrx/build_mod/fglrx.ko \
47 $startdir/pkg/lib/modules/${_kernver}/video/fglrx.ko
49 sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" $startdir/$install
52 install -m 0644 -D $startdir/src/archive_files/ATI_LICENSE.TXT \
53 $startdir/pkg/usr/share/licenses/${pkgname}/AMD_ATI_LICENSE.TXT