updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / catalyst-tp / PKGBUILD
blob2a03b14d4839aa0af1c9791e55f6937c42e13807
1 # Contributor: Giuseppe Calderaro <giuseppecalderaro@gmail.com>
2 # Contributor: Alessandro Sagratini <ale_sagra@hotmail.com>
3 # Contributor: Vincent Viaud <lsuntzu@gmail.com>
5 pkgname=catalyst-tp
6 pkgver=8.5
7 _kernel_version=2.6.25
8 pkgrel=1
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"
12 license=('custom')
13 depends=("catalyst-utils>=${pkgver}" "kernel26tp>=${_kernel_version}")
14 makedepends=()
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
22 build() {
23     cd $startdir/src
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
35     else
36       cp $startdir/src/archive_files/x710/* $startdir/src/ -r
37     fi
38     cd $startdir/src
39     cd $startdir/src/lib/modules/fglrx/build_mod/
41     # Build the kernel module
42     cp 2.6.x/Makefile .
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
51     # install licenses
52     install -m 0644 -D $startdir/src/archive_files/ATI_LICENSE.TXT \
53                      $startdir/pkg/usr/share/licenses/${pkgname}/AMD_ATI_LICENSE.TXT