updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / catalyst-daemon / PKGBUILD
blob531193f11995c61809f338c5d78f71e6fd141f29
1 # Maintainer: Vi0L0 <vi0l093@gmail.com>
2 # Great Contributor: B. M. Kwapinski <lord.xml@web.de> (autofglrx daemon idea and most important code)
3 # Great Contributor: Shen Miren <dickeny@gmail.com> (build_module/hook idea and code)
4 # Contributor: aidanlinz
5 # Contributor: Rip-Rip
8 pkgname=catalyst-daemon
9 pkgver=11.12
10 pkgrel=1
11 pkgdesc="AMD/ATI drivers. Auto re-compile the fglrx module (while system's start) if kernel was updated"
12 arch=('i686' 'x86_64')
13 url="http://www.ati.amd.com"
14 license=('custom')
15 depends=('catalyst-utils' 'gcc-libs' 'gcc>4.0.0' 'make' 'patch')
16 replaces=('catalyst' 'catalyst-hook')
17 conflicts=('catalyst-test' 'nvidia' 'xf86-video-ati' 'xf86-video-radeonhd' 'ati-dri' 'catalyst-hook' 'catalyst' 'catalyst-generator')
18 provides=("catalyst=${pkgver}")
19 install=${pkgname}.install
21 #patch_file="fglrx-2.6.36.patch"
22 #patch_md5="eb58dbf993dbf8d77924055cc8caaeb6"
23 #patch_ver="2.6.36"
25 source=(
26     http://www2.ati.com/drivers/linux/ati-driver-installer-${pkgver/./-}-x86.x86_64.run
27     autofglrx.sh
28     catalyst_build_module
29     ati_make.sh
30     makefile_compat.patch)
31 #    ${patch_file})
33 md5sums=('15c8148f916b2b9d37a5cbb189c6dda6'
34          'eb16dbd3b0509ca3f09c896b8d5ceaa5'
35          'a300a48f918356dfc212322e5a6dfa10'
36          '210fd25311893117fa6bd609eda086e1'
37          '3e1b82bd69774ea808da69c983d6a43b')
38 #         ${patch_md5})
41 build() {
42   ## Unpack archive
43     msg "Unpacking archive ..."
44     /bin/sh ./ati-driver-installer-${pkgver/./-}-x86.x86_64.run --extract archive_files
47 package() {
48     # License
49       install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" || return 1
50       install -m644 "${srcdir}/archive_files/LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1
52       if [ "${CARCH}" = "i686" ]; then
53         cd "${srcdir}/archive_files/arch/x86/usr" || return 1
54         _lib=lib
55       elif [ "${CARCH}" = "x86_64" ]; then
56         cd "${srcdir}/archive_files/arch/x86_64/usr" || return 1
57         _lib=lib64
58       fi
60     # Prepare modules source files
61       _archdir=x86_64
62       test "${CARCH}" = "i686" && _archdir=x86
63       cd "${srcdir}/archive_files/"
64       install -m755 -d "${pkgdir}/usr/share/ati/build_mod" || return 1
65       install -m644 common/lib/modules/fglrx/build_mod/*.c \
66                 "${pkgdir}/usr/share/ati/build_mod/" || return 1
67       install -m644 common/lib/modules/fglrx/build_mod/*.h \
68                 "${pkgdir}/usr/share/ati/build_mod/" || return 1
69       install -m644 common/lib/modules/fglrx/build_mod/2.6.x/Makefile \
70                 "${pkgdir}/usr/share/ati/build_mod/" || return 1
71       install -m644 arch/${_archdir}/lib/modules/fglrx/build_mod/libfglrx_ip.a \
72                 "${pkgdir}/usr/share/ati/build_mod/" || return 1
73       install -m755 -d "${pkgdir}/usr/bin" || return 1
74       install -m755 "${srcdir}/catalyst_build_module" "${pkgdir}/usr/bin" || return 1
76     # modified ati's make.sh script
77       install -m755 "${srcdir}/ati_make.sh" "${pkgdir}/usr/share/ati/build_mod/" || return 1
79     # makefile patch to choose arch_compat_alloc_user_space or older compat_alloc_user_space
80     # works only in combination with ati_make.sh script
81       install -m644 "${srcdir}/makefile_compat.patch" "${pkgdir}/usr/share/ati/build_mod/" || return 1
84     # optional patch
85 #      for ver in ${patch_ver}; do
86 #      install -m644 "${srcdir}/${patch_file}" \
87 #                "${pkgdir}/usr/share/ati/build_mod/${ver}.patch" || return 1
88 #      done
90     # fglrx daemon
91       install -m755 -d "${pkgdir}/etc/rc.d" || return 1
92       install -m755 "${srcdir}/autofglrx.sh" "${pkgdir}/etc/rc.d/autofglrx" || return 1