updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / catalyst-beta / PKGBUILD
blob2909f73f25b03b6f89ab0a29bce1615472edc2a8
1 _kernver=`uname -r`
3 pkgname=catalyst-beta
4 pkgver=8.670
5 pkgrel=3
6 pkgdesc="AMD/ATI beta drivers for Radeon brand cards with support for OpenCL. Stock kernel."
7 arch=('i686' 'x86_64')
8 url="http://www.ati.amd.com"
9 license=('custom')
10 depends=('kernel26>=2.6.29' 'kernel26<2.6.32' 'netkit-bsd-finger' \
11 'libstdc++5' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs')
12 conflicts=('catalyst' 'catalyst-utils' 'nvidia' 'libgl' 'catalyst-leaked')
13 provides=('catalyst' 'catalyst-utils' 'libgl')
14 install=catalyst-beta.install
15 source=(http://download2-developer.amd.com/amd/Stream20Beta/ati-opencl-beta-driver-v2.0-beta4-lnx.zip 
16         catalyst.sh amdcccle.desktop atieventsd.sh control)
17 md5sums=('0b0314fd2959b48e80b0b92d2a54778b'
18          'bdafe749e046bfddee2d1c5e90eabd83'
19          '4efa8414a8fe9eeb50da38b5522ef81d'
20          'f729bf913613f49b0b9759c246058a87'
21          '82c9bc636dd8629256aa303c21613d3d') 
23 build() {
24 /bin/sh ./fglrx-8.67/ati-driver-installer-8.67-x86.x86_64.run --extract archive_files
26 ##Build kernel modules
28 if [ "${CARCH}" = "x86_64" ]; then
29 BUILDARCH=x86_64
30 _archdir=x86_64
32 if [ "${CARCH}" = "i686" ]; then
33 BUILDARCH=i386
34 _archdir=x86
37 cd "${srcdir}/archive_files/common/lib/modules/fglrx/build_mod"
38 cp "${srcdir}/archive_files/arch/${_archdir}/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC4" . || return 1
39 cp 2.6.x/Makefile . || return 1
41 make -C /lib/modules/${_kernver}/build SUBDIRS="`pwd`" ARCH=${BUILDARCH} modules || return 1
43 install -m755 -d "${pkgdir}/lib/modules/${_kernver}/video/"
44 install -m644 fglrx.ko "${pkgdir}/lib/modules/${_kernver}/video/" || return 1
45 install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
47 # License
48 install -m644 "${srcdir}/archive_files/ATI_LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
50 sed -i -e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" $startdir/*.install
52 ##Install catalyst utilities
54 # Create directories
55 install -m755 -d "${pkgdir}/etc/ati"
56 install -m755 -d "${pkgdir}/etc/rc.d"
57 install -m755 -d "${pkgdir}/etc/profile.d"
58 install -m755 -d "${pkgdir}/etc/acpi/events"
60 install -m755 -d "${pkgdir}/usr/lib/xorg/modules/dri"
61 install -m755 -d "${pkgdir}/usr/lib/xorg/modules/drivers"
62 install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
63 install -m755 -d "${pkgdir}/usr/lib/xorg/modules/linux"
65 install -m755 -d "${pkgdir}/usr/bin"
66 install -m755 -d "${pkgdir}/usr/sbin"
68 install -m755 -d "${pkgdir}/usr/include/X11/extensions"
69 install -m755 -d "${pkgdir}/usr/include/GL"
71 install -m755 -d "${pkgdir}/usr/share/applications"
72 install -m755 -d "${pkgdir}/usr/share/ati/amdcccle"
73 install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
74 install -m755 -d "${pkgdir}/usr/share/man/man8"
75 install -m755 -d "${pkgdir}/usr/share/pixmaps"
77 # X driver installation
78 if [ "${CARCH}" = "i686" ]; then
79 cd "${srcdir}/archive_files/x740/usr/X11R6/lib/modules" || return 1
80 elif [ "${CARCH}" = "x86_64" ]; then
81 cd "${srcdir}/archive_files/x740_64a/usr/X11R6/lib64/modules" || return 1
84 install -m644 *.a "${pkgdir}/usr/lib/xorg/modules/" || return 1
85 install -m755 *.so "${pkgdir}/usr/lib/xorg/modules/" || return 1
86 install -m755 drivers/*.so "${pkgdir}/usr/lib/xorg/modules/drivers/" || return 1
87 install -m755 linux/*.so "${pkgdir}/usr/lib/xorg/modules/linux/" || return 1
88 install -m755 extensions/libglx.so "${pkgdir}/usr/lib/xorg/modules/extensions/" || return 1
89 install -m755 extensions/libdri.so "${pkgdir}/usr/lib/xorg/modules/extensions/libdri.ati" || return 1
91 # Controlcenter / library installation
92 if [ "${CARCH}" = "i686" ]; then
93 cd "${srcdir}/archive_files/arch/x86/usr" || return 1
94 _lib=lib
95 elif [ "${CARCH}" = "x86_64" ]; then
96 cd "${srcdir}/archive_files/arch/x86_64/usr" || return 1
97 _lib=lib64
100 install -m755 X11R6/bin/* "${pkgdir}/usr/bin/" || return 1
101 install -m755 sbin/* "${pkgdir}/usr/sbin/" || return 1
102 install -m755 X11R6/${_lib}/*.so* "${pkgdir}/usr/lib/" || return 1
103 install -m644 X11R6/${_lib}/*.a "${pkgdir}/usr/lib/" || return 1 # really needed?
104 install -m644 X11R6/${_lib}/*.cap "${pkgdir}/usr/lib/" || return 1
105 install -m755 X11R6/${_lib}/modules/dri/*.so "${pkgdir}/usr/lib/xorg/modules/dri/" || return 1
106 install -m755 ${_lib}/*.so "${pkgdir}/usr/lib/" || return 1
108 ln -sf /usr/lib/xorg/modules/dri ${pkgdir}/usr/lib/dri
109 ln -sf libfglrx_dm.so.1.0 "${pkgdir}/usr/lib/libfglrx_dm.so.1"
110 ln -sf libfglrx_pp.so.1.0 "${pkgdir}/usr/lib/libfglrx_pp.so.1"
111 ln -sf libfglrx_tvout.so.1.0 "${pkgdir}/usr/lib/libfglrx_tvout.so.1"
112 ln -sf libfglrx_gamma.so.1.0 "${pkgdir}/usr/lib/libfglrx_gamma.so.1"
113 ln -sf libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so.1"
114 ln -sf libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so"
116 cd "${srcdir}"/archive_files/common
117 install -m644 etc/ati/* "${pkgdir}/etc/ati/" || return 1
118 chmod 755 "${pkgdir}/etc/ati/authatieventsd.sh" || return 1
120 install -m644 usr/X11R6/include/X11/extensions/*.h "${pkgdir}/usr/include/X11/extensions/" || return 1
121 install -m644 usr/X11R6/bin/amdupdaterandrconfig "${pkgdir}/usr/bin/" || return 1
122 install -m644 usr/include/GL/*.h "${pkgdir}/usr/include/GL/" || return 1
123 install -m755 usr/sbin/*.sh "${pkgdir}/usr/sbin/" || return 1
124 install -m644 usr/share/ati/amdcccle/* "${pkgdir}/usr/share/ati/amdcccle/" || return 1 # ? what are these files for?
125 # install -m644 usr/share/gnome/apps/amdcccle.desktop "${pkgdir}/usr/share/applications/" || return 1
126 install -m644 usr/share/icons/*.xpm "${pkgdir}/usr/share/pixmaps/" || return 1
127 install -m644 usr/share/man/man8/*.8 "${pkgdir}/usr/share/man/man8/" || return 1
128 install -m644 "${srcdir}/amdcccle.desktop" "${pkgdir}/usr/share/applications/" || return 1
130 # ACPI example files
131 install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh "${pkgdir}/etc/acpi/" || return 1
132 sed -i -e 's/usr\/X11R6/usr/g' "${pkgdir}/etc/acpi/ati-powermode.sh" || return 1
133 install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* "${pkgdir}/etc/acpi/events/" || return 1
135 # replace original control file with the 8.660 version which support HD2xxx and HD3xxx
136 install -m755 "${srcdir}/control" "${pkgdir}/etc/ati/" || return 1
138 # Add ATI Events Daemon launcher
139 install -m755 "${srcdir}/atieventsd.sh" "${pkgdir}/etc/rc.d/atieventsd" || return 1
141 # thanks to cerebral, we dont need that damned symlink
142 install -m755 "${srcdir}/catalyst.sh" "${pkgdir}/etc/profile.d/" || return 1
144 # License
145 install -m644 "${srcdir}/archive_files/ATI_LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1