diff options
Diffstat (limited to 'community/catalyst-utils')
-rw-r--r-- | community/catalyst-utils/PKGBUILD | 136 | ||||
-rw-r--r-- | community/catalyst-utils/atieventsd | 41 | ||||
-rw-r--r-- | community/catalyst-utils/atieventsd.service | 10 | ||||
-rw-r--r-- | community/catalyst-utils/fglrx-authfile-locations.patch | 16 |
4 files changed, 203 insertions, 0 deletions
diff --git a/community/catalyst-utils/PKGBUILD b/community/catalyst-utils/PKGBUILD new file mode 100644 index 000000000..3fa6a4509 --- /dev/null +++ b/community/catalyst-utils/PKGBUILD @@ -0,0 +1,136 @@ +# $Id: PKGBUILD 77684 2012-10-13 13:37:15Z lcarlier $ +# Maintainer: Laurent Carlier <lordheavym@gmail.com> +# Contributor: Vi0L0, wonder, Eduardo "kensai" Romero +# Contributor: aidanlinz, Rip-Rip, OvsInc, Sebastian Siebert + +pkgbase=catalyst-utils +pkgname=('catalyst-utils' 'opencl-catalyst') +pkgver=12.9 +pkgrel=0.1 +pkgdesc="AMD Catalyst drivers utilities and libraries with OpenCL implementation." +arch=('i686' 'x86_64') +url="http://www.amd.com" +license=('custom') +source=(#"http://www2.ati.com/drivers/linux/amd-driver-installer-${pkgver/./-}-x86.x86_64.zip" + https://launchpad.net/ubuntu/quantal/+source/fglrx-installer/2:9.000-0ubuntu1/+files/fglrx-installer_9.000.orig.tar.gz + fglrx-authfile-locations.patch + atieventsd + atieventsd.service) +md5sums=('2bb6e8193fdddff9bbd2e3d9f9e8f39b' + '31ec3f0432dc2e9bf3203223aa75ce20' + 'f729bf913613f49b0b9759c246058a87' + '4bdb353dea68e33ac9e20ec30cc42082') + +if [ "${CARCH}" = "i686" ]; then + _ARCHDIR="x86" + _ARCHLIB="" + _ARCHXPIC="" +else + _ARCHDIR="x86_64" + _ARCHLIB="64" + _ARCHXPIC="_64a" +fi + +build() { + cd ${srcdir} + +# sh ./amd-driver-installer*.run --extract fglrx-install +# +# cd fglrx-install + patch -Np2 -i fglrx-authfile-locations.patch +} + +package_catalyst-utils() { + pkgdesc="AMD Catalyst drivers utilities and libraries." + provides=('libgl') + conflicts=('libgl' 'nvidia-utils') + depends=('xorg-server>=1.7.0' 'gcc-libs' 'libxinerama' 'libxcursor' 'libxxf86vm' 'libxrandr' 'libsm' 'fontconfig' 'libxi' 'netkit-bsd-finger') + optdepends=('qt: amdcccle' + 'acpid: acpi event support') + + install -dm755 "${pkgdir}"/usr/{bin,sbin} + install -dm755 "${pkgdir}"/usr/lib/{dri,xorg/modules/{dri,drivers,extensions/fglrx,linux},systemd/system} + install -dm755 "${pkgdir}"/usr/include/GL + install -dm755 "${pkgdir}"/etc/{ati,acpi/events,security/console.apps,rc.d} + install -dm755 "${pkgdir}"/usr/share/{applications,ati/amdcccle,man/man8,pixmaps} + + # binaries + cd ${srcdir} + install -m755 usr/sbin/* "${pkgdir}/usr/sbin/" + install -m755 usr/X11R6/bin/* "${pkgdir}/usr/bin/" + install -m755 arch/${_ARCHDIR}/usr/sbin/* "${pkgdir}/usr/sbin/" + install -m755 arch/${_ARCHDIR}/usr/X11R6/bin/* "${pkgdir}/usr/bin/" + + # headers + install -m644 usr/include/GL/* "${pkgdir}/usr/include/GL/" + + # xorg/dri/gl/... drivers + cd xpic${_ARCHXPIC}/usr/X11R6/lib${_ARCHLIB}/modules + install -m755 *.so "${pkgdir}/usr/lib/xorg/modules/" + install -m755 drivers/*.so "${pkgdir}/usr/lib/xorg/modules/drivers/" + install -m755 linux/*.so "${pkgdir}/usr/lib/xorg/modules/linux/" + install -m755 extensions/fglrx/fglrx-libglx.so "${pkgdir}/usr/lib/xorg/modules/extensions/fglrx/" + ln -s fglrx/fglrx-libglx.so "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" + cd ${srcdir}/arch/${_ARCHDIR}/usr/X11R6/lib${_ARCHLIB} + install -m755 modules/dri/fglrx_dri.so "${pkgdir}/usr/lib/xorg/modules/dri/" + ln -s /usr/lib/xorg/modules/dri/fglrx_dri.so "${pkgdir}/usr/lib/dri/" + install -m755 fglrx/fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/" + install -m755 *.so* "${pkgdir}/usr/lib/" + install -m644 libAMDXvBA.cap "${pkgdir}/usr/lib/" + cd ${srcdir}/arch/${_ARCHDIR}/usr/lib${_ARCHLIB} + install -m755 *.so* "${pkgdir}/usr/lib/" + # needed symlinks + ln -s libatiuki.so.1.0 "${pkgdir}/usr/lib/libatiuki.so.1" + ln -s fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so.1" + ln -s fglrx-libGL.so.1.2 "${pkgdir}/usr/lib/libGL.so" + ln -s libAMDXvBA.so.1.0 "${pkgdir}/usr/lib/libAMDXvBA.so.1" + ln -s libXvBAW.so.1.0 "${pkgdir}/usr/lib/libXvBAW.so" + ln -s libfglrx_dm.so.1.0 "${pkgdir}/usr/lib/libfglrx_dm.so.1" + + # various files + cd ${srcdir} + install -m644 usr/share/man/man8/* "${pkgdir}/usr/share/man/man8/" + install -m644 usr/share/applications/* "${pkgdir}/usr/share/applications/" + install -m644 usr/share/icons/* "${pkgdir}/usr/share/pixmaps/" + install -m644 usr/share/ati/amdcccle/* "${pkgdir}/usr/share/ati/amdcccle/" + install -m644 etc/ati/* "${pkgdir}/etc/ati/" + chmod 755 "${pkgdir}/etc/ati/authatieventsd.sh" + install -m644 etc/security/console.apps/amdcccle-su "${pkgdir}/etc/security/console.apps/" + install -m644 usr/share/applications/*.desktop "${pkgdir}/usr/share/applications/" + # use ACPI example files + install -m755 usr/share/doc/fglrx/examples/etc/acpi/*.sh "${pkgdir}/etc/acpi/" + install -m644 usr/share/doc/fglrx/examples/etc/acpi/events/* "${pkgdir}/etc/acpi/events/" + # systemd and rc.d scripts + install -m755 "${srcdir}/atieventsd" "${pkgdir}/etc/rc.d/" + install -m644 "${srcdir}/atieventsd.service" "${pkgdir}/usr/lib/systemd/system/" + + # provided in opencl-catalyst package + rm "${pkgdir}"/usr/lib/lib{amdocl*,OpenCL}.so* + + # licenses + install -Dm644 "${srcdir}/usr/share/doc/fglrx/LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.TXT" + install -Dm644 "${srcdir}/usr/share/doc/amdcccle/ccc_copyrights.txt" \ + "${pkgdir}/usr/share/licenses/${pkgname}/amdcccle_copyrights.txt" +} + +package_opencl-catalyst() { + pkgdesc="OpenCL implemention from AMD" + provides=('libcl') + conflicts=('libcl') + depends=('gcc-libs') + optdepends=('opencl-headers: headers necessary for OpenCL development') + + install -dm755 "${pkgdir}"/usr/{bin,lib} + install -dm755 "${pkgdir}/etc/OpenCL/vendors" + + cd ${srcdir}/arch/${_ARCHDIR} + + install -m755 usr/bin/clinfo "${pkgdir}/usr/bin/" + install -m644 etc/OpenCL/vendors/amdocl*.icd "${pkgdir}/etc/OpenCL/vendors/" + install -m755 usr/lib${_ARCHLIB}/libamdocl*.so "${pkgdir}/usr/lib/" + install -m755 usr/lib${_ARCHLIB}/libOpenCL.so.1 "${pkgdir}/usr/lib/" + ln -s libOpenCL.so.1 "${pkgdir}/usr/lib/libOpenCL.so" + + # license + install -Dm644 "${srcdir}//usr/share/doc/fglrx/LICENSE.TXT" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.TXT" +} diff --git a/community/catalyst-utils/atieventsd b/community/catalyst-utils/atieventsd new file mode 100644 index 000000000..16bd9a4fa --- /dev/null +++ b/community/catalyst-utils/atieventsd @@ -0,0 +1,41 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +ATID_PID=`pidof -o %PPID /usr/sbin/atieventsd` + +case "$1" in + start) + rc=0 + stat_busy "Starting ATI Events Daemon" + [ -z "$ATID_PID" ] && /usr/sbin/atieventsd + rc=$(($rc+$?)) + if [ $rc -gt 0 ]; then + stat_fail + else + add_daemon atieventsd + stat_done + fi + ;; + stop) + rc=0 + stat_busy "Stopping ATI Events Daemon" + kill $ATID_PID &>/dev/null + rc=$(($rc+$?)) + if [ $rc -gt 0 ]; then + stat_fail + else + rm_daemon atieventsd + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/community/catalyst-utils/atieventsd.service b/community/catalyst-utils/atieventsd.service new file mode 100644 index 000000000..90af165bd --- /dev/null +++ b/community/catalyst-utils/atieventsd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Catalyst event Daemon +Requires=acpid.socket + +[Service] +ExecStart=/usr/sbin/atieventsd --nodaemon + +[Install] +WantedBy=multi-user.target + diff --git a/community/catalyst-utils/fglrx-authfile-locations.patch b/community/catalyst-utils/fglrx-authfile-locations.patch new file mode 100644 index 000000000..3617e310b --- /dev/null +++ b/community/catalyst-utils/fglrx-authfile-locations.patch @@ -0,0 +1,16 @@ +Index: ati803/common/etc/ati/authatieventsd.sh +=================================================================== +--- ati803/common/etc/ati/authatieventsd.sh ++++ ati803/common/etc/ati/authatieventsd.sh 2008-04-18 23:25:27.000000000 +0300 +@@ -34,8 +34,9 @@ + + # Check xdm/kdm + +- XDM_AUTH_MASK=/var/lib/xdm/authdir/authfiles/A$1* +- XDM_AUTH_FILE=`ls -t $XDM_AUTH_MASK 2>/dev/null | head -n 1` # Choose the newest file ++ XDM_AUTH_MASK=/var/lib/xdm/authfiles/A$1* ++ KDM_AUTH_MASK=/var/run/xauth/A$1* ++ XDM_AUTH_FILE=`ls -t $XDM_AUTH_MASK $KDM_AUTH_MASK 2>/dev/null | head -n 1` # Choose the newest file + if [ -n "$XDM_AUTH_FILE" ]; then + SERVER_AUTH_FILE=$XDM_AUTH_FILE + DISP_SEARCH_STRING="#ffff#" |