updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / catalyst-utils-old / PKGBUILD
blob56211c51e1532a409ab373d185822dbf64942392
1 pkgname=catalyst-utils-old
2 pkgver=9.3
3 pkgrel=1
4 pkgdesc="Old proprietary AMD/ATI kernel drivers for Radeon brand cards. Support for R300/R700 chipsets. Stock kernel."
5 arch=('i686' 'x86_64')
6 url="http://www.ati.amd.com"
7 license=('custom') 
8 #finger required for acpi scripts
9 depends=("xorg-server<1.6.0" 'netkit-bsd-finger' \
10          'libstdc++5' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs')
11 replaces=('ati-drivers' 'ati-fglrx-utils' 'fglrx-utils')
12 conflicts=('libgl' 'ati-drivers-module' 'ati-drivers' 'nvidia' 'catalyst-utils') 
13 provides=('libgl' 'catalyst-utils')
14 options=('!strip')
15 install=catalyst-utils.install
16 source=(http://www2.ati.com/drivers/linux/ati-driver-installer-${pkgver/./-}-x86.x86_64.run
17         catalyst.sh amdcccle.desktop atieventsd.sh)
18 md5sums=('3875441c1e6f9bd7e0c2d006eb0708b3'
19          'bdafe749e046bfddee2d1c5e90eabd83'
20          '4efa8414a8fe9eeb50da38b5522ef81d'
21          'f729bf913613f49b0b9759c246058a87')
23 build() {
24   # Extract it
25   /bin/sh ./ati-driver-installer-${pkgver/./-}-x86.x86_64.run --extract archive_files
27   # Create directories
28   install -m755 -d "${pkgdir}/etc/ati"
29   install -m755 -d "${pkgdir}/etc/rc.d"
30   install -m755 -d "${pkgdir}/etc/profile.d"
31   install -m755 -d "${pkgdir}/etc/acpi/events"
33   install -m755 -d "${pkgdir}/usr/lib/xorg/modules/dri"
34   install -m755 -d "${pkgdir}/usr/lib/xorg/modules/drivers"
35   install -m755 -d "${pkgdir}/usr/lib/xorg/modules/extensions"
36   install -m755 -d "${pkgdir}/usr/lib/xorg/modules/linux"
38   install -m755 -d "${pkgdir}/usr/bin"
39   install -m755 -d "${pkgdir}/usr/sbin"
41   install -m755 -d "${pkgdir}/usr/include/X11/extensions"
42   install -m755 -d "${pkgdir}/usr/include/GL"
44   install -m755 -d "${pkgdir}/usr/share/applications"
45   install -m755 -d "${pkgdir}/usr/share/ati/amdcccle"
46   install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
47   install -m755 -d "${pkgdir}/usr/share/man/man8"
48   install -m755 -d "${pkgdir}/usr/share/pixmaps"
50   # X driver installation
51   if [ "${CARCH}" = "i686" ]; then
52     cd "${srcdir}/archive_files/x740/usr/X11R6/lib/modules" || return 1
53   elif [ "${CARCH}" = "x86_64" ]; then
54     cd "${srcdir}/archive_files/x740_64a/usr/X11R6/lib64/modules" || return 1
55   fi
57   install -m644 *.a "${pkgdir}/usr/lib/xorg/modules/" || return 1
58   install -m755 *.so "${pkgdir}/usr/lib/xorg/modules/" || return 1
59   install -m755 drivers/*.so "${pkgdir}/usr/lib/xorg/modules/drivers/" || return 1
60   install -m755 linux/*.so "${pkgdir}/usr/lib/xorg/modules/linux/" || return 1
61   install -m755 extensions/libglx.so "${pkgdir}/usr/lib/xorg/modules/extensions/" || return 1
62   install -m755 extensions/libdri.so "${pkgdir}/usr/lib/xorg/modules/extensions/libdri.ati" || return 1
64   # Controlcenter / library installation
65   if [ "${CARCH}" = "i686" ]; then
66     cd "${srcdir}/archive_files/arch/x86/usr" || return 1
67     _lib=lib
68   elif [ "${CARCH}" = "x86_64" ]; then
69     cd "${srcdir}/archive_files/arch/x86_64/usr" || return 1
70     _lib=lib64
71   fi
73   install -m755 X11R6/bin/* "${pkgdir}/usr/bin/" || return 1
74   install -m755 sbin/* "${pkgdir}/usr/sbin/"  || return 1
75   install -m755 X11R6/${_lib}/*.so* "${pkgdir}/usr/lib/" || return 1
76   install -m644 X11R6/${_lib}/*.a "${pkgdir}/usr/lib/" || return 1 # really needed?
77   install -m644 X11R6/${_lib}/*.cap "${pkgdir}/usr/lib/" || return 1
78   install -m755 X11R6/${_lib}/modules/dri/*.so "${pkgdir}/usr/lib/xorg/modules/dri/" || return 1
80   ln -sf /usr/lib/xorg/modules/dri ${pkgdir}/usr/lib/dri
81   ln -sf libfglrx_dm.so.1.0 "${pkgdir}/usr/lib/libfglrx_dm.so.1"
82   ln -sf libfglrx_pp.so.1.0 "${pkgdir}/usr/lib/libfglrx_pp.so.1"
83   ln -sf libfglrx_tvout.so.1.0 "${pkgdir}/usr/lib/libfglrx_tvout.so.1"
84   ln -sf libfglrx_gamma.so.1.0 "${pkgdir}/usr/lib/libfglrx_gamma.so.1"
85   ln -sf libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so.1"
86   ln -sf libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so"
88   # bad fix for fglrx_dri.so (64-bit)
89   if [ "${CARCH}" = "x86_64" ]; then
90     mkdir -p ${pkgdir}/usr/lib64/dri/
91     ln -sf /usr/lib/xorg/modules/dri/fglrx_dri.so ${pkgdir}/usr/lib64/dri/fglrx_dri.so
92   fi
94   cd "${srcdir}"/archive_files/common
95   install -m644 etc/ati/* "${pkgdir}/etc/ati/" || return 1
96   chmod 755 "${pkgdir}/etc/ati/authatieventsd.sh" || return 1
98   install -m644 usr/X11R6/include/X11/extensions/*.h "${pkgdir}/usr/include/X11/extensions/" || return 1
99   install -m644 usr/X11R6/bin/amdupdaterandrconfig "${pkgdir}/usr/bin/" || return 1
100   install -m644 usr/include/GL/*.h "${pkgdir}/usr/include/GL/" || return 1
101   install -m755 usr/sbin/*.sh "${pkgdir}/usr/sbin/" || return 1
102   install -m644 usr/share/ati/amdcccle/* "${pkgdir}/usr/share/ati/amdcccle/" || return 1 # ? what are these files for?
103 #  install -m644 usr/share/gnome/apps/amdcccle.desktop "${pkgdir}/usr/share/applications/" || return 1
104   install -m644 usr/share/icons/*.xpm "${pkgdir}/usr/share/pixmaps/" || return 1
105   install -m644 usr/share/man/man8/*.8 "${pkgdir}/usr/share/man/man8/" || return 1
106   install -m644 "${srcdir}/amdcccle.desktop" "${pkgdir}/usr/share/applications/" || return 1
108   # ACPI example files
109   install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh "${pkgdir}/etc/acpi/" || return 1
110   sed -i -e 's/usr\/X11R6/usr/g' "${pkgdir}/etc/acpi/ati-powermode.sh" || return 1
111   install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* "${pkgdir}/etc/acpi/events/" || return 1
113   # Add ATI Events Daemon launcher
114   install -m755 "${srcdir}/atieventsd.sh" "${pkgdir}/etc/rc.d/atieventsd" || return 1
115   
116   # thanks to cerebral, we dont need that damned symlink
117   install -m755 "${srcdir}/catalyst.sh" "${pkgdir}/etc/profile.d/" || return 1
119   # License
120   install -m644 "${srcdir}/archive_files/ATI_LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1