[arch-commits] CVS update of extra/modules/catalyst-utils (6 files)
Travis Willard
travis at archlinux.org
Thu Nov 22 04:27:11 UTC 2007
Date: Wednesday, November 21, 2007 @ 23:27:11
Author: travis
Path: /home/cvs-extra/extra/modules/catalyst-utils
Added: PKGBUILD (1.1) amdcccle.desktop (1.1) ati-powermode.sh.patch (1.1)
atieventsd.sh (1.1) catalyst-utils.install (1.1) catalyst.sh (1.1)
upgpkg: catalyst-utils 7.11-1
Upstream update of fglrx, along with a rebranding and reversioning. It's now catalyst-7.11, and the previous version was fglrx-8.42.3. Whee
------------------------+
PKGBUILD | 127 +++++++++++++++++++++++++++++++++++++++++++++++
amdcccle.desktop | 18 ++++++
ati-powermode.sh.patch | 13 ++++
atieventsd.sh | 41 +++++++++++++++
catalyst-utils.install | 39 ++++++++++++++
catalyst.sh | 11 ++++
6 files changed, 249 insertions(+)
Index: extra/modules/catalyst-utils/PKGBUILD
diff -u /dev/null extra/modules/catalyst-utils/PKGBUILD:1.1
--- /dev/null Wed Nov 21 23:27:11 2007
+++ extra/modules/catalyst-utils/PKGBUILD Wed Nov 21 23:27:10 2007
@@ -0,0 +1,127 @@
+# $Id: PKGBUILD,v 1.1 2007/11/22 04:27:10 travis Exp $
+# Maintainer: Travis Willard <travisw at wmpub.ca>
+
+# Thanks to dibblethewrecker for the original work and packages.
+# Thanks to testing monkey S1G1 for contributions
+
+pkgname=catalyst-utils
+pkgver=7.11
+pkgrel=1
+pkgdesc="Proprietary AMD/ATI userspace tools and libraries for Radeon brand cards."
+arch=('i686' 'x86_64')
+url="http://www.ati.amd.com"
+license=('custom')
+#finger required for acpi scripts
+depends=('xorg-server>=1.1.1' 'libdrm' 'libstdc++5' 'netkit-bsd-finger' \
+ 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi')
+replaces=('ati-drivers' 'ati-fglrx-utils' 'fglrx-utils')
+conflicts=('libgl' 'ati-drivers-module' 'ati-drivers' 'nvidia')
+provides=('libgl')
+install=${pkgname}.install
+source=(http://www2.ati.com/drivers/linux/ati-driver-installer-${pkgver/./-}-x86.x86_64.run \
+ amdcccle.desktop catalyst.sh atieventsd.sh ati-powermode.sh.patch)
+md5sums=('099eead18eb845f83da1d743dc17cc47'
+ '1f4b870e977b155af549442932e8ce6f'
+ 'bdafe749e046bfddee2d1c5e90eabd83'
+ 'f729bf913613f49b0b9759c246058a87'
+ '150c5cd49e9affe3635415aa9d9c00e6')
+
+options=('!strip')
+
+build() {
+ cd $startdir/src
+
+ [ "$CARCH" = "i686" ] && _arch="x86";
+ [ "$CARCH" = "x86_64" ] && _arch="x86_64";
+
+ chmod a+x ati-driver-installer-${pkgver/./-}-x86.x86_64.run
+ ./ati-driver-installer-${pkgver/./-}-x86.x86_64.run --extract archive_files
+
+ # Grab the example ACPI scripts for lid close and AC plugged/unplugged
+ mkdir -p $startdir/src/etc/
+ cp $startdir/src/archive_files/common/usr/share/doc/fglrx/examples/etc/acpi $startdir/src/etc -r
+ cd $startdir/src/etc/acpi
+ sed -i "s#/usr/X11R6/bin/aticonfig#/usr/bin/aticonfig#g" $startdir/src/etc/acpi/ati-powermode.sh || return 1
+ sed -i "s#--effective=now##g" $startdir/src/etc/acpi/ati-powermode.sh || return 1
+ patch -Np0 -i $startdir/src/ati-powermode.sh.patch
+ cd ../..
+
+ # Get our architecture files and common files all in one place
+ cp $startdir/src/archive_files/arch/${_arch}/* $startdir/src/ -r
+ cp $startdir/src/archive_files/common/* $startdir/src/ -r
+ if [ "$CARCH" = "x86_64" ]; then
+ cp $startdir/src/archive_files/x710_64a/* $startdir/src/ -r
+ else
+ cp $startdir/src/archive_files/x710/* $startdir/src/ -r
+ fi
+
+ # Remove src and documents - install remaining files
+ mkdir -p $startdir/src/usr/share/pixmaps
+ mv $startdir/src/usr/share/icons/* $startdir/src/usr/share/pixmaps/
+ rm -rf $startdir/src/usr/{src,share/{icons,doc,applnk,gnome}}
+
+ # Install into correct paths for Xorg7
+ install -d -m 755 $startdir/pkg/usr/include $startdir/pkg/usr/bin \
+ $startdir/pkg/usr/lib/xorg/modules $startdir/pkg/etc \
+ $startdir/pkg/usr/share $startdir/pkg/usr/sbin \
+ $startdir/pkg/etc/rc.d $startdir/pkg/etc/acpi
+
+ mv $startdir/src/etc/* $startdir/pkg/etc/
+ mv $startdir/src/usr/sbin/* $startdir/pkg/usr/sbin/
+ mv $startdir/src/usr/include/* $startdir/pkg/usr/include/
+ mv $startdir/src/usr/share/* $startdir/pkg/usr/share/
+ mv $startdir/src/usr/X11R6/include/* $startdir/pkg/usr/include/
+ mv $startdir/src/usr/X11R6/bin/* $startdir/pkg/usr/bin/
+ if [ "$CARCH" == "x86_64" ]; then
+ mv $startdir/src/usr/X11R6/lib64/modules/* $startdir/pkg/usr/lib/xorg/modules/
+ rm -rf $startdir/src/usr/X11R6/lib64/modules
+ mv $startdir/src/usr/X11R6/lib64/* $startdir/pkg/usr/lib
+ else
+ mv $startdir/src/usr/X11R6/lib/modules/* $startdir/pkg/usr/lib/xorg/modules/
+ rm -rf $startdir/src/usr/X11R6/lib/modules
+ mv $startdir/src/usr/X11R6/lib/* $startdir/pkg/usr/lib/
+ fi
+
+ # create proper symlinks to libGL.so, libfglrx_pp.so, and libfglrx_gamma.so
+ cd $startdir/pkg/usr/lib
+ ln -s libGL.so.1.2 libGL.so
+ ln -s libGL.so.1.2 libGL.so.1
+ ln -sf /usr/lib/libfglrx_pp.so.1.0 libfglrx_pp.so.1
+ ln -sf /usr/lib/libfglrx_gamma.so.1.0 libfglrx_gamma.so.1
+
+ mkdir -p ${startdir}/pkg/usr/lib/xorg/modules/extensions
+ cd ${startdir}/pkg/usr/lib/xorg/modules/extensions
+ ln -sf libGLcore.xorg libGLcore.so
+ ln -sf libglx.xorg libglx.so
+
+ # correct dir permissions
+ find $startdir/pkg/usr -type d -exec chmod 755 {} \;
+
+ # correct FILE permissions - >=8.39.4 has nearly every file marked 0744. This
+ # is dumb, and previous versions of the drivers had no files marked this
+ # way. Fixing permissions of files to what they were in 8.38.6
+ find $startdir/pkg/etc -not -type d -exec chmod 0444 {} \;
+ find $startdir/pkg/etc -name '*.sh' -not -type d -exec chmod a+x {} \;
+ chmod u+w $startdir/pkg/etc/{ati/control,acpi/ati-powermode.sh}
+ find $startdir/pkg/usr/{bin,lib,sbin} -not -type d -exec chmod 0755 {} \;
+ chmod 0555 $startdir/pkg/usr/sbin/atigetsysteminfo.sh
+ find $startdir/pkg/usr/lib -name '*.a' -not -type d -exec chmod 0644 {} \;
+ find $startdir/pkg/usr/{share,include} -not -type d -exec chmod 0444 {} \;
+ find $startdir/pkg/usr/share/ati/amdcccle/ -name '*.qm' -not -type d -exec chmod 0644 {} \;
+ find $startdir/pkg/usr/share/man -not -type d -exec chmod 0644 {} \;
+
+ # install licenses
+ install -m 0644 -D $startdir/src/archive_files/ATI_LICENSE.TXT \
+ $startdir/pkg/usr/share/licenses/${pkgname}/AMD_ATI_LICENSE.TXT
+ # create DE file
+ install -m 0755 -D $startdir/src/amdcccle.desktop \
+ $startdir/pkg/usr/share/applications/amdcccle.desktop
+ # thanks to cerebral, we dont need that damned symlink
+ install -m 0755 -D $startdir/src/catalyst.sh \
+ $startdir/pkg/etc/profile.d/catalyst.sh
+ # Add ATI Events Daemon launcher
+ install -m 0755 -D $startdir/src/atieventsd.sh \
+ $startdir/pkg/etc/rc.d/atieventsd
+
+}
+
Index: extra/modules/catalyst-utils/amdcccle.desktop
diff -u /dev/null extra/modules/catalyst-utils/amdcccle.desktop:1.1
--- /dev/null Wed Nov 21 23:27:11 2007
+++ extra/modules/catalyst-utils/amdcccle.desktop Wed Nov 21 23:27:10 2007
@@ -0,0 +1,18 @@
+[Desktop Entry]
+Name=ATI Catalyst Control Center
+Comment=ATI graphics adapter settings
+Name[de]=ATI Catalyst Control Center
+Comment[de]=ATI grafics adapter settings
+SwallowExec=
+BinaryPattern=
+Icon=ccc_large.xpm
+MiniIcon=ccc_small.xpm
+Protocols=
+MimeType=
+Exec=amdcccle
+TerminalOptions=
+Path=
+DocPath=
+Type=Application
+Terminal=0
+Categories=Settings;DesktopSettings;
Index: extra/modules/catalyst-utils/ati-powermode.sh.patch
diff -u /dev/null extra/modules/catalyst-utils/ati-powermode.sh.patch:1.1
--- /dev/null Wed Nov 21 23:27:11 2007
+++ extra/modules/catalyst-utils/ati-powermode.sh.patch Wed Nov 21 23:27:11 2007
@@ -0,0 +1,13 @@
+--- ati-powermode.sh.old 2007-06-02 23:29:13.000000000 -0400
++++ ati-powermode.sh 2007-06-02 23:33:06.000000000 -0400
+@@ -56,7 +56,9 @@
+ getXuser;
+ if [ x"$XAUTHORITY" != x"" ]; then
+ export DISPLAY=":$displaynum"
+- su $user -c "/usr/bin/aticonfig --set-powerstate=3 "
++ newlevel=$(aticonfig --lsp | grep ":" | tail -1 | cut -d':' -f 1 | sed -e "s/\*//g" -e "s/ *//g")
++ [ -z "$newlevel" ] && newlevel=3
++ su $user -c "/usr/bin/aticonfig --set-powerstate=$newlevel "
+ fi
+ done
+ fi
Index: extra/modules/catalyst-utils/atieventsd.sh
diff -u /dev/null extra/modules/catalyst-utils/atieventsd.sh:1.1
--- /dev/null Wed Nov 21 23:27:11 2007
+++ extra/modules/catalyst-utils/atieventsd.sh Wed Nov 21 23:27:11 2007
@@ -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
Index: extra/modules/catalyst-utils/catalyst-utils.install
diff -u /dev/null extra/modules/catalyst-utils/catalyst-utils.install:1.1
--- /dev/null Wed Nov 21 23:27:11 2007
+++ extra/modules/catalyst-utils/catalyst-utils.install Wed Nov 21 23:27:11 2007
@@ -0,0 +1,39 @@
+# This is a default template for a post-install scriptlet. You can
+# remove any functions you don't need (and this header).
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ echo "PLEASE NOTE:"
+ echo "For these drivers to work, you must install kernel modules."
+ echo "Depending on your kernel, these module packages are named"
+ echo "catalyst-\$kernel and stock kernel module is catalyst"
+ echo "--------------------------------------------------------------"
+ echo "You can use the tool 'aticonfig' to generate an xorg.conf file."
+ echo "Remember to add fglrx to the MODULES list in /etc/rc.conf."
+ echo "--------------------------------------------------------------"
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ /bin/true
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+op=$1
+shift
+$op $*
Index: extra/modules/catalyst-utils/catalyst.sh
diff -u /dev/null extra/modules/catalyst-utils/catalyst.sh:1.1
--- /dev/null Wed Nov 21 23:27:11 2007
+++ extra/modules/catalyst-utils/catalyst.sh Wed Nov 21 23:27:11 2007
@@ -0,0 +1,11 @@
+if [ $LIBGL_DRIVERS_PATH ]
+then
+ if ! set | grep LIBGL_DRIVERS_PATH | grep /usr/lib/xorg/modules/dri/ > /dev/null
+ then
+ LIBGL_DRIVERS_PATH=$LIBGL_DRIVERS_PATH:/usr/lib/xorg/modules/dri/
+ export LIBGL_DRIVERS_PATH
+ fi
+else
+ LIBGL_DRIVERS_PATH=/usr/lib/xorg/modules/dri/
+ export LIBGL_DRIVERS_PATH
+fi
More information about the arch-commits
mailing list