updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / catalyst-rt / PKGBUILD
blobdb6cc3a48cdfd675d85058e494b311328a2cb287
1 # Contributor: Ray Rashif <schivmeister@gmail.com>
3 pkgname=catalyst-rt
4 pkgver=8.8
5 _kernver=2.6.26-rt
6 pkgrel=1
7 pkgdesc="Proprietary AMD/ATI kernel drivers for Radeon brand cards. For kernel26rt."
8 arch=(i686 x86_64)
9 url="http://www.ati.amd.com"
10 license=('custom')
11 depends=("catalyst-utils>=$pkgver" "kernel26rt>=2.6.26.5_rt9-1" "kernel26rt<2.6.27")
12 install=$pkgname.install
13 source=(http://www2.ati.com/drivers/linux/ati-driver-installer-${pkgver/./-}-x86.x86_64.run
14         2.6.26.patch)
16 build() {
17     cd "$srcdir"
19     [ "$CARCH" = "i686" ] && _arch="x86"
20     [ "$CARCH" = "x86_64" ] && _arch="x86_64"
22     /bin/bash ./ati-driver-installer-${pkgver/./-}-x86.x86_64.run \
23       --extract archive_files
25     cd archive_files/common
26     patch -Np0 -i "$srcdir/2.6.26.patch" || return 1
28     cp "$srcdir/archive_files/arch/$_arch/"* "$srcdir/" -r
29     cp "$srcdir/archive_files/common/"* "$srcdir/" -r
31     if [ "$CARCH" == "x86_64" ]; then
32       cp "$srcdir/archive_files/x710_64a/"* "$srcdir/" -r
33     else
34       cp "$srcdir/archive_files/x710/"* "$srcdir/" -r
35     fi
36     
37     cd "$srcdir/lib/modules/fglrx/build_mod/"
39     # Build the kernel module
40     cp 2.6.x/Makefile .
41     make -C "/lib/modules/$_kernver/build" SUBDIRS="$(pwd)" \
42       modules || return 1
44     # Install the kernel module
45     install -Dm0644 "$srcdir/lib/modules/fglrx/build_mod/fglrx.ko" \
46       "$pkgdir/lib/modules/$_kernver/video/fglrx.ko"
48     sed -i "s/KERNEL_VERSION=.*/KERNEL_VERSION=$_kernver/g" \
49       "$startdir/$install"
51     # install licenses
52     install -Dm0644 "$srcdir/archive_files/ATI_LICENSE.TXT" \
53       "$pkgdir/usr/share/licenses/$pkgname/AMD_ATI_LICENSE.TXT"
55 md5sums=('276976fb5aaf108efcdbf37256bf6d51'
56          '132569a6ea9cbb0f07fe4479126aa9a4')