1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Partly based on original PKGBUILD by Mikko Seppala <[email protected]>
# Contributor: Manuel Gaul <[email protected]>
# Contributor: Vi0L0 <[email protected]>

_pkgsourcename=catalyst-utils-test
pkgname=lib32-$_pkgsourcename
pkgver=10.10
pkgrel=111
pkgdesc="AMD/ATI catalyst-test driver utilities and libraries. (32-bit)"
url="http://www.ati.amd.com"
arch=(x86_64)
license=('custom')
groups=('lib32')
depends=('lib32-libxext' 'lib32-libdrm' "catalyst-test>=${pkgver}")
conflicts=('lib32-libgl' 'lib32-nvidia-utils' 'lib32-catalyst-utils')
replaces=('lib32-ati-fglrx-utils' 'lib32-fglrx-utils' 'lib32-libgl' 'lib32-catalyst-utils')
provides=('lib32-libgl' "lib32-catalyst-utils=${pkgver}")
source=(http://archive.ubuntu.com/ubuntu/pool/restricted/f/fglrx-installer/fglrx-installer_8.780.orig.tar.gz lib32-catalyst.sh)
md5sums=('9d29fa9908bd7db85f898a50a5f845e4' 'af7fb8ee4fc96fd54c5b483e33dc71c4')
install=${pkgname}.install

build() {
  # Extract Catalyst driver installer
    mkdir archive_files
    mv arch etc lib usr x760 x760_64a archive_files
    mkdir archive_files/common
    mv archive_files/etc archive_files/lib archive_files/usr archive_files/common
}

package() {
  cd ${srcdir}
  install -D -m755 lib32-catalyst.sh ${pkgdir}/etc/profile.d/lib32-catalyst.sh || return 1

  # Install lib32 libraries
  cd "${srcdir}/archive_files/arch/x86/usr" || return 1
  install -dm755 "${pkgdir}/usr/lib32" || return 1
  install -dm755 "${pkgdir}/usr/lib32/xorg/modules/dri" || return 1
  install -m755 lib/*.so* "${pkgdir}/usr/lib32/" || return 1
  install -m755 X11R6/lib/*.so* "${pkgdir}/usr/lib32/" || return 1
  install -m755 X11R6/lib/modules/dri/*.so "${pkgdir}/usr/lib32/xorg/modules/dri/" || return 1

  cd "$pkgdir/usr/lib32/" || return 1
  ln -sf libfglrx_dm.so.1.0 libfglrx_dm.so.1 || return 1
  # ln -sf libfglrx_pp.so.1.0 libfglrx_pp.so.1 || return 1
  # ln -sf libfglrx_tvout.so.1.0 libfglrx_tvout.so.1 || return 1
  ln -sf libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || return 1
  ln -sf libAMDXvBA.so.1.0 libAMDXvBA.so.1 || return 1
  ln -sf libXvBAW.so.1.0 libXvBAW.so.1 || return 1
  ln -sf libGL.so.1.2 libGL.so.1 || return 1
  ln -sf libGL.so.1.2 libGL.so || return 1
  ln -sf libatiuki.so.1.0 libatiuki.so.1 || return 1
  ln -sf libatiuki.so.1.0 libatiuki.so || return 1
}