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
8 pkgname=catalyst-daemon
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"
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"
26 http://www2.ati.com/drivers/linux/ati-driver-installer-${pkgver/./-}-x86.x86_64.run
30 makefile_compat.patch)
33 md5sums=('15c8148f916b2b9d37a5cbb189c6dda6'
34 'eb16dbd3b0509ca3f09c896b8d5ceaa5'
35 'a300a48f918356dfc212322e5a6dfa10'
36 '210fd25311893117fa6bd609eda086e1'
37 '3e1b82bd69774ea808da69c983d6a43b')
43 msg "Unpacking archive ..."
44 /bin/sh ./ati-driver-installer-${pkgver/./-}-x86.x86_64.run --extract archive_files
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
55 elif [ "${CARCH}" = "x86_64" ]; then
56 cd "${srcdir}/archive_files/arch/x86_64/usr" || return 1
60 # Prepare modules source files
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
85 # for ver in ${patch_ver}; do
86 # install -m644 "${srcdir}/${patch_file}" \
87 # "${pkgdir}/usr/share/ati/build_mod/${ver}.patch" || return 1
91 install -m755 -d "${pkgdir}/etc/rc.d" || return 1
92 install -m755 "${srcdir}/autofglrx.sh" "${pkgdir}/etc/rc.d/autofglrx" || return 1