[arch-commits] CVS update of unstable/modules/fglrx-utils (6 files)

Travis Willard travis at archlinux.org
Fri Sep 14 11:47:00 UTC 2007


    Date: Friday, September 14, 2007 @ 07:47:00
  Author: travis
    Path: /home/cvs-unstable/unstable/modules/fglrx-utils

   Added: PKGBUILD (1.1) amdcccle.desktop (1.1) ati-powermode.sh.patch (1.1)
          atieventsd.sh (1.1) fglrx-utils.install (1.1) fglrx.sh (1.1)

upgpkg: fglrx-utils 8.41.7-1
Uploading unstable 8.41.7 drivers


------------------------+
 PKGBUILD               |  133 +++++++++++++++++++++++++++++++++++++++++++++++
 amdcccle.desktop       |   18 ++++++
 ati-powermode.sh.patch |   13 ++++
 atieventsd.sh          |   41 ++++++++++++++
 fglrx-utils.install    |   39 +++++++++++++
 fglrx.sh               |   11 +++
 6 files changed, 255 insertions(+)


Index: unstable/modules/fglrx-utils/PKGBUILD
diff -u /dev/null unstable/modules/fglrx-utils/PKGBUILD:1.1
--- /dev/null	Fri Sep 14 07:47:00 2007
+++ unstable/modules/fglrx-utils/PKGBUILD	Fri Sep 14 07:47:00 2007
@@ -0,0 +1,133 @@
+# $Id: PKGBUILD,v 1.1 2007/09/14 11:47:00 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=fglrx-utils
+pkgver=8.41.7
+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 provided in this package also applies to
+# kernel module pkgs, and is noted in their PKGBUILDs
+license=('custom:"fglrx"') 
+#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')
+conflicts=('libgl' 'ati-drivers-module' 'ati-drivers' 'nvidia') 
+provides=('libgl')
+install=fglrx-utils.install
+source=(http://www2.ati.com/drivers/linux/ati-driver-installer-$pkgver-x86.x86_64.run \
+        amdcccle.desktop fglrx.sh atieventsd.sh ati-powermode.sh.patch)
+md5sums=('0b43b45499ced87a6bd30d99faed25cc'
+         '1f4b870e977b155af549442932e8ce6f'
+         'bdafe749e046bfddee2d1c5e90eabd83'
+         'f729bf913613f49b0b9759c246058a87'
+         '150c5cd49e9affe3635415aa9d9c00e6')
+sha1sums=('fe556f3ffc6517586809278d8295ca254faefbf0'
+          'ec0271dfc6926efe28c791242a613c27b1f79bcb'
+          '5339ab8c6268bd8a886c56bd1ea25ecd2fe09985'
+          '3a9444e247e46df62c8effb64f8ed39d3665c5c5'
+          'afd5121c6c5520929e5a274780721e3200cce590')
+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/fglrx/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/fglrx.sh \
+            $startdir/pkg/etc/profile.d/fglrx.sh
+    # Add ATI Events Daemon launcher
+    install -m 0755 -D $startdir/src/atieventsd.sh \
+            $startdir/pkg/etc/rc.d/atieventsd
+
+}
+
Index: unstable/modules/fglrx-utils/amdcccle.desktop
diff -u /dev/null unstable/modules/fglrx-utils/amdcccle.desktop:1.1
--- /dev/null	Fri Sep 14 07:47:00 2007
+++ unstable/modules/fglrx-utils/amdcccle.desktop	Fri Sep 14 07:47:00 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: unstable/modules/fglrx-utils/ati-powermode.sh.patch
diff -u /dev/null unstable/modules/fglrx-utils/ati-powermode.sh.patch:1.1
--- /dev/null	Fri Sep 14 07:47:00 2007
+++ unstable/modules/fglrx-utils/ati-powermode.sh.patch	Fri Sep 14 07:47:00 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: unstable/modules/fglrx-utils/atieventsd.sh
diff -u /dev/null unstable/modules/fglrx-utils/atieventsd.sh:1.1
--- /dev/null	Fri Sep 14 07:47:00 2007
+++ unstable/modules/fglrx-utils/atieventsd.sh	Fri Sep 14 07:47:00 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: unstable/modules/fglrx-utils/fglrx-utils.install
diff -u /dev/null unstable/modules/fglrx-utils/fglrx-utils.install:1.1
--- /dev/null	Fri Sep 14 07:47:00 2007
+++ unstable/modules/fglrx-utils/fglrx-utils.install	Fri Sep 14 07:47:00 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 "fglrx-\$kernel - ie. beyond kernel module is fglrx-beyond"
+  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: unstable/modules/fglrx-utils/fglrx.sh
diff -u /dev/null unstable/modules/fglrx-utils/fglrx.sh:1.1
--- /dev/null	Fri Sep 14 07:47:00 2007
+++ unstable/modules/fglrx-utils/fglrx.sh	Fri Sep 14 07:47:00 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