--- fglrx-installer-8.723.1.orig/debian/fglrx-dev.install.in
+++ fglrx-installer-8.723.1/debian/fglrx-dev.install.in
@@ -0,0 +1,6 @@
+debian/overrides/fglrx-dev                  usr/share/lintian/overrides
+
+usr/include/*                               usr/include
+usr/X11R6/include/*                         usr/include
+
+arch/#ARCH#/usr/X11R6/#LIBDIR#/*.a          usr/lib
--- fglrx-installer-8.723.1.orig/debian/fglrx.prerm
+++ fglrx-installer-8.723.1/debian/fglrx.prerm
@@ -0,0 +1,35 @@
+#!/bin/sh
+# prerm script for nvidia-current
+#
+# Copyright (C) 2007 Mario Limonciello
+# Copyright (C) 2009 Canonical Ltd
+# Authors: Alberto Milone
+
+
+PACKAGE_NAME=fglrx
+CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
+
+remove_dkms_module() {
+	echo "Removing all DKMS Modules"
+	dkms remove -m $PACKAGE_NAME -v $CVERSION --all > /dev/null
+	echo "Done."
+}
+
+case "$1" in
+	upgrade)
+		remove_dkms_module 
+	;;
+	remove)
+		remove_dkms_module 
+	
+		update-alternatives --remove gl_conf /usr/lib/fglrx/ld.so.conf
+
+		# Trigger gmenu so as to update the gnome menu
+		dpkg-trigger gmenucache || true
+
+		# explicit ldconfig due to alternatives
+		ldconfig
+	;;
+esac
+
+#DEBHELPER#
--- fglrx-installer-8.723.1.orig/debian/fglrx.postrm
+++ fglrx-installer-8.723.1/debian/fglrx.postrm
@@ -0,0 +1,47 @@
+#! /bin/sh
+# postrm script fglrx
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postrm> `remove'
+#        * <postrm> `purge'
+#        * <old-postrm> `upgrade' <new-version>
+#        * <new-postrm> `failed-upgrade' <old-version>
+#        * <new-postrm> `abort-install'
+#        * <new-postrm> `abort-install' <old-version>
+#        * <new-postrm> `abort-upgrade' <old-version>
+#        * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see /usr/share/doc/packaging-manual/
+
+PKGNAME=fglrx
+BLACKLIST_FILE=/etc/modprobe.d/blacklist-fglrx.conf
+
+case "$1" in
+    remove|purge)
+        dpkg-divert --remove --rename --package $PKGNAME --divert /usr/lib/fglrx/libGL.so.1.2.xlibmesa /usr/lib/libGL.so.1.2 > /dev/null
+        dpkg-divert --remove --rename --package $PKGNAME --divert /usr/lib32/fglrx/libGL.so.1.2.xlibmesa /usr/lib32/libGL.so.1.2 > /dev/null
+        dpkg-divert --remove --rename --package $PKGNAME --divert /usr/lib/fglrx/libglx.so.xlibmesa /usr/lib/xorg/modules/extensions/libglx.so > /dev/null
+
+        # Remove blacklist file
+        rm -f $BLACKLIST_FILE
+
+        # Update initramfs, in case we were loaded into it
+        /usr/sbin/update-initramfs -u
+        ;;
+
+    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+        ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 0
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
--- fglrx-installer-8.723.1.orig/debian/clean
+++ fglrx-installer-8.723.1/debian/clean
@@ -0,0 +1,7 @@
+debian/10fglrx
+debian/dkms.conf
+debian/fglrx.install
+debian/fglrx-dev.install
+debian/fglrx-amdcccle.install
+debian/overrides/fglrx
+debian/modaliases/fglrx-modules.alias.override
--- fglrx-installer-8.723.1.orig/debian/fglrx-amdcccle.install.in
+++ fglrx-installer-8.723.1/debian/fglrx-amdcccle.install.in
@@ -0,0 +1,7 @@
+debian/overrides/fglrx-amdcccle usr/share/lintian/overrides
+usr/share/icons/*.xpm usr/share/pixmaps
+usr/share/ati usr/share
+usr/share/applications/*.desktop usr/share/fglrx
+usr/X11R6/bin/* #DRIDIR#/bin
+arch/#ARCH#/usr/X11R6/bin/amdcccle #DRIDIR#/bin
+
--- fglrx-installer-8.723.1.orig/debian/fglrx.manpages
+++ fglrx-installer-8.723.1/debian/fglrx.manpages
@@ -0,0 +1 @@
+usr/share/man/man8/atieventsd.8
--- fglrx-installer-8.723.1.orig/debian/fglrx.postinst
+++ fglrx-installer-8.723.1/debian/fglrx.postinst
@@ -0,0 +1,143 @@
+#!/bin/sh
+
+set -e
+
+PACKAGE_NAME=fglrx
+CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
+
+ARCH=`dpkg --print-architecture`
+
+# Check the existence of a kernel named as $1
+_is_kernel_name_correct() {
+    CORRECT="no"
+    KERNEL_NAME=$1
+    
+    for kernel in /boot/config-*; do
+        KERNEL=${kernel#*-}
+        if [ "${KERNEL}" = "${KERNEL_NAME}" ]; then
+            CORRECT="yes"
+            break
+        fi
+    done
+
+    echo $CORRECT
+}
+
+# Get the most recent kernel on Debian based systems. This keeps
+# into account both the version and the ABI. If the current kernel
+# is the most recent kernel then the function will print a null string.
+_get_newest_kernel_debian() {
+    NEWEST_KERNEL=
+    NEWEST_VERSION=
+    NEWEST_ABI=
+    
+    for kernel in /boot/config-*; do
+        KERNEL=${kernel#*-}
+        KERNEL_VERSION=${KERNEL%%-*}
+        ABI=${KERNEL#*-}
+        ABI=${ABI%%-*}
+
+        if [ -z "$NEWEST_KERNEL" ]; then
+            # The 1st time get a version which is bigger than $1
+            COMPARE_TO=$1
+        else
+            # Get the biggest version
+            COMPARE_TO="$NEWEST_VERSION-$NEWEST_ABI"
+        fi
+            
+        # if $kernel is greater than $COMPARE_TO
+        if [ `dpkg --compare-versions "$KERNEL_VERSION-$ABI" gt "$COMPARE_TO" && echo "yes" || \
+              echo "no"` = "yes" ]; then
+            NEWEST_KERNEL=$KERNEL
+            NEWEST_VERSION=$KERNEL_VERSION
+            NEWEST_ABI=$ABI
+        fi
+    done
+
+    echo "$NEWEST_KERNEL"
+}
+
+
+get_newest_kernel() {
+    NEWEST_KERNEL=
+    # Try Debian first as rpm can be installed in Debian based distros
+    if [ -e /usr/bin/dpkg ]; then
+        # If DEB based
+        CURRENT_KERNEL=$1
+        CURRENT_VERSION=${CURRENT_KERNEL%%-*}
+        CURRENT_ABI=${CURRENT_KERNEL#*-}
+        CURRENT_FLAVOUR=${CURRENT_ABI#*-}
+        CURRENT_ABI=${CURRENT_ABI%%-*}
+        NEWEST_KERNEL=$(_get_newest_kernel_debian "$CURRENT_VERSION-$CURRENT_ABI")
+
+    elif [ `which rpm &>/dev/null` ]; then
+        # If RPM based
+        NEWEST_KERNEL=$(_get_newest_kernel_rhel)
+    fi
+
+    # Make sure that kernel name that we extracted corresponds to an installed
+    # kernel
+    if [ -n "$NEWEST_KERNEL" ] && [ `_is_kernel_name_correct $NEWEST_KERNEL` = "no" ]; then
+        NEWEST_KERNEL=
+    fi
+
+    echo $NEWEST_KERNEL
+}
+
+
+if [ "$1" = "configure" ]; then
+
+    #check whether libglx.so got installed.  some releases earlier than x740
+    #will not actually have this libglx.so
+    if [ ! -f /usr/lib/xorg/modules/extensions/libglx.so ]; then
+        dpkg-divert --remove --rename --package xorg-driver-fglrx --divert /usr/lib/fglrx/libglx.so.xlibmesa /usr/lib/xorg/modules/extensions/libglx.so > /dev/null
+    fi
+
+    update-alternatives --force \
+        --install /etc/ld.so.conf.d/GL.conf gl_conf /usr/lib/fglrx/ld.so.conf 1000 \
+        --slave /usr/bin/aticonfig aticonfig /usr/lib/fglrx/bin/aticonfig \
+        --slave /usr/bin/atiode atiode /usr/lib/fglrx/bin/atiode \
+        --slave /usr/bin/amdnotifyui amdnotifyui /usr/lib/fglrx/bin/amdnotifyui \
+        --slave /usr/bin/amdcccle amdcccle /usr/lib/fglrx/bin/amdcccle \
+        --slave /usr/bin/amdxdg-su amdxdg_su /usr/lib/fglrx/bin/amdxdg-su \
+        --slave /usr/share/applications/ubuntu-amdcccle.desktop amdcccle_desktop /usr/share/fglrx/amdcccle.desktop \
+        --slave /usr/share/applications/ubuntu-amdccclesu.desktop amdccclesu_desktop /usr/share/fglrx/amdccclesu.desktop \
+        --slave /usr/bin/fgl_glxgears fgl_glxgears /usr/lib/fglrx/bin/fgl_glxgears \
+        --slave /usr/bin/fglrxinfo fglrxinfo /usr/lib/fglrx/bin/fglrxinfo \
+        --slave /usr/bin/atiodcli atiodcli  /usr/lib/fglrx/bin/atiodcli \
+        --slave /usr/bin/atieventsd atieventsd  /usr/lib/fglrx/bin/atieventsd \
+        --slave /usr/lib/xorg/modules/drivers/fglrx_drv.so fglrx_drv /usr/lib/fglrx/xorg/modules/drivers/fglrx_drv.so \
+        --slave /usr/lib/dri/fglrx_dri.so fglrx_dri /usr/lib/fglrx/dri/fglrx_dri.so \
+        --slave /usr/lib/libAMDXvBA.cap libAMDXvBA_cap /usr/lib/fglrx/libAMDXvBA.cap \
+        --slave /etc/modprobe.d/fglrx.conf fglrx_modconf /lib/fglrx/modprobe.conf \
+        --slave /etc/X11/Xsession.d/10fglrx 10fglrx /usr/lib/fglrx/10fglrx \
+        --slave /etc/ati ati_conf /usr/lib/fglrx/etc/ati \
+        --slave /usr/lib/xorg/extra-modules xorg_extra_modules /usr/lib/fglrx/xorg \
+    # ldconfig needs to be run immediately as we're changing /etc/ld.so.conf.d/ with
+    # alternatives.
+    LDCONFIG_NOTRIGGER=y ldconfig
+
+    # Trigger gmenu so that the icons will show up in the menu
+    dpkg-trigger gmenucache || true
+
+    CURRENT_KERNEL=$(uname -r)
+    NEWEST_KERNEL=$(get_newest_kernel "$KERNELS")
+
+    ALTERNATIVE=$(readlink /etc/alternatives/gl_conf)
+    if [ "$ALTERNATIVE" = "/usr/lib/fglrx/ld.so.conf" ]; then
+        # Update initramfs so that the blacklist ends up in the initramfs
+        update-initramfs -u
+            
+        if [ -n "$NEWEST_KERNEL" ] && [ ${CURRENT_KERNEL} != ${NEWEST_KERNEL} ]; then
+            # This can fail when dealing with a chroot see LP: #556653
+            update-initramfs -u -k $CURRENT_KERNEL || true
+        fi
+    fi
+
+    /usr/lib/dkms/common.postinst $PACKAGE_NAME $CVERSION /usr/share/$PACKAGE_NAME $ARCH $2
+
+    #Update the initramfs as radeon might get loaded from it normally
+    /usr/sbin/update-initramfs -u
+fi
+
+#DEBHELPER#
--- fglrx-installer-8.723.1.orig/debian/10fglrx.in
+++ fglrx-installer-8.723.1/debian/10fglrx.in
@@ -0,0 +1,12 @@
+LIBGL_DRIVERS_PATH=/#DRIDIR#/dri
+if [ `uname -m` = 'x86_64' ]; then
+  if [ -d /#DRIDIR32#/dri ]; then
+    LIBGL_DRIVERS_PATH=${LIBGL_DRIVERS_PATH}:/#DRIDIR32#/dri
+    if [ ! -z $LD_LIBRARY_PATH ]; then
+	LD_LIBRARY_PATH=$LD_LIBRARY_PATH:
+    fi
+    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}/usr/lib32
+    export LD_LIBRARY_PATH
+  fi
+fi
+export LIBGL_DRIVERS_PATH
--- fglrx-installer-8.723.1.orig/debian/amdcccle.desktop
+++ fglrx-installer-8.723.1/debian/amdcccle.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=ATI Catalyst Control Center
+Comment=ATI graphics adapter settings
+Name[de]=ATI Catalyst Control Center
+Comment[de]=ATI grafics adapter settings
+Icon=ccc_large.xpm
+Exec=amdcccle
+Path=/usr/bin
+Type=Application
+Terminal=0
+Categories=Application;Utility
--- fglrx-installer-8.723.1.orig/debian/rules
+++ fglrx-installer-8.723.1/debian/rules
@@ -0,0 +1,148 @@
+#!/usr/bin/make -f
+# Copyright (C) 2002-2005 Flavio Stanchina
+# Copyright (C) 2005-2006 Aric Cyr
+# Copyright (C) 2007-2010 Mario Limonciello
+
+# Figure out some magic versioning
+CVERSION := $(shell dpkg-parsechangelog | grep '^Version:' | cut -d' ' -f2 | cut -d- -f1 | cut -d\: -f2)
+DVERSION := $(shell dpkg-parsechangelog | grep '^Version:' | cut -d' ' -f2 | cut -d\: -f2)
+DISTRO   := $(shell dpkg-parsechangelog | grep '^Distribution:' | cut -d' ' -f2 | cut -d\: -f2)
+
+# Package names
+PKG_driver      := fglrx
+PKG_driver_dev  := fglrx-dev
+PKG_control     := fglrx-amdcccle
+
+#Directory naming schemes
+DRIDIR   := usr/lib/$(PKG_driver)
+DRIDIR32 := usr/lib32/$(PKG_driver)
+XMODDIR  := $(DRIDIR)/xorg/modules
+LIBDIR   := lib
+ARCH     := x86
+XARCH    := x750
+
+# This is a hack to make sure that
+# the blacklist file is available
+# early in the boot process when
+# /usr is on a separate partition.
+# See LP: #538071.
+PKG_LIBDIR := lib/fglrx
+
+ifeq ($(DEB_HOST_ARCH),amd64)
+	LIBDIR  := lib64
+	ARCH    := x86_64
+	XARCH   := $(XARCH)_64a
+endif
+
+# DEB_DH_SHLIBDEPS_ARGS_ALL="-Xlib32"
+
+clean:
+	dh clean
+
+
+build:
+	#Create important strings
+	for i in 10fglrx \
+			 dkms.conf \
+			 $(PKG_driver).install \
+			 $(PKG_driver_dev).install \
+			 $(PKG_control).install \
+			 overrides/$(PKG_driver); do \
+		sed -e "s|#XMODDIR#|$(XMODDIR)|"     \
+			-e "s|#XMODDIR32#|$(XMODDIR32)|" \
+			-e "s|#DRIDIR32#|$(DRIDIR32)|"   \
+			-e "s|#LIBDIR#|$(LIBDIR)|"       \
+			-e "s|#DRIDIR#|$(DRIDIR)|"       \
+			-e "s|#CVERSION#|$(CVERSION)|"   \
+			-e "s|#XARCH#|$(XARCH)|"   \
+			-e "s|#ARCH#|$(ARCH)|"   \
+			debian/$$i.in > debian/$$i;      \
+	done
+
+	# remove exec bit on everything
+	find arch \
+		etc \
+		lib \
+		module \
+		usr \
+		$(XARCH)     -type f | xargs chmod -x
+
+	# set executable on user apps
+	find arch/$(ARCH)/usr/sbin \
+		arch/$(ARCH)/usr/X11R6/bin \
+		usr/sbin/ -type f | xargs chmod a+x
+
+	# set exec bit on scripts
+	find lib etc debian -name "*.sh" -type f | xargs chmod +x
+
+	# Generate modaliases
+	sh -e debian/modaliases/fglrx_supported \
+		lib/modules/fglrx/build_mod/fglrxko_pci_ids.h > \
+		debian/modaliases/fglrx-modules.alias.override
+
+	dh build
+
+
+binary-arch:
+	#Steps that we can't easily represent in debhelper files or .in files yet
+ifeq ($(DEB_HOST_ARCH),amd64)
+	dh_install -p$(PKG_driver)    "arch/x86/usr/X11R6/lib/libAMD*.so*"           "$(DRIDIR32)"
+	dh_install -p$(PKG_driver) "arch/x86/usr/X11R6/lib/*.so*"           "$(DRIDIR32)"
+	dh_installdirs -p$(PKG_driver) "$(DRIDIR32)"
+	dh_install -p$(PKG_driver) "arch/x86/usr/X11R6/lib/modules/dri"     "$(DRIDIR32)"
+	dh_install -p$(PKG_driver) "arch/x86/usr/lib/*"                     "$(DRIDIR32)"
+
+	for i in \
+			debian/$(PKG_driver)/$(DRIDIR32)/dri/fglrx_dri.so \
+			debian/$(PKG_driver)/$(DRIDIR32)/libGL.so.* \
+			; do execstack -q $$i; execstack -c $$i; done
+
+	#they don't provide the symlink for us (starting at 8.699)
+	dh_link -p$(PKG_driver) $(DRIDIR32)/libatiuki.so.1.0 $(DRIDIR32)/libatiuki.so.1
+else
+	dh_installdirs -p$(PKG_driver)
+endif
+	dh_installdocs -p$(PKG_driver) usr/share/doc/fglrx/* --exclude ATI_LICENSE.TXT
+	dh_installinit -p$(PKG_driver) --name="atieventsd" --no-start --update-rcd-params="defaults 31"
+
+	#remove executable bits from stack
+	dh_install -p$(PKG_control)
+	execstack -c debian/$(PKG_control)/$(DRIDIR)/bin/amdcccle
+	dh_install -p$(PKG_driver)
+	for i in \
+			debian/$(PKG_driver)/$(DRIDIR)/bin/atiode \
+			debian/$(PKG_driver)/$(DRIDIR)/bin/amdnotifyui \
+			debian/$(PKG_driver)/$(DRIDIR)/dri/fglrx_dri.so \
+			debian/$(PKG_driver)/$(DRIDIR)/libGL.so.* \
+			; do execstack -q $$i; execstack -c $$i; done
+
+	# Make some additional scripts executable
+	find debian/$(PKG_control)/$(DRIDIR)/bin/ \
+		-type f | xargs chmod a+x
+
+	# Blacklist any other driver that udev may want to load instead of fglrx
+	printf "blacklist radeon\n" > $(CURDIR)/debian/$(PKG_driver)/$(PKG_LIBDIR)/modprobe.conf
+
+	#ld.so.conf
+	echo "/$(DRIDIR)" >	"$(CURDIR)/debian/$(PKG_driver)/$(DRIDIR)/ld.so.conf"
+ifeq ($(DEB_HOST_ARCH),amd64)
+	echo "/$(DRIDIR32)" >>	"$(CURDIR)/debian/$(PKG_driver)/$(DRIDIR)/ld.so.conf"
+endif
+
+
+	#Run the normal stuff
+	dh binary-arch
+
+binary: binary-arch binary-indep ;
+	#Run the normal stuff
+	dh binary
+
+override_dh_shlibdeps:
+ifeq ($(DEB_HOST_ARCH),amd64)
+	dh_shlibdeps -l$(CURDIR)/debian/fglrx/usr/lib/fglrx:$(CURDIR)/debian/fglrx/usr/lib32/fglrx -Xlib32
+else
+	dh_shlibdeps -l$(CURDIR)/debian/fglrx/usr/lib/fglrx
+endif
+
+%:
+	dh $@
--- fglrx-installer-8.723.1.orig/debian/fglrx.dirs
+++ fglrx-installer-8.723.1/debian/fglrx.dirs
@@ -0,0 +1,4 @@
+usr/lib/fglrx
+usr/share/fglrx
+lib/fglrx
+usr/lib/fglrx/etc/ati
--- fglrx-installer-8.723.1.orig/debian/fglrx-dev.links
+++ fglrx-installer-8.723.1/debian/fglrx-dev.links
@@ -0,0 +1,4 @@
+usr/lib/libfglrx_gamma.so.1 usr/lib/libfglrx_gamma.so
+usr/lib/libfglrx_pp.so.1 usr/lib/libfglrx_pp.so
+usr/lib/libfglrx_dm.so.1 usr/lib/libfglrx_dm.so
+usr/lib/libfglrx_tvout.so.1 usr/lib/libfglrx_tvout.so
--- fglrx-installer-8.723.1.orig/debian/fglrx.install.in
+++ fglrx-installer-8.723.1/debian/fglrx.install.in
@@ -0,0 +1,41 @@
+#Lintian overrides
+debian/overrides/fglrx                          usr/share/lintian/overrides
+
+#Actual kernel modules
+lib/modules/fglrx/build_mod/*                   usr/src/fglrx-#CVERSION#
+debian/dkms/*                                   usr/src/fglrx-#CVERSION#
+arch/#ARCH#/lib/modules/fglrx/build_mod/lib*    usr/src/fglrx-#CVERSION#
+debian/dkms.conf                                usr/src/fglrx-#CVERSION#
+
+#DRI stuff
+arch/#ARCH#/usr/X11R6/#LIBDIR#/libAMD*          #DRIDIR#
+
+#debian integration
+debian/overrides/fglrx                          usr/share/lintian/overrides
+debian/acpi/fglrx-*-aticonfig                   etc/acpi/events
+debian/acpi/fglrx-powermode.sh                  etc/acpi
+debian/10fglrx                                  #DRIDIR#
+etc/ati/*                                       #DRIDIR#/etc/ati
+debian/replacements/authatieventsd.sh           #DRIDIR#/etc/ati
+
+#binaries
+arch/#ARCH#/usr/sbin/*                          #DRIDIR#/bin
+arch/#ARCH#/usr/X11R6/bin/ati*                  #DRIDIR#/bin
+arch/#ARCH#/usr/X11R6/bin/fgl*                  #DRIDIR#/bin
+usr/sbin/*sh                                    usr/share/fglrx
+
+#DRI stuff
+arch/#ARCH#/usr/X11R6/#LIBDIR#/liba*.so*        #DRIDIR#
+arch/#ARCH#/usr/X11R6/#LIBDIR#/libf*.so*        #DRIDIR#
+arch/#ARCH#/usr/X11R6/#LIBDIR#/libX*.so*        #DRIDIR#
+arch/#ARCH#/usr/X11R6/#LIBDIR#/libG*.so*        #DRIDIR#
+arch/#ARCH#/usr/X11R6/#LIBDIR#/modules/dri      #DRIDIR#
+
+#Xorg stuff
+#XARCH#/usr/X11R6/#LIBDIR#/modules/*.so         #XMODDIR#
+#XARCH#/usr/X11R6/#LIBDIR#/modules/drivers      #XMODDIR#
+#XARCH#/usr/X11R6/#LIBDIR#/modules/linux        #XMODDIR#
+#XARCH#/usr/X11R6/#LIBDIR#/modules/extensions   #XMODDIR#
+
+#CAL stuff
+arch/#ARCH#/usr/#LIBDIR#/*                      #DRIDIR#
--- fglrx-installer-8.723.1.orig/debian/fglrx-modaliases.install
+++ fglrx-installer-8.723.1/debian/fglrx-modaliases.install
@@ -0,0 +1 @@
+debian/modaliases/fglrx-modules.alias.override usr/share/jockey/modaliases
--- fglrx-installer-8.723.1.orig/debian/changelog.in
+++ fglrx-installer-8.723.1/debian/changelog.in
@@ -0,0 +1,362 @@
+fglrx-installer (2:8.620-0ubuntu3) karmic; urgency=low
+
+  * debian/dkms/patches/missing-flush_tlb.patch (LP: #394176)
+    - Borrow this patch from debian to fix missing symbol.
+  * debian/dkms.conf.in:
+    - Apply patches on 2.6.30 and 2.6.31.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Thu, 02 Jul 2009 12:05:20 -0500
+
+fglrx-installer (2:8.620-0ubuntu2) karmic; urgency=low
+
+  * Issues resolved since 9.4 (No package changes; Mario just beat me to the upload):
+    + With desktop effects enabled, transparent desktop no longer causes desktop icons and
+      application windows to disappear
+    + Video playback no longer exhibits corruption when desktop effects are enabled and
+      Composite is not explicitly disabled
+    + [Ubuntu 8.10] System now functions properly when starting X on surround view
+      systems
+    + Resizing DVD playback window on Mplayer no longer causes blank video
+    + System instability no longer occurring when switching to full screen DVD playback
+      with Totem Player
+    + Terminal window no longer displays error message when launching Catalyst Control
+      Center in MultiView
+    + [Ubuntu 9.04] Xserver now starts properly with ATI Radeon HD 4870 GPU
+      configurations
+    + [Ubuntu 9.04] When xrandr --prop is evoked, Xserver failure no longer occurs under
+      various system configurations
+    + The engine clock and memory clock values are now reported properly by ATI CAL
+    + Catalyst Control Center, the primary display is now identified when using the
+      Identify Displays button
+    + Error message no longer occurs while setting the TV geometry
+    + Game corruption does not happen in full screen when 2 monitors are connected and
+      RandR 1.2 is enabled
+    + TV screen corruption is no longer visible while starting the X-server on some ASICs
+    + Executing the following command : aticonfig --initial -f does not cause the following
+      message "No supported adapters detected" on some display adapters
+    + Detecting second display using amdccle "Detect Display" button no longer results in
+      error and will require a relaunch to detect both displays properly
+      (LP: #348400)
+    + Mplayer does not fail to render video when resizing DVD playback window
+    + Fixed: Some system may become unresponsive after starting and killing X-server
+      (LP: #355821)
+    + System no longer fail to respond when executing multiple server
+      generations
+    + Memory leak on RV630 (LP: #368271)
+    + dpms switches off backlight on laptop screen properly (LP: #363059)
+    + Display Preferences no longer causes 100% CPU usage and failure (LP: #366757)
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Fri, 26 Jun 2009 22:07:19 -0700
+
+fglrx-installer (2:8.620-0ubuntu1) karmic; urgency=low
+
+  * New upstream release (9-6)
+  * Add a series of patches to get this compiling on 2.6.30. (LP: #387773)
+    - Note: these are NOT in the upstream package, so be cognizant when
+      upgrading to a new version of the package in Ubuntu.
+    - config_x86_32-gentoo.patch: From Gentoo bug tracker
+    - fglrx-2.6.29-debian.patch: From Debian SVN
+    - fglrx-2.6.30-irqreturn_t.patch: From Gentoo bug tracker
+    - fglrx-missing-pci_enable_msi.patch: From Gentoo bug tracker
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 24 Jun 2009 12:26:42 -0500
+
+fglrx-installer (2:8.600-0ubuntu2) jaunty; urgency=low
+
+  * Update fglrx-rt-compat.patch.  Thanks Alessio Igor Bogani (LP: #328856)
+  * Update location of fglrx-rt-compat.patch from debian/dkms/patches/patches
+    to debian/dkms/patches
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Tue, 31 Mar 2009 12:12:37 -0500
+
+fglrx-installer (2:8.600-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release.  (Closes LP: #313027, #314600)
+    - Fixes LP: #253988, #179042, #241176, #284408, #287229, #296497,
+      #288620, #289628
+  * README.Debian: Update the update procedure a bit
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Tue, 17 Mar 2009 15:40:42 -0700
+
+fglrx-installer (2:8.573-0ubuntu4) jaunty; urgency=low
+
+  * debian/xorg-driver-fglrx.postinst:
+    - Transition start of atieventsd with priority 31.  It needs to start after
+      GDM and oem-config to ensure there aren't any lockups. (LP: #330188)
+  * debian/rules:
+    - Start atieventsd at 31. 
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Mon, 16 Feb 2009 16:52:25 -0600
+
+fglrx-installer (2:8.573-0ubuntu3) jaunty; urgency=low
+
+  * debian/10fglrx.in:
+    - Check if LD_LIBRARY_PATH is empty when we append to it. (LP: #323327)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Mon, 09 Feb 2009 18:50:46 -0600
+
+fglrx-installer (2:8.573-0ubuntu2) jaunty; urgency=low
+
+  * debian/control:
+    - Add libxinerama1 to build depends.
+  * debian/xorg-driver-fglrx.preinst:
+    - Move user modifications out of the way for files that are stored in 
+      /etc/ati when upgrading package.  Unfortunately, although these files
+      are stored in /etc, AMD has indicated that they should not be treated
+      as conf files. (LP: 307643)
+  * debian/fglrx-kernel-source.prerm:
+    - Add in a check for old versions of fglrx that might have DKMS directories
+      sitting around.  If any are found, they are removed so as to prevent possible
+      conflicts. (LP: #303148)
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Mon, 02 Feb 2009 14:31:34 -0600
+
+fglrx-installer (2:8.573-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release. (9-1).
+    - This release still does *not* meet the Xorg server 1.6 ABI.
+      It is being uploaded to ensure that there are no other integration
+      related issues that come up.
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Thu, 29 Jan 2009 20:37:38 -0600
+
+fglrx-installer (2:8.552-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release.
+  * debian/control:
+    - Don't list the graphics cards supported, this is a moving target
+      that is difficult to keep up with. (LP: #292436)
+  * Move replacements for kernel source into debian/dkms
+  * Add patch for RT support to debian/dkms (LP: #286961)
+  * debian/dkms.conf.in:
+    - Use RT patch.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Thu, 13 Nov 2008 10:30:20 -0600
+
+fglrx-installer (2:8.543-0ubuntu4) intrepid; urgency=low
+
+  [ Mario Limonciello ]
+  * debian/rules:
+    - Don't copy the libAMDXvBA.so* into multiple packages
+      on AMD64 (LP: #287159)
+  * debian/control:
+    - xorg-driver-fglrx: Drop libamdxvba1 to suggests so that fglrx can be put
+      onto DVDs.
+  * Replace authatieventsd.sh with our own variation that works with KDM.
+    (LP: #38915)
+
+  [ Matthias Klose ]
+  * debian/control:
+    - xorg-driver-fglrx: Drop dependency on ia32-libs [amd64], add dependencies
+      on lib32gcc1 [amd64], libc6-i386 [amd64].
+    - libamdxvba1: Add dependency on ia32-libs [amd64].
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 22 Oct 2008 11:55:59 -0500
+
+fglrx-installer (2:8.543-0ubuntu3) intrepid; urgency=low
+
+  * debian/control:
+    - Drop build-depends on libstdc++5. (LP: #271794)
+    - Drop build-depends on ia32-libs
+    - Install libAMDXvBA.so* into it's own package.
+  * debian/rules:
+    - Work around missing libstdc++5 at build-depends time.
+  * Add the following files to support this new binary package:
+    - debian/libamdxvba.postinst
+    - debian/libamdxvba.install.in
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Thu, 16 Oct 2008 15:04:46 -0500
+
+fglrx-installer (2:8.543-0ubuntu2) intrepid; urgency=low
+
+  * debian/control:
+    - Depends on linux-headers-generic | linux-headers to help
+      cover more of the 90 percent case that people are using the
+      generic kernel (LP: #284091)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Thu, 16 Oct 2008 08:52:34 -0500
+
+fglrx-installer (2:8.543-0ubuntu1) intrepid; urgency=low
+
+  * New upstream release.  (Closes lp: #247376)
+  * control: Re-enabled provides of xserver-xorg-video-2 since
+    this upload works with the current xserver.
+  * README.Debian: Itemize update procedure
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Tue, 14 Oct 2008 14:12:06 -0700
+
+fglrx-installer (2:8.532-0ubuntu5) intrepid; urgency=low
+
+  * control: xorg-driver-fglrx Provides: xserver-xorg-video-2. The 
+    driver doesn't work with the current xserver, so no reason to 
+    pretend that it would. This prevents breaking upgrades from hardy 
+    where the driver would be updated and on reboot X would fail.
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com>  Thu, 25 Sep 2008 11:46:28 +0300
+
+fglrx-installer (2:8.532-0ubuntu4) intrepid; urgency=low
+
+  * Update 2.6.27 patch again. (LP: #266956)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Sun, 21 Sep 2008 15:32:19 -0500
+
+fglrx-installer (2:8.532-0ubuntu3) intrepid; urgency=low
+
+  [ Alberto Milone (tseliot) ]
+  * debian/modaliases/fglrx_supported:
+    - Add "xorg-driver-fglrx" to the strings printed to
+      fglrx-modules.alias.override so that Jockey can
+      detect the name of the package to install (LP: #258641)
+
+  [ Mario Limonciello ]
+  * debian/kernel-source-patches/fglrx_8.9_2.6.27.patch:
+    - Update to compile on x86_64 for 2.6.27 (LP: #266956)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Sun, 21 Sep 2008 12:29:18 -0500
+
+fglrx-installer (2:8.532-0ubuntu2) intrepid; urgency=low
+
+  * debian/fglrx-kernel-source.patches:
+    - Install to DKMS patches directory (LP: #266956)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Fri, 19 Sep 2008 08:49:21 -0500
+
+fglrx-installer (2:8.532-0ubuntu1) intrepid; urgency=low
+
+  * Add debian/kernel-source-patches/fglrx_8.9_2.6.27.patch
+    to allow compiling against 2.6.27. (LP: #266956)
+  * debian/dkms.conf.in:
+    - Use 2.6.27 patch when building against 2.6.27
+  * debian/fglrx-kernel-source.install.in:
+    - Install patches in kernel-source-patches.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Thu, 18 Sep 2008 12:08:46 -0500
+
+fglrx-installer (2:8.522-0ubuntu4) intrepid; urgency=low
+
+  * Rebuild against the new xserver-xorg-dev. 
+
+ -- Bryce Harrington <bryce@bryceharrington.org>  Fri, 12 Sep 2008 00:54:13 +0000
+
+fglrx-installer (2:8.522-0ubuntu3) intrepid; urgency=low
+
+  "3rd time's a charm"
+  * Don't divert extensions either.  Causes big breakage when starting X.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 20 Aug 2008 12:47:26 -0500
+
+fglrx-installer (2:8.522-0ubuntu2) intrepid; urgency=low
+
+  * Don't install extensions directory as no additional
+    extensions are included in this version.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 20 Aug 2008 12:38:10 -0500
+
+fglrx-installer (2:8.522-0ubuntu1) intrepid; urgency=low
+
+  * New upstream release.
+  * Drop 02_2.6.26_support.dpatch as 2.6.26 support is available now.
+  * debian/control:
+    - Conflict w/ pentium-builder (LP: #180831)
+    - Update nvidia conflicts (LP: #254969)
+  * Correct LIBGL_DRIVERS_PATH (LP: #250944)
+  * Cleanup diversion prerm scripts (LP: #257003)
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 20 Aug 2008 12:34:16 -0500
+
+fglrx-installer (2:8.512-0ubuntu1) intrepid; urgency=low
+
+  * New upstream release.
+  * Update 02_2.6.26_support.dpatch for changes in firegl_public.c.
+  * debian/control:
+    - Depend upon libstdc++5.
+  * debian/xorg-driver-fglrx.postrm:
+    - Clean up AMD64 diversions properly.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Mon, 21 Jul 2008 13:58:26 -0500
+
+fglrx-installer (2:8.501-0ubuntu3) intrepid; urgency=low
+
+  * drop debian/patches/01_2.6.25.patch:
+    - Causes regressions on RadeonHD 3670 hardware.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Mon, 07 Jul 2008 14:37:55 -0500
+
+fglrx-installer (2:8.501-0ubuntu2) intrepid; urgency=low
+
+  [ Mario Limonciello ]
+  * debian/fglrx-modaliases.install:
+    - Install to /usr/share/jockey/modaliases instead
+  * debian/control:
+    - Bump standards version to 3.8.0.
+    - Add fglrx-amdcccle to xorg-driver-fglrx Recommends
+  * debian/rules:
+    - Don't start atieventsd on package install as it steals X permissions
+      until the next reboot.
+    - Add support to apply patches to the development release.  This is
+      determined by querying distro target in the changelog.  
+      -- Don't use packages not intended for your distro! --
+  * debian/README.Debian:
+    - Add a small blurb explaining kernel patches.
+
+  [ Žilvinas Valinskas ]
+  * debian/patches/01_2.6.25.patch:
+    - Adds 2.6.25 support (valid for AMD's 8-5 release), at least until
+      AMD formally adds it.
+  * debian/patches/02_2.6.26.patch:
+    - Adds 2.6.26 support (valid for AMD's 8-6 release), at least until
+      AMD formally adds it. (LP: #239967)
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Mon, 07 Jul 2008 12:06:05 -0500
+
+fglrx-installer (2:8.501-0ubuntu1) intrepid; urgency=low
+
+  * New upstream release.
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Thu, 19 Jun 2008 01:46:54 -0500
+
+fglrx-installer (2:8.493.1-0ubuntu5) intrepid; urgency=low
+
+  * debian/replacements/*
+    - Include Makefile and make.sh that support passing kernel version
+      as a parameter until upstream resolves issues.
+  * debian/dkms.conf.in:
+    - Explicitly use kernel version as parameter to make scripts.
+  * debian/fglrx-kernel-source.in:
+    - Include our variants of make scripts since upstream hasn't fixed
+      there's yet.
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Thu, 12 Jun 2008 15:34:14 -0500
+
+fglrx-installer (2:8.493.1-0ubuntu4) intrepid; urgency=low
+
+  * debian/control:
+  - Force the Section to be restricted/misc instead of just restricted.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Tue, 27 May 2008 15:26:38 -0500
+
+fglrx-installer (2:8.493.1-0ubuntu3) intrepid; urgency=low
+
+  * debian/control:
+  - Explicitly only indicate i386 and amd64 for ALL binary packages.  We don't want
+    sparc, hppa, or lpia showing up.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Tue, 27 May 2008 14:34:13 -0500
+
+fglrx-installer (2:8.493.1-0ubuntu2) intrepid; urgency=low
+
+  * debian/rules:
+    - Specify $(LIBDIR) for calculating modaliases.
+      Fixes transient failure on AMD64 boxes.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Tue, 27 May 2008 14:23:21 -0500
+
+fglrx-installer (2:8.493.1-0ubuntu1) intrepid; urgency=low
+
+  * Initial release.
+    - This package was directly generated from the upstream AMD driver's built-in
+      scripts.  By generating this way, the driver will always be in sync without
+      integration problems.
+
+ -- Mario Limonciello <Mario_Limonciello@Dell.com>  Tue, 27 May 2008 10:50:16 -0500
+
--- fglrx-installer-8.723.1.orig/debian/compat
+++ fglrx-installer-8.723.1/debian/compat
@@ -0,0 +1 @@
+7
--- fglrx-installer-8.723.1.orig/debian/README.Debian
+++ fglrx-installer-8.723.1/debian/README.Debian
@@ -0,0 +1,82 @@
+ATI video drivers for Ubuntu
+============================
+
+Further information can be found at http://www.ati.com/ -- look for
+the "Drivers & Software" page and follow links to the Linux drivers.
+
+This package is generated automatically via the official ATI driver
+installer that is available from the above homepage.
+
+DKMS
+-------------------------
+   Ubuntu includes support to build modules using a utility
+   developed by Dell, called DKMS.  It will automatically
+   build your kernel module for you when you first boot into
+   the kernel (or as necessary)
+
+   See the DKMS man page for more information.
+
+Source building
+-------------------------
+Starting with Intrepid, an extra target has been added to allow
+--buildpkg Ubuntu/source.  This target should be adequate for 
+sending up to the Ubuntu archive.  By keeping the same source package
+in both places, there should be fewer conflicts for people.
+
+On a semiregular basis, the debian/changelog should be merged
+into this package, but people adding to the Ubuntu archive should
+be sure to update these sorts of things otherewise.
+
+Kernel patches
+-------------------------
+If you need to provide a kernel patch (say for a kernel not formally
+supported yet by AMD), you can add this patch in the debian/patches
+directory.  It will only be used for the current development release,
+as indicated in debian/rules.  When upgrading from current development
+release to next development release, this codename in debian/rules should
+be bumped too.
+
+Update procedure
+-------------------------
+When a new -fglrx is available, do the following to update
+fglrx-installer:
+
+0.  On your build system, make sure you have the prerequisites
+    installed:
+
+    $ sudo apt-get build-dep fglrx-installer
+
+1.  Download the archive file and unpack it to get the .run file
+
+2.  Do a --buildpkg Ubuntu/source, which will build a diff.gz,
+    orig.tar.gz and an unsigned dsc.  For example:
+
+    $ bash ./ati-driver-installer-*.run --buildpkg Ubuntu/source
+
+    This might prompt for your password for sudo privs.  It may
+    install things to your system it needs for constructing the
+    source packages, such as cdbs, libstdc++, etc.  (As of 8.600
+    it seems to no longer do this for source pkgs.)
+
+3.  dpkg-source -x that dsc to unpack it into a directory, then
+    cd into the resultant directory.
+
+4.  dch -e to update the new changelog entry.
+    Make sure to mark out any bugs that get closed with it.
+
+    Also doublecheck that it includes debian/ changes up to the current
+    Ubuntu version; if not, some merging may be required.
+
+5.  debuild -S to produce a new .dsc
+
+6.  Verify the new .dsc produces valid .debs by running it through
+    pbuilder, sbuild, etc. as usual.
+
+7.  Install and test the .debs, and then dput the .changes file
+
+If any changes to files in debian/ are needed, make sure to let the
+maintainer (Mario aka superm1) know, so he can sync them into the git
+tree AMD pulls from.
+
+
+ -- Bryce Harrington <bryce@ubuntu.com>, Tue, 14 Oct 2008 13:27:15 -0700
--- fglrx-installer-8.723.1.orig/debian/fglrx.default
+++ fglrx-installer-8.723.1/debian/fglrx.default
@@ -0,0 +1,3 @@
+# Powerstate switching on ACPI events for 
+# lid open/close and AC adapter on/off
+FGLRX_ACPI_SWITCH_POWERSTATES=false
--- fglrx-installer-8.723.1.orig/debian/fglrx.preinst
+++ fglrx-installer-8.723.1/debian/fglrx.preinst
@@ -0,0 +1,108 @@
+#! /bin/sh
+# preinst script for fglrx
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+#
+# For details see /usr/share/doc/packaging-manual/
+
+PKGNAME=fglrx
+OLDPKGNAME=xorg-driver-fglrx
+
+if [ `dpkg --print-architecture` = "amd64" ]; then
+	HAS_LIB32="yes"
+fi
+
+fix_diversions()
+{
+    # Remove very old style diversions
+    if [ -d /usr/share/fglrx/diversions ]; then
+	if [ -n "$HAS_LIB32" ]; then
+	    dpkg-divert --remove --package $OLDPKGNAME \
+		--divert /usr/share/fglrx/diversions/libGL.so.1.2_32bit \
+		--rename /usr/lib32/libGL.so.1.2
+	fi
+
+	dpkg-divert --remove --package $OLDPKGNAME \
+	    --divert /usr/share/fglrx/diversions/libGL.so.1.2 \
+	    --rename /usr/lib/libGL.so.1.2
+
+	rmdir /usr/share/fglrx/diversions || true
+    fi
+
+    #remove old and unnecessary libGL.so.1 symlinks
+    if [ -L /usr/lib/fglrx/libGL.so.1.xlibmesa ]; then
+        rm  /usr/lib/fglrx/libGL.so.1.xlibmesa
+    fi
+
+    if [ -L /usr/lib32/fglrx/libGL.so.1.xlibmesa ]; then
+        rm  /usr/lib32/fglrx/libGL.so.1.xlibmesa
+    fi
+    #remove unnecessary X11R6 symlinks that may not have
+    #been cleaned up in earlier releases
+    for i in /usr/lib/libGL.so.1 \
+             /usr/lib32/libGL.so.1 \
+             /usr/X11R6/lib/libGL.so.1 \
+             /usr/X11R6/lib/libGL.so.1.2 \
+             /usr/X11R6/lib32/libGL.so.1 \
+             /usr/X11R6/lib32/libGL.so.1.2 ; do \
+	dpkg-divert --remove --package $OLDPKGNAME $i > /dev/null; \
+     done
+
+    #before 8.699 we had to divert libdri
+    if dpkg-divert --list $OLDPKGNAME | \
+       grep /usr/lib/xorg/modules/extensions/libdri.so > /dev/null ; then
+        rm -f /usr/lib/xorg/modules/extensions/libdri.so > /dev/null
+        dpkg-divert --remove --rename --package $OLDPKGNAME \
+        --divert /usr/lib/fglrx/libdri.so.xlibmesa \
+        /usr/lib/xorg/modules/extensions/libdri.so > /dev/null
+    fi
+
+}
+
+case "$1" in
+    install|upgrade)
+
+        ### remove old fglrx diversions ###
+	fix_diversions
+
+        # Remove the file if it's not a symlink (see LP: #552903)
+        if [ ! -L /etc/X11/Xsession.d/10fglrx ]; then
+            rm -f /etc/X11/Xsession.d/10fglrx
+        fi
+
+        ## Just in case they installed without debs before, finish a proper uninstall routine ##
+        ## This will error out on any failure (which should be cleaned up anyway before installing debs) ##
+        [ -x /usr/share/ati/fglrx-uninstall.sh ] && /usr/share/ati/fglrx-uninstall.sh
+
+        # Remove the directory if it's not a symlink (as it should be
+        # a slave link now)
+        if [ ! -L /etc/ati ]; then
+            rm -Rf /etc/ati
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+
+
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- fglrx-installer-8.723.1.orig/debian/fglrx.atieventsd.init
+++ fglrx-installer-8.723.1/debian/fglrx.atieventsd.init
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides:          atieventsd
+# Required-Start:    $syslog
+# Required-Stop:     $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Start daemon at boot time
+# Description:       Enable service provided by daemon.
+### END INIT INFO
+
+# Original design:
+# Copyright (c) 2006, ATI Technologies Inc.  All rights reserved.
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+DAEMONPATH=/usr/sbin/atieventsd
+DAEMONNAME=atieventsd
+DAEMONOPTS=""
+
+[ -f $DAEMONPATH ] || exit 0
+
+. /lib/lsb/init-functions
+
+case "$1" in
+    start)
+        log_daemon_msg "Starting $DAEMONNAME"
+	start-stop-daemon --start --quiet --oknodo --exec $DAEMONPATH -- $DAEMONOPTS
+        log_end_msg $?
+        ;;
+
+    stop)
+        log_daemon_msg "Stopping $DAEMONNAME"
+	start-stop-daemon --stop --quiet --exec $DAEMONPATH --oknodo
+        log_end_msg $?
+        ;;
+
+    restart)
+        $0 stop
+        sleep 1
+        $0 start
+        ;;
+
+    reload|force-reload) log_daemon_msg "Reloading isn't supported by $DAEMONNAME"
+        log_end_msg 0
+	;;
+
+    *)
+        echo "$0 {start|stop|restart}"
+        exit 1
+        ;;
+esac
+
+exit 0
+
--- fglrx-installer-8.723.1.orig/debian/fglrx.links
+++ fglrx-installer-8.723.1/debian/fglrx.links
@@ -0,0 +1,8 @@
+usr/lib/fglrx/libfglrx_gamma.so.1.0 usr/lib/fglrx/libfglrx_gamma.so.1
+usr/lib/fglrx/libfglrx_pp.so.1.0 usr/lib/fglrx/libfglrx_pp.so.1
+usr/lib/fglrx/libfglrx_dm.so.1.0 usr/lib/fglrx/libfglrx_dm.so.1
+usr/lib/fglrx/libfglrx_tvout.so.1.0 usr/lib/fglrx/libfglrx_tvout.so.1
+usr/lib/fglrx/libatiuki.so.1.0 usr/lib/fglrx/libatiuki.so.1
+usr/lib/fglrx/libGL.so.1.2 usr/lib/fglrx/libGL.so.1
+usr/lib/fglrx/libGL.so.1 usr/lib/fglrx/libGL.so
+usr/lib/fglrx/libAMDXvBA.so.1.0 usr/lib/fglrx/libAMDXvBA.so.1
--- fglrx-installer-8.723.1.orig/debian/dkms.conf.in
+++ fglrx-installer-8.723.1/debian/dkms.conf.in
@@ -0,0 +1,11 @@
+PACKAGE_NAME="fglrx"
+PACKAGE_VERSION="#CVERSION#"
+CLEAN="rm -f *.*o"
+BUILT_MODULE_NAME[0]="fglrx"
+MAKE[0]="cd ${dkms_tree}/fglrx/#CVERSION#/build; sh make.sh --nohints --uname_r=$kernelver --norootcheck"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/char/drm"
+AUTOINSTALL="yes"
+PATCH[0]="rt_preempt_28.patch"
+PATCH_MATCH[0]="^2.6.28\-[0-9]*\-rt$"
+PATCH[1]="rt_preempt_31.patch"
+PATCH_MATCH[1]="^2.6.31\-[0-9]*\-rt$"
--- fglrx-installer-8.723.1.orig/debian/control
+++ fglrx-installer-8.723.1/debian/control
@@ -0,0 +1,79 @@
+Source: fglrx-installer
+Section: restricted/misc
+Priority: extra
+Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+Uploaders: Mario Limonciello <superm1@ubuntu.com>, Alberto Milone <albertomilone@alice.it>
+Build-Depends: debhelper (>= 7),
+               libxext6, 
+               libxrandr2, 
+               libice6, 
+               libsm6, 
+               libfontconfig1, 
+               libxi6, 
+               libxcursor1, 
+               fakeroot, 
+               libdrm2,
+               libgl1-mesa-glx,
+               libxinerama1,
+               libqtgui4,
+               execstack
+Standards-Version: 3.8.3
+Homepage: http://ati.amd.com/support/driver.html
+
+Package: fglrx
+Architecture: amd64 i386
+Recommends: fglrx-amdcccle
+Depends: ${shlibs:Depends}, xserver-xorg-core, lib32gcc1 [amd64], libc6-i386 [amd64], dkms, make, linux-libc-dev, linux-headers-generic | linux-headers
+Conflicts: libamdxvba1
+Replaces: libamdxvba1
+Provides: libamdxvba1
+Description: Video driver for the ATI graphics accelerators
+ Video driver for the ATI Radeon and FireGL graphics accelerators.
+ .
+ This package provides 2D display drivers
+ and hardware accelerated OpenGL.
+
+Package: fglrx-dev
+Architecture: amd64 i386
+Depends: fglrx
+Conflicts: fglrx-driver-dev, xfree86-driver-fglrx-dev
+Replaces: fglrx-driver-dev, xfree86-driver-fglrx-dev, xorg-driver-fglrx-dev
+Description: Video driver for the ATI graphics accelerators (devel files)
+ Video driver for the ATI Radeon and FireGL graphics accelerators.
+ .
+ This package provides definitions for the GL and GLX extensions
+ and the FGLRXGAMMA extension interface library.
+
+Package: fglrx-amdcccle
+Architecture: amd64 i386
+Depends: fglrx, ${shlibs:Depends}
+Conflicts: fglrx-control-qt2, fglrx-control
+Replaces: fglrx-control
+Description: Catalyst Control Center for the ATI graphics accelerators
+ Catalyst Control Center for the ATI Radeon and FireGL graphics accelerators.
+ .
+ This package provides the Catalyst Control Center, Linux Edition
+
+Package: fglrx-modaliases
+Section: admin
+Architecture: amd64 i386
+Description: Identifiers supported by the ATI graphics driver
+ In order to identify what hardware is supported by Jockey,
+ there must be a static list of what the current driver in the Ubuntu
+ archive supports.
+ .
+ This package provides that list.
+
+Package: xorg-driver-fglrx
+Architecture: i386 amd64
+Depends: fglrx
+Description: Transitional package for xorg-driver-fglrx
+ This is a transitional package for xorg-driver-fglrx, and can be safely
+ removed after the installation is complete.
+
+Package: fglrx-kernel-source
+Architecture: i386 amd64
+Depends: fglrx
+Description: Transitional package for fglrx-kernel-source
+ This is a transitional package for fglrx-kernel-source, and can be safely
+ removed after the installation is complete.
--- fglrx-installer-8.723.1.orig/debian/copyright
+++ fglrx-installer-8.723.1/debian/copyright
@@ -0,0 +1,223 @@
+This package was debianized by Mario Limonciello <superm1@ubuntu.com> on
+Tue, 27 May 2008 10:22:21 -0600.
+
+The latest Linux graphics driver was downloaded from the 
+AMD website (www.amd.com), and then this package was generated using:
+
+	sh $VERSION.run --buildpkg Ubuntu/source
+
+----------------------------------------------------------------------------
+
+Driver License:
+
+Copyright 2008 AMD Inc.
+
+ATI Software End User License Agreement
+
+PLEASE  READ  THIS  LICENSE  CAREFULLY  BEFORE  USING   THE   SOFTWARE.   BY
+DOWNLOADING, INSTALLING, COPYING OR USING THE SOFTWARE, YOU ARE AGREEING  TO
+BE BOUND BY THE TERMS OF THIS LICENSE.  IF YOU ARE  ACCESSING  THE  SOFTWARE
+ELECTRONICALLY,  SIGNIFY  YOUR  AGREEMENT  BY  CLICKING  THE  "AGREE/ACCEPT"
+BUTTON.  IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE,  PROMPTLY  RETURN
+THE SOFTWARE TO THE PLACE WHERE YOU OBTAINED IT  AND  (IF  APPLICABLE)  YOUR
+MONEY WILL BE REFUNDED OR IF THE SOFTWARE WAS ACCESSED ELECTRONICALLY  CLICK
+"DISAGREE/DECLINE".
+
+1. License.  ATI Technologies Inc., on behalf of  itself,  its  subsidiaries
+and licensors (referred collectively as "ATI") grants to you  the  following
+non-exclusive,  right  to  use  the  software  accompanying   this   License
+(hereinafter "Software") subject to the following terms and limitations:
+
+(a)   Regardless of the media upon which it is distributed, the Software  is
+licensed to you for use solely in conjunction with ATI hardware products  to
+which the Software relates ("ATI Hardware").
+
+(b)   You own the medium on which the Software is recorded, but ATI and,  if
+applicable,  its  licensors  retain  title  to  the  Software  and   related
+documentation.
+
+(c)   You may:
+
+  i) use the Software solely in  connection  with  the  ATI  Hardware  on  a
+   single computer;
+
+  ii) make one copy of the Software  in  machine-readable  form  for  backup
+   purposes only. You must reproduce on such copy ATI's copyright notice and
+   any other proprietary legends that were  on  the  original  copy  of  the
+   Software;
+
+  iii) transfer all your license rights in the Software  provided  you  must
+   also transfer a copy of this License, the backup copy  of  the  Software,
+   the ATI Hardware and the related documentation  and  provided  the  other
+   party reads and agrees  to  accept  the  terms  and  conditions  of  this
+   License.  Upon such transfer your license rights are then terminated.
+
+(d)   In addition to the license terms above, with respect  to  portions  of
+the Software in source code or binary  form  designed  exclusively  for  use
+with the Linux operating system ("ATI Linux Code"), you  may  use,  display,
+modify, copy, distribute, allow others to  re-distribute,  package  and  re-
+package such ATI Linux Code  for  commercial  and  non-commercial  purposes,
+provided that:
+
+   i) all binary components of the ATI Linux Code are not  modified  in  any
+   way;
+
+   ii) the ATI Linux Code is only used  as  part  of  the  Software  and  in
+   connection with ATI Hardware;
+
+   iii) all copyright notices of ATI are reproduced and you refer  to  these
+   license terms;
+
+   iv) you  may  not  offer  or  impose any terms on the use  of  ATI  Linux
+   Code that alter or restrict this License; and
+
+   v) if you have modified the ATI Linux Code, such  modifications  will  be
+   made publicly available and are licensed under the  same  terms  provided
+   herein to ATI or any  other  third  party  without  further  restriction,
+   royalty or any other license requirement;
+
+   vi) to  the  extent  there  is  any ATI sample or  control  panel  source
+   code included in the ATI Linux Code, no rights are granted to modify such
+   code except for portions thereof that  may  be  subject  to  third  party
+   license terms that grant such rights; and
+
+   vii) ATI is not obligated to provide any maintenance or technical support
+   for any code resulting from ATI Linux Code.
+
+2.  Restrictions.  The Software contains copyrighted and patented  material,
+trade secrets and other proprietary material.  In  order  to  protect  them,
+and except as permitted by this license or applicable legislation,  you  may
+not:
+
+  a) decompile,  reverse  engineer,  disassemble  or  otherwise  reduce  the
+   Software to a human-perceivable form;
+
+  b) modify, network, rent, lend,  loan,  distribute  or  create  derivative
+   works based upon the Software in whole or in part; or
+
+  c) electronically transmit the Software from one computer  to  another  or
+   over a network or otherwise transfer the Software except as permitted  by
+   this License.
+
+3.  Termination.  This License  is  effective  until  terminated.   You  may
+terminate this License at any  time  by  destroying  the  Software,  related
+documentation  and  all  copies  thereof.   This  License   will   terminate
+immediately without  notice  from  ATI  if  you  fail  to  comply  with  any
+provision of this License.  Upon termination you must destroy the  Software,
+related documentation and all copies thereof.
+
+4.  Government End Users. If you are acquiring the  Software  on  behalf  of
+any  unit  or  agency  of  the  United  States  Government,  the   following
+provisions apply.  The Government  agrees  the  Software  and  documentation
+were  developed  at  private  expense  and  are  provided  with  "RESTRICTED
+RIGHTS".  Use, duplication, or disclosure by the Government  is  subject  to
+restrictions as set forth in DFARS 227.7202-1(a) and  227.7202-3(a)  (1995),
+DFARS 252.227-7013(c)(1)(ii) (Oct 1988), FAR  12.212(a)(1995),  FAR  52.227-
+19, (June 1987) or FAR 52.227-14(ALT III) (June 1987),as amended  from  time
+to time.  In the event that this License, or any  part  thereof,  is  deemed
+inconsistent with the minimum rights identified  in  the  Restricted  Rights
+provisions, the minimum rights shall prevail.
+
+5.  No Other License.  No rights or licenses are granted by ATI  under  this
+License, expressly or  by  implication,  with  respect  to  any  proprietary
+information  or  patent,  copyright,  trade  secret  or  other  intellectual
+property right owned or controlled by ATI, except as expressly  provided  in
+this License.
+
+6.  Additional Licenses.  DISTRIBUTION  OR  USE  OF  THE  SOFTWARE  WITH  AN
+OPERATING SYSTEM MAY REQUIRE ADDITIONAL LICENSES FROM THE  OPERATING  SYSTEM
+VENDOR.
+
+7.  Disclaimer of Warranty  on  Software.   You  expressly  acknowledge  and
+agree that use of the Software is at  your  sole  risk.   The  Software  and
+related documentation are provided "AS IS" and without warranty of any  kind
+and ATI EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED,  INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF  MERCHANTABILITY  AND  FITNESS
+FORA PARTICULAR  PURPOSE,  OF  QUALITY,  OF  QUIET  ENJOYMENT  AND  OF  NON-
+INFRINGEMENT  OF  THIRD  PARTY  RIGHTS.   ATI  DOES  NOT  WARRANT  THAT  THE
+FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET  YOUR  REQUIREMENTS,  OR  THAT
+THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE,  OR  THAT
+DEFECTS IN THE SOFTWARE WILL BE  CORRECTED.   THE  ENTIRE  RISK  AS  TO  THE
+RESULTS AND PERFORMANCE OF THE SOFTWARE IS  ASSUMED  BY  YOU.   FURTHERMORE,
+ATI DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS  REGARDING  THE  USE  ORTHE
+RESULTS OF THE USE OF THE SOFTWARE OR  RELATED  DOCUMENTATION  IN  TERMS  OF
+THEIR CORRECTNESS, ACCURACY,  RELIABILITY,  CURRENTNESS,  OR  OTHERWISE.  NO
+ORAL OR WRITTEN INFORMATION OR ADVICE  GIVEN  BY  ATI  OR  ATI'S  AUTHORIZED
+REPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE  SCOPE  OF
+THIS WARRANTY.  SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU  (AND  NOT  ATI  OR
+ATI'S AUTHORIZED REPRESENTATIVE) ASSUME THE ENTIRE  COST  OF  ALL  NECESSARY
+SERVICING, REPAIR OR CORRECTION.  THE SOFTWARE IS NOT INTENDED  FOR  USE  IN
+MEDICAL, LIFE SAVING OR LIFE SUSTAINING  APPLICATIONS.   SOME  JURISDICTIONS
+DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES,  SO  THE  ABOVE  EXCLUSION
+MAY NOT APPLY TO YOU.
+
+8.  Limitation of Liability. TO THE MAXIMUM EXTENT PERMITTED BY  LAW,  UNDER
+NO  CIRCUMSTANCES  INCLUDING  NEGLIGENCE,  SHALL  ATI,  OR  ITS   DIRECTORS,
+OFFICERS, EMPLOYEES  OR  AGENTS,  BE  LIABLE  TO  YOU  FOR  ANY  INCIDENTAL,
+INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES (INCLUDING DAMAGES  FOR  LOSS  OF
+BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS  OF  BUSINESSINFORMATION,  AND
+THE LIKE) ARISING OUT OF THE USE, MISUSE OR INABILITY TO  USE  THE  SOFTWARE
+OR RELATED DOCUMENTATION, BREACH OR DEFAULT, INCLUDING  THOSE  ARISING  FROM
+INFRINGEMENT OR ALLEGED INFRINGEMENT OF ANY PATENT, TRADEMARK, COPYRIGHT  OR
+OTHER INTELLECTUAL PROPERTY RIGHT, BY ATI, EVEN IF ATI OR  ATI'S  AUTHORIZED
+REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF  SUCH  DAMAGES.   SOME
+JURISDICTIONS DO NOT ALLOW THE LIMITATION  OR  EXCLUSION  OF  LIABILITY  FOR
+INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE  LIMITATION  OR  EXCLUSION
+MAY NOT APPLY TO YOU.  ATI will not be liable for 1) loss of, or damage  to,
+your records or data or 2) any damages claimed by you  based  on  any  third
+party claim.   In no event shall  ATI's  total  liability  to  you  for  all
+damages, losses, and causes of action (whether in contract, tort  (including
+negligence) or otherwise) exceed the amount paid by you  for  the  Software.
+The foregoing limitations will apply even if  the  above  stated  limitation
+fails of its essential purpose.
+
+9.  Controlling Law and Severability.  This License  shall  be  governed  by
+and construed under the laws of the  Province  of  Ontario,  Canada  without
+reference to its conflict of law principles.   Any  dispute  related  hereto
+will be brought only in the courts in  Toronto,  Ontario,  Canada  and  such
+courts are agreed  to  be  the  convenient  forum.   In  the  event  of  any
+conflicts between foreign law, rules, and  regulations,  and  Canadian  law,
+rules, and regulations, Canadian law, rules and  regulations  shall  prevail
+and  govern.   The  United  Nations  Convention   on   Contracts   for   the
+International Sale of Goods shall not apply to this  License.   If  for  any
+reason a court  of  competent  jurisdiction  finds  any  provision  of  this
+License or portion thereof, to  be  unenforceable,  that  provision  of  the
+License shall be enforced to the maximum extent permissible so as to  effect
+the intent of the parties, and the remainder of this License shall  continue
+in full force and effect.
+
+10.  Complete Agreement.  This  License  constitutes  the  entire  agreement
+between the parties with respect to the use of the Software and the  related
+documentation, and supersedes all prior  or  contemporaneous  understandings
+or  agreements,  written  or  oral,  regarding  such  subject  matter.    No
+amendment to or modification of this  License  will  be  binding  unless  in
+writing and signed by a duly authorized representative of ATI.
+
+----------------------------------------------------------------------------
+Packaging scripts:
+  Copyright (C) 2002-2005 Flavio Stanchina
+  Copyright (C) 2005-2006 Aric Cyr
+  Copyright (C) 2007-2009 Mario Limonciello
+
+The packaging scripts are copyrighted under the MIT license.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
--- fglrx-installer-8.723.1.orig/debian/changelog
+++ fglrx-installer-8.723.1/debian/changelog
@@ -0,0 +1,567 @@
+fglrx-installer (2:8.723.1-0ubuntu4) lucid-proposed; urgency=low
+
+  * Remove /etc/ati only after calling the fglrx-uninstall.sh
+    script. This will solve problems with dist-upgrades when
+    packages from the ati installer have been previously
+    installed (LP: #565407).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 27 Apr 2010 11:19:23 +0200
+
+fglrx-installer (2:8.723.1-0ubuntu3) lucid; urgency=low
+
+  * debian/fglrx.preinst:
+    - Prevent dist-upgrades from failing when removing diversions
+      on libdri.so if the file still exists (LP: #567425).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 22 Apr 2010 17:59:12 +0200
+
+fglrx-installer (2:8.723.1-0ubuntu2) lucid; urgency=low
+
+  * debian/fglrx.dirs, fglrx.install.in, fglrx.postinst,
+    fglrx.preinst:
+    - Make /etc/ati a slave link which points to
+      /usr/lib/fglrx/etc/ati. This will avoid issues when
+      upgrading packages with user modified files in
+      /etc/ati (LP: #559587, LP: #440233).
+    - Make sure to remove /etc/ati if it's not a link.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 14 Apr 2010 17:37:14 +0200
+
+fglrx-installer (2:8.723.1-0ubuntu1) lucid; urgency=low
+
+  * New upstream release:
+    - Prevent the driver from causing X to segfault with
+      certain cards (LP: #554191).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Sun, 11 Apr 2010 14:57:42 +0200
+
+fglrx-installer (2:8.721-0ubuntu10) lucid; urgency=low
+
+  * debian/rules:
+    - check DEB_HOST_ARCH, not DEB_BUILD_ARCH, so a cross-build
+      test is useful for detecting problems...
+    - handle dh_installdirs differently, since dh apparently calls this oddly
+      (due to the varying architecture fields in debian/control, I think?)
+    - can't use {foo,bar} expansions with /bin/sh; move the list of files to
+      remove to debian/clean.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Fri, 09 Apr 2010 23:30:13 +0000
+
+fglrx-installer (2:8.721-0ubuntu9) lucid; urgency=low
+
+  * debian/rules: make sure dh_installdirs is called before trying to write
+    out modprobe.conf in a directory it creates.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Fri, 09 Apr 2010 22:30:21 +0000
+
+fglrx-installer (2:8.721-0ubuntu8) lucid; urgency=low
+
+  * debian/rules, fglrx.dirs, fglrx.postinst:
+    - Install the blacklist file in /lib/fglrx instead of
+      /usr/lib/fglrx so that the file is available early
+      in the boot process when /usr is on a different
+      partition (LP: #538071).
+    - Ignore errors when trying to update the initramfs
+      with -k $CURRENT_KERNEL which is known to fail when
+      using chroots (LP: #556653).
+    - Make 10fglrx a slave link so that it's removed from
+      /etc/X11/Xsession.d when we switch to a different
+      alternative (LP: #552903).
+  * debian/fglrx.preinst:
+    - Make sure that any 10fglrx file in /etc/X11/Xsession.d
+      which is not a symbolic link is removed.
+    - Remove diversions previously added by xorg-driver-fglrx
+      not by fglrx (LP: #552782). Thanks to Steve Langasek
+      for spotting the problem.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 08 Apr 2010 18:37:48 +0200
+
+fglrx-installer (2:8.721-0ubuntu7) lucid; urgency=low
+
+  * debian/control:
+    - Do not conflict with the old packages name (LP: #545992).
+    - Provide libamdxvba1.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 30 Mar 2010 12:18:49 +0200
+
+fglrx-installer (2:8.721-0ubuntu6) lucid; urgency=low
+
+  * fglrx-supported:
+    - The package name that gets installed is now 'fglrx'.  Make sure that's
+      what is listed in the modaliases.
+
+ -- Mario Limonciello <Mario_Limonciello@Dell.com>  Mon, 29 Mar 2010 17:07:50 -0500
+
+fglrx-installer (2:8.721-0ubuntu5) lucid; urgency=low
+
+  * debian/control:
+    - Add transitional packages for xorg-driver-fglrx and
+      fglrx-kernel-source so that trying to install them doesn't
+      result in the removal of the xserver any longer. 
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 22 Mar 2010 10:41:54 +0100
+
+fglrx-installer (2:8.721-0ubuntu4) lucid; urgency=low
+
+  * debian/control:
+    - Set Ubuntu Core Developers as the maintainers instead of Mario
+      as he requested.
+  * debian/fglrx.postinst:
+    - Add slave link to libAMDXvBA.cap in /usr/lib so that programs
+      using the VA API can work correctly. Thanks to Kano for
+      spotting the problem.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Sun, 21 Mar 2010 10:49:48 +0100
+
+fglrx-installer (2:8.721-0ubuntu3) lucid; urgency=low
+
+  * debian/rules:
+    - Fix problem with buildds by using binary-arch instead of binary
+      and by calling binary-arch and binary-indep from binary.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Sat, 20 Mar 2010 18:28:10 +0100
+
+fglrx-installer (2:8.721-0ubuntu2) lucid; urgency=low
+
+  * Correct the log of the previous revision. 
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Fri, 19 Mar 2010 22:26:04 +0100
+
+fglrx-installer (2:8.721-0ubuntu1) lucid; urgency=low
+
+  * New upstream release:
+    - Restore compatibility with kernel 2.6.32 and xserver 1.7 (LP: #494699).
+    * Port packaging to the new alternatives system (LP: #258038).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 17 Mar 2010 10:14:45 +0100
+
+fglrx-installer (2:8.660-0ubuntu6) lucid; urgency=low
+
+  * debian/control:
+    - Provide xserver-xorg-video-5 so as to make the package
+      uninstallable until AMD restores compatibility with X. 
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 10 Feb 2010 10:14:14 -0500
+
+fglrx-installer (2:8.660-0ubuntu5) lucid; urgency=low
+
+  * Add 05-fix_missing_signal_include.diff, which lets fglrx compile against
+    Linux 2.6.32-rc5. Thanks to Stefan Bühler for his patch. Fixed in debian
+    fglrx-driver (1:9-10-2) (LP: #485444) 
+
+ -- SevenMachines <SevenMachines@yahoo.co.uk>  Fri, 20 Nov 2009 06:50:27 +0000
+
+fglrx-installer (2:8.660-0ubuntu4) karmic; urgency=low
+
+  * Force fglrx-rt-compat.patch applied only on 2.6.28
+  * Added new patch for rt kernel flavour (rt_preempt_31.patch) (LP: #159941)
+
+ -- Alessio Igor Bogani <abogani@ubuntu.com>  Mon, 12 Oct 2009 22:31:02 +0200
+
+fglrx-installer (2:8.660-0ubuntu3) karmic; urgency=low
+
+  [ Alberto Milone]
+  * debian/control:
+    - Change the section of the -modaliases package to "admin" as
+      the package is not "restricted" (LP: #429153).
+
+  [ Kees Cook ]
+  * debian/control:
+    - Add build dependency on execstack.
+  * debian/rules:
+    - Drop executable stack markings from precompiled
+      binaries (LP: #409440).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Fri, 25 Sep 2009 18:36:42 +0200
+
+fglrx-installer (2:8.660-0ubuntu2) karmic; urgency=low
+
+  * The XVBA libraries have silently removed the dependency on libstdc++5
+    in driver version 8.63. Remove the dependency of the libamdxvba1 package
+    on libstdc++5. LP: #432021.
+
+ -- Matthias Klose <doko@ubuntu.com>  Sat, 19 Sep 2009 17:24:58 +0200
+
+fglrx-installer (2:8.660-0ubuntu1) karmic; urgency=low
+
+  * New upstream release.
+    + Fix freeze on boot with purple and green ubuntu logos
+      (LP: #423711)
+    + Fix boot failure due to DKMS change.  Sometimes X crashes as result.
+      (LP: #417617, #413751)
+    + Make fglrx compile with dkms on 2.6.30 and 2.6.31 for amd64
+      (LP: #410062)
+    + Fix "Desktop effects could not be enabled" on HD 4850 and HD 4870
+      (LP: #417500, #408633)
+    + Provide support for 2.6.31 kernel
+      (LP: #413791)
+    + Use Catalyst Control Center for display configuration
+      (LP: #410512)
+    + Catalyst Control Center shows up in Apps > Accessories, should be in
+      System > Administration > Display
+      (LP: #423670)
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Fri, 04 Sep 2009 15:05:07 -0700
+
+fglrx-installer (2:8.620-0ubuntu3) karmic; urgency=low
+
+  * debian/dkms/patches/missing-flush_tlb.patch (LP: #394176)
+    - Borrow this patch from debian to fix missing symbol.
+  * debian/dkms.conf.in:
+    - Apply patches on 2.6.30 and 2.6.31.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Thu, 02 Jul 2009 12:05:20 -0500
+
+fglrx-installer (2:8.620-0ubuntu2) karmic; urgency=low
+
+  * Issues resolved since 9.4 (No package changes; Mario just beat me to the upload):
+    + With desktop effects enabled, transparent desktop no longer causes desktop icons and
+      application windows to disappear
+    + Video playback no longer exhibits corruption when desktop effects are enabled and
+      Composite is not explicitly disabled
+    + [Ubuntu 8.10] System now functions properly when starting X on surround view
+      systems
+    + Resizing DVD playback window on Mplayer no longer causes blank video
+    + System instability no longer occurring when switching to full screen DVD playback
+      with Totem Player
+    + Terminal window no longer displays error message when launching Catalyst Control
+      Center in MultiView
+    + [Ubuntu 9.04] Xserver now starts properly with ATI Radeon HD 4870 GPU
+      configurations
+    + [Ubuntu 9.04] When xrandr --prop is evoked, Xserver failure no longer occurs under
+      various system configurations
+    + The engine clock and memory clock values are now reported properly by ATI CAL
+    + Catalyst Control Center, the primary display is now identified when using the
+      Identify Displays button
+    + Error message no longer occurs while setting the TV geometry
+    + Game corruption does not happen in full screen when 2 monitors are connected and
+      RandR 1.2 is enabled
+    + TV screen corruption is no longer visible while starting the X-server on some ASICs
+    + Executing the following command : aticonfig --initial -f does not cause the following
+      message "No supported adapters detected" on some display adapters
+    + Detecting second display using amdccle "Detect Display" button no longer results in
+      error and will require a relaunch to detect both displays properly
+      (LP: #348400)
+    + Mplayer does not fail to render video when resizing DVD playback window
+    + Fixed: Some system may become unresponsive after starting and killing X-server
+      (LP: #355821)
+    + System no longer fail to respond when executing multiple server
+      generations
+    + Memory leak on RV630 (LP: #368271)
+    + dpms switches off backlight on laptop screen properly (LP: #363059)
+    + Display Preferences no longer causes 100% CPU usage and failure (LP: #366757)
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Fri, 26 Jun 2009 22:07:19 -0700
+
+fglrx-installer (2:8.620-0ubuntu1) karmic; urgency=low
+
+  * New upstream release (9-6)
+  * Add a series of patches to get this compiling on 2.6.30. (LP: #387773)
+    - Note: these are NOT in the upstream package, so be cognizant when
+      upgrading to a new version of the package in Ubuntu.
+    - config_x86_32-gentoo.patch: From Gentoo bug tracker
+    - fglrx-2.6.29-debian.patch: From Debian SVN
+    - fglrx-2.6.30-irqreturn_t.patch: From Gentoo bug tracker
+    - fglrx-missing-pci_enable_msi.patch: From Gentoo bug tracker
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 24 Jun 2009 12:26:42 -0500
+
+fglrx-installer (2:8.600-0ubuntu2) jaunty; urgency=low
+
+  * Update fglrx-rt-compat.patch.  Thanks Alessio Igor Bogani (LP: #328856)
+  * Update location of fglrx-rt-compat.patch from debian/dkms/patches/patches
+    to debian/dkms/patches
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Tue, 31 Mar 2009 12:12:37 -0500
+
+fglrx-installer (2:8.600-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release.  (Closes LP: #313027, #314600)
+    - Fixes LP: #253988, #179042, #241176, #284408, #287229, #296497,
+      #288620, #289628
+  * README.Debian: Update the update procedure a bit
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Tue, 17 Mar 2009 15:40:42 -0700
+
+fglrx-installer (2:8.573-0ubuntu4) jaunty; urgency=low
+
+  * debian/xorg-driver-fglrx.postinst:
+    - Transition start of atieventsd with priority 31.  It needs to start after
+      GDM and oem-config to ensure there aren't any lockups. (LP: #330188)
+  * debian/rules:
+    - Start atieventsd at 31. 
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Mon, 16 Feb 2009 16:52:25 -0600
+
+fglrx-installer (2:8.573-0ubuntu3) jaunty; urgency=low
+
+  * debian/10fglrx.in:
+    - Check if LD_LIBRARY_PATH is empty when we append to it. (LP: #323327)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Mon, 09 Feb 2009 18:50:46 -0600
+
+fglrx-installer (2:8.573-0ubuntu2) jaunty; urgency=low
+
+  * debian/control:
+    - Add libxinerama1 to build depends.
+  * debian/xorg-driver-fglrx.preinst:
+    - Move user modifications out of the way for files that are stored in 
+      /etc/ati when upgrading package.  Unfortunately, although these files
+      are stored in /etc, AMD has indicated that they should not be treated
+      as conf files. (LP: 307643)
+  * debian/fglrx-kernel-source.prerm:
+    - Add in a check for old versions of fglrx that might have DKMS directories
+      sitting around.  If any are found, they are removed so as to prevent possible
+      conflicts. (LP: #303148)
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Mon, 02 Feb 2009 14:31:34 -0600
+
+fglrx-installer (2:8.573-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release. (9-1).
+    - This release still does *not* meet the Xorg server 1.6 ABI.
+      It is being uploaded to ensure that there are no other integration
+      related issues that come up.
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Thu, 29 Jan 2009 20:37:38 -0600
+
+fglrx-installer (2:8.552-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release.
+  * debian/control:
+    - Don't list the graphics cards supported, this is a moving target
+      that is difficult to keep up with. (LP: #292436)
+  * Move replacements for kernel source into debian/dkms
+  * Add patch for RT support to debian/dkms (LP: #286961)
+  * debian/dkms.conf.in:
+    - Use RT patch.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Thu, 13 Nov 2008 10:30:20 -0600
+
+fglrx-installer (2:8.543-0ubuntu4) intrepid; urgency=low
+
+  [ Mario Limonciello ]
+  * debian/rules:
+    - Don't copy the libAMDXvBA.so* into multiple packages
+      on AMD64 (LP: #287159)
+  * debian/control:
+    - xorg-driver-fglrx: Drop libamdxvba1 to suggests so that fglrx can be put
+      onto DVDs.
+  * Replace authatieventsd.sh with our own variation that works with KDM.
+    (LP: #38915)
+
+  [ Matthias Klose ]
+  * debian/control:
+    - xorg-driver-fglrx: Drop dependency on ia32-libs [amd64], add dependencies
+      on lib32gcc1 [amd64], libc6-i386 [amd64].
+    - libamdxvba1: Add dependency on ia32-libs [amd64].
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 22 Oct 2008 11:55:59 -0500
+
+fglrx-installer (2:8.543-0ubuntu3) intrepid; urgency=low
+
+  * debian/control:
+    - Drop build-depends on libstdc++5. (LP: #271794)
+    - Drop build-depends on ia32-libs
+    - Install libAMDXvBA.so* into it's own package.
+  * debian/rules:
+    - Work around missing libstdc++5 at build-depends time.
+  * Add the following files to support this new binary package:
+    - debian/libamdxvba.postinst
+    - debian/libamdxvba.install.in
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Thu, 16 Oct 2008 15:04:46 -0500
+
+fglrx-installer (2:8.543-0ubuntu2) intrepid; urgency=low
+
+  * debian/control:
+    - Depends on linux-headers-generic | linux-headers to help
+      cover more of the 90 percent case that people are using the
+      generic kernel (LP: #284091)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Thu, 16 Oct 2008 08:52:34 -0500
+
+fglrx-installer (2:8.543-0ubuntu1) intrepid; urgency=low
+
+  * New upstream release.  (Closes lp: #247376)
+  * control: Re-enabled provides of xserver-xorg-video-2 since
+    this upload works with the current xserver.
+  * README.Debian: Itemize update procedure
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Tue, 14 Oct 2008 14:12:06 -0700
+
+fglrx-installer (2:8.532-0ubuntu5) intrepid; urgency=low
+
+  * control: xorg-driver-fglrx Provides: xserver-xorg-video-2. The 
+    driver doesn't work with the current xserver, so no reason to 
+    pretend that it would. This prevents breaking upgrades from hardy 
+    where the driver would be updated and on reboot X would fail.
+
+ -- Timo Aaltonen <tepsipakki@ubuntu.com>  Thu, 25 Sep 2008 11:46:28 +0300
+
+fglrx-installer (2:8.532-0ubuntu4) intrepid; urgency=low
+
+  * Update 2.6.27 patch again. (LP: #266956)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Sun, 21 Sep 2008 15:32:19 -0500
+
+fglrx-installer (2:8.532-0ubuntu3) intrepid; urgency=low
+
+  [ Alberto Milone (tseliot) ]
+  * debian/modaliases/fglrx_supported:
+    - Add "xorg-driver-fglrx" to the strings printed to
+      fglrx-modules.alias.override so that Jockey can
+      detect the name of the package to install (LP: #258641)
+
+  [ Mario Limonciello ]
+  * debian/kernel-source-patches/fglrx_8.9_2.6.27.patch:
+    - Update to compile on x86_64 for 2.6.27 (LP: #266956)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Sun, 21 Sep 2008 12:29:18 -0500
+
+fglrx-installer (2:8.532-0ubuntu2) intrepid; urgency=low
+
+  * debian/fglrx-kernel-source.patches:
+    - Install to DKMS patches directory (LP: #266956)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Fri, 19 Sep 2008 08:49:21 -0500
+
+fglrx-installer (2:8.532-0ubuntu1) intrepid; urgency=low
+
+  * Add debian/kernel-source-patches/fglrx_8.9_2.6.27.patch
+    to allow compiling against 2.6.27. (LP: #266956)
+  * debian/dkms.conf.in:
+    - Use 2.6.27 patch when building against 2.6.27
+  * debian/fglrx-kernel-source.install.in:
+    - Install patches in kernel-source-patches.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Thu, 18 Sep 2008 12:08:46 -0500
+
+fglrx-installer (2:8.522-0ubuntu4) intrepid; urgency=low
+
+  * Rebuild against the new xserver-xorg-dev. 
+
+ -- Bryce Harrington <bryce@bryceharrington.org>  Fri, 12 Sep 2008 00:54:13 +0000
+
+fglrx-installer (2:8.522-0ubuntu3) intrepid; urgency=low
+
+  "3rd time's a charm"
+  * Don't divert extensions either.  Causes big breakage when starting X.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 20 Aug 2008 12:47:26 -0500
+
+fglrx-installer (2:8.522-0ubuntu2) intrepid; urgency=low
+
+  * Don't install extensions directory as no additional
+    extensions are included in this version.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 20 Aug 2008 12:38:10 -0500
+
+fglrx-installer (2:8.522-0ubuntu1) intrepid; urgency=low
+
+  * New upstream release.
+  * Drop 02_2.6.26_support.dpatch as 2.6.26 support is available now.
+  * debian/control:
+    - Conflict w/ pentium-builder (LP: #180831)
+    - Update nvidia conflicts (LP: #254969)
+  * Correct LIBGL_DRIVERS_PATH (LP: #250944)
+  * Cleanup diversion prerm scripts (LP: #257003)
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 20 Aug 2008 12:34:16 -0500
+
+fglrx-installer (2:8.512-0ubuntu1) intrepid; urgency=low
+
+  * New upstream release.
+  * Update 02_2.6.26_support.dpatch for changes in firegl_public.c.
+  * debian/control:
+    - Depend upon libstdc++5.
+  * debian/xorg-driver-fglrx.postrm:
+    - Clean up AMD64 diversions properly.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Mon, 21 Jul 2008 13:58:26 -0500
+
+fglrx-installer (2:8.501-0ubuntu3) intrepid; urgency=low
+
+  * drop debian/patches/01_2.6.25.patch:
+    - Causes regressions on RadeonHD 3670 hardware.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Mon, 07 Jul 2008 14:37:55 -0500
+
+fglrx-installer (2:8.501-0ubuntu2) intrepid; urgency=low
+
+  [ Mario Limonciello ]
+  * debian/fglrx-modaliases.install:
+    - Install to /usr/share/jockey/modaliases instead
+  * debian/control:
+    - Bump standards version to 3.8.0.
+    - Add fglrx-amdcccle to xorg-driver-fglrx Recommends
+  * debian/rules:
+    - Don't start atieventsd on package install as it steals X permissions
+      until the next reboot.
+    - Add support to apply patches to the development release.  This is
+      determined by querying distro target in the changelog.  
+      -- Don't use packages not intended for your distro! --
+  * debian/README.Debian:
+    - Add a small blurb explaining kernel patches.
+
+  [ Žilvinas Valinskas ]
+  * debian/patches/01_2.6.25.patch:
+    - Adds 2.6.25 support (valid for AMD's 8-5 release), at least until
+      AMD formally adds it.
+  * debian/patches/02_2.6.26.patch:
+    - Adds 2.6.26 support (valid for AMD's 8-6 release), at least until
+      AMD formally adds it. (LP: #239967)
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Mon, 07 Jul 2008 12:06:05 -0500
+
+fglrx-installer (2:8.501-0ubuntu1) intrepid; urgency=low
+
+  * New upstream release.
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Thu, 19 Jun 2008 01:46:54 -0500
+
+fglrx-installer (2:8.493.1-0ubuntu5) intrepid; urgency=low
+
+  * debian/replacements/*
+    - Include Makefile and make.sh that support passing kernel version
+      as a parameter until upstream resolves issues.
+  * debian/dkms.conf.in:
+    - Explicitly use kernel version as parameter to make scripts.
+  * debian/fglrx-kernel-source.in:
+    - Include our variants of make scripts since upstream hasn't fixed
+      there's yet.
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Thu, 12 Jun 2008 15:34:14 -0500
+
+fglrx-installer (2:8.493.1-0ubuntu4) intrepid; urgency=low
+
+  * debian/control:
+  - Force the Section to be restricted/misc instead of just restricted.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Tue, 27 May 2008 15:26:38 -0500
+
+fglrx-installer (2:8.493.1-0ubuntu3) intrepid; urgency=low
+
+  * debian/control:
+  - Explicitly only indicate i386 and amd64 for ALL binary packages.  We don't want
+    sparc, hppa, or lpia showing up.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Tue, 27 May 2008 14:34:13 -0500
+
+fglrx-installer (2:8.493.1-0ubuntu2) intrepid; urgency=low
+
+  * debian/rules:
+    - Specify $(LIBDIR) for calculating modaliases.
+      Fixes transient failure on AMD64 boxes.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Tue, 27 May 2008 14:23:21 -0500
+
+fglrx-installer (2:8.493.1-0ubuntu1) intrepid; urgency=low
+
+  * Initial release.
+    - This package was directly generated from the upstream AMD driver's built-in
+      scripts.  By generating this way, the driver will always be in sync without
+      integration problems.
+
+ -- Mario Limonciello <Mario_Limonciello@Dell.com>  Tue, 27 May 2008 10:50:16 -0500
+
--- fglrx-installer-8.723.1.orig/debian/acpi/fglrx-ac-aticonfig
+++ fglrx-installer-8.723.1/debian/acpi/fglrx-ac-aticonfig
@@ -0,0 +1,6 @@
+# /etc/acpi/events/fglrx-ac-aticonfig
+# Called when the user connects/disconnects ac power
+# 
+
+event=ac_adapter
+action=/etc/acpi/fglrx-powermode.sh
--- fglrx-installer-8.723.1.orig/debian/acpi/fglrx-lid-aticonfig
+++ fglrx-installer-8.723.1/debian/acpi/fglrx-lid-aticonfig
@@ -0,0 +1,6 @@
+# /etc/acpi/events/fglrx-lid-aticonfig
+# Called when the user opens or closes the laptop lid
+# 
+
+event=button[ /]lid
+action=/etc/acpi/fglrx-powermode.sh
--- fglrx-installer-8.723.1.orig/debian/acpi/fglrx-powermode.sh
+++ fglrx-installer-8.723.1/debian/acpi/fglrx-powermode.sh
@@ -0,0 +1,63 @@
+#!/bin/bash 
+
+. /etc/default/xorg-driver-fglrx
+if [ x$FGLRX_ACPI_SWITCH_POWERSTATES != xtrue ]; then
+  exit;
+fi
+
+getXuser() {
+        user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'`
+        if [ x"$user" = x"" ]; then
+                user=`finger| grep -m1 ":$displaynum" | awk '{print $1}'`
+        fi
+        if [ x"$user" != x"" ]; then
+                userhome=`getent passwd $user | cut -d: -f6`
+                export XAUTHORITY=$userhome/.Xauthority
+        else
+                export XAUTHORITY=""
+        fi
+}
+
+grep -q closed /proc/acpi/button/lid/*/state
+if [ $? = 0 ]; then
+ lid_closed=1
+else
+ lid_closed=0
+fi
+
+grep -q off-line /proc/acpi/ac_adapter/*/state 
+if [ $? = 0 ]; then
+   on_dc=1
+else
+   on_dc=0
+fi
+
+
+
+if [ ${lid_closed} -eq 1 -o ${on_dc} -eq 1 ]; then
+    echo "fglrx: setting low power"
+    for x in /tmp/.X11-unix/*; do
+	displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
+	getXuser;
+	if [ x"$XAUTHORITY" != x"" ]; then
+	    export DISPLAY=":$displaynum"	    
+	    powermode=`/usr/bin/aticonfig --lsp | grep -m1 low | cut -b 3-3`
+	    if [ x"$powermode" != x"" ]; then
+	        su $user -c "/usr/bin/aticonfig --set-powerstate=$powermode --effective=now" &>/dev/null
+	    fi
+	fi
+    done
+else
+    echo "fglrx: setting default powermode"
+    for x in /tmp/.X11-unix/*; do
+	displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
+	getXuser;
+	if [ x"$XAUTHORITY" != x"" ]; then
+	    export DISPLAY=":$displaynum"
+	    powermode=`/usr/bin/aticonfig --lsp | grep -m1 default | cut -b 3-3`
+	    if [ x"$powermode" != x"" ]; then
+	        su $user -c "/usr/bin/aticonfig --set-powerstate=$powermode --effective=now" &>/dev/null
+	    fi
+	fi
+    done
+fi
--- fglrx-installer-8.723.1.orig/debian/dkms/patches/rt_preempt_28.patch
+++ fglrx-installer-8.723.1/debian/dkms/patches/rt_preempt_28.patch
@@ -0,0 +1,26 @@
+--- a/firegl_public.c
++++ b/firegl_public.c
+@@ -1352,7 +1352,11 @@
+    int process_terminated = 1;
+   
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)  
++#if !defined(CONFIG_PREEMPT_RT)
+    rcu_read_lock();
++#else
++   preempt_disable();
++#endif
+ #else   
+    read_lock(&tasklist_lock);
+ #endif   
+@@ -1373,7 +1377,11 @@
+       }
+    }   
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)  
++#if !defined(CONFIG_PREEMPT_RT)
+    rcu_read_unlock();
++#else
++   preempt_enable();
++#endif
+ #else   
+    read_unlock(&tasklist_lock);
+ #endif   
--- fglrx-installer-8.723.1.orig/debian/dkms/patches/rt_preempt_31.patch
+++ fglrx-installer-8.723.1/debian/dkms/patches/rt_preempt_31.patch
@@ -0,0 +1,36 @@
+--- build_mod/firegl_public.c.orig	2009-10-13 23:26:53.583314294 +0200
++++ build_mod/firegl_public.c	2009-10-13 23:28:41.639335726 +0200
+@@ -135,6 +135,9 @@
+ #endif
+ #include <asm/delay.h>
+ #include <linux/agp_backend.h>
++#ifdef CONFIG_PREEMPT_RT
++#include <linux/semaphore.h>
++#endif
+ 
+ #ifndef EXPORT_NO_SYMBOLS
+ #define EXPORT_NO_SYMBOLS
+@@ -1025,7 +1028,11 @@ static int __init firegl_init_module(voi
+     dev->pubdev.signature = FGL_DEVICE_SIGNATURE;
+ 
+     for (i = 0; i < __KE_MAX_SPINLOCKS; i++)
++#if !defined (CONFIG_PREEMPT_RT)
+         dev->spinlock[i] = SPIN_LOCK_UNLOCKED;
++#else
++        spin_lock_init(&dev->spinlock[i]);
++#endif
+ 
+     for (i=0; i < __KE_MAX_SEMAPHORES; i++)
+         sema_init(&dev->struct_sem[i], 1);
+@@ -4998,7 +5005,11 @@ unsigned int ATI_API_CALL KAS_Mutex_GetO
+ unsigned int ATI_API_CALL KAS_Mutex_Initialize(void* hMutex)
+ {
+     kasMutex_t* mutex_obj = (kasMutex_t*)hMutex;
++#if !defined (CONFIG_PREEMPT_RT)
+     init_MUTEX(&(mutex_obj->mutex));
++#else
++    semaphore_init(&(mutex_obj->mutex));
++#endif
+     return 1;
+ }
+ 
--- fglrx-installer-8.723.1.orig/debian/replacements/authatieventsd.sh
+++ fglrx-installer-8.723.1/debian/replacements/authatieventsd.sh
@@ -0,0 +1,111 @@
+#!/bin/sh
+
+#
+# Control script grant/revoke access to X for the ATI External Events Daemon
+#
+# Distro maintainers may modify this reference script as necessary to conform
+# to their distribution policies.
+#
+# Copyright (c) 2006, ATI Technologies Inc.  All rights reserved.
+#
+
+#
+# Parameters:
+#   $1 is a keyword, either "grant" or "revoke"
+#   $2 is the display name
+#   $3 is the X authorization file to be authorized
+#
+# Returns:
+#   0 if authorization was successfully granted/revoked
+#   nonzero on failure
+#
+# Note:
+#   The third parameter only makes sense if xauth is being used.  If another
+#   mechanism such as xhost is being used it can be ignored.  For setups that
+#   do not do any form of authentication(!) this script can be trimmed down
+#   to just "exit 0" and the daemon will assume that it is always authorized.
+#
+
+GetServerAuthFile()
+{
+    # Determine where the authorization key may be hiding.  The location will
+    # vary depending upon whether X was started via xdm/kdm, gdm or startx, so
+    # check each one in turn.
+
+    # Check xdm
+
+    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
+    if [ -n "$XDM_AUTH_FILE" ]; then
+        SERVER_AUTH_FILE=$XDM_AUTH_FILE
+        DISP_SEARCH_STRING="#ffff#"
+        return 0
+    fi
+
+    # Check kdm
+    KDM_AUTH_MASK=/var/run/xauth/A$1*
+    KDM_AUTH_FILE=`ls -t $KDM_AUTH_MASK 2>/dev/null | head -n 1`   # Choose the newest file
+    if [ -n "$KDM_AUTH_FILE" ]; then
+        SERVER_AUTH_FILE=$KDM_AUTH_FILE
+        DISP_SEARCH_STRING="#ffff#"
+        return 0
+    fi
+
+    # Check gdm
+
+    GDM_AUTH_FILE=/var/lib/gdm/$1.Xauth
+    if [ -e $GDM_AUTH_FILE ]; then
+        SERVER_AUTH_FILE=$GDM_AUTH_FILE
+        DISP_SEARCH_STRING="$1"
+        return 0
+    fi
+
+    # Finally, check for startx
+
+    for XPID in `pidof X`; do
+        TRIAL_XAUTH_FILE=`tr '\0' '\n' < /proc/$XPID/environ | grep -e "^XAUTHORITY=" | cut -d= -f2`
+        TRIAL_XAUTH_KEY=`xauth -f $TRIAL_XAUTH_FILE list | grep "unix$1"`
+        if [ -n "$TRIAL_XAUTH_KEY" ]; then
+            SERVER_AUTH_FILE=$TRIAL_XAUTH_FILE
+            DISP_SEARCH_STRING="unix$1"
+            return 0
+        fi
+    done
+
+    # Couldn't find the key
+
+    return -1
+}
+
+# Main part of script
+
+#
+# Since the daemon is usually started during init time before X comes up,
+# $PATH may not yet contain the paths to the X binaries, particularly xauth.
+# Add the usual location for where xauth may live and fail out if we still
+# can't find it.
+#
+
+PATH=$PATH:/usr/bin:/usr/X11R6/bin
+which xauth > /dev/null || exit -1
+
+case "$1" in
+    grant)
+        GetServerAuthFile $2 || exit -1
+        DISP_AUTH_KEY=`xauth -f $SERVER_AUTH_FILE list | grep $DISP_SEARCH_STRING | awk '{ print $3 }'`
+        if [ -n "$DISP_AUTH_KEY" ]; then
+            xauth -f $3 add $2 . $DISP_AUTH_KEY || exit -1
+        else
+            exit -1
+        fi
+        ;;
+
+    revoke)
+        xauth -f $3 remove $2 || exit -1
+        ;;
+
+    *)
+        exit -1
+        ;;
+esac
+exit 0
--- fglrx-installer-8.723.1.orig/debian/overrides/fglrx-amdcccle
+++ fglrx-installer-8.723.1/debian/overrides/fglrx-amdcccle
@@ -0,0 +1,5 @@
+#We are in restricted, whether lintian has ever heard of it or not
+fglrx-amdcccle: unknown-section restricted
+
+#AMD doesn't appear to document these binaries
+fglrx-amdcccle: binary-without-manpage usr/bin/amdcccle
--- fglrx-installer-8.723.1.orig/debian/overrides/fglrx.in
+++ fglrx-installer-8.723.1/debian/overrides/fglrx.in
@@ -0,0 +1,25 @@
+#We are in restricted, whether lintian has ever heard of it or not
+fglrx: unknown-section restricted
+
+#These unfortunately are needed if we really want to be able to link?
+fglrx: arch-independent-package-contains-binary-or-object ./usr/src/fglrx-#CVERSION#/libfglrx_ip.a.GCC3
+fglrx: unstripped-binary-or-object ./usr/src/fglrx-#CVERSION#/libfglrx_ip.a.GCC3
+fglrx: arch-independent-package-contains-binary-or-object ./usr/src/fglrx-#CVERSION#/libfglrx_ip.a.GCC4
+fglrx: unstripped-binary-or-object ./usr/src/fglrx-#CVERSION#/libfglrx_ip.a.GCC4
+
+#AMD doesn't appear to document these binaries
+fglrx: binary-without-manpage usr/bin/aticonfig
+fglrx: binary-without-manpage usr/bin/atiodcli
+fglrx: binary-without-manpage usr/bin/atiode
+fglrx: binary-without-manpage usr/bin/fgl_glxgears
+fglrx: binary-without-manpage usr/bin/fglrx_xgamma
+fglrx: binary-without-manpage usr/bin/fglrxinfo
+fglrx: binary-without-manpage usr/sbin/atieventsd
+fglrx: binary-without-manpage usr/sbin/amdnotifyui
+
+#We have NO control of AMD's build process
+fglrx: sharedobject-in-library-directory-missing-soname usr/lib/libatiadlxx.so
+fglrx: shlib-with-non-pic-code usr/lib/libGL.so.1.2
+
+#It's awfully silly to break these out as they are only ever installed with fglrx
+fglrx: package-name-doesnt-match-sonames libGL1 libfglrx-dm1.0 libfglrx-gamma1 libfglrx-pp1.0 libfglrx-tvout1
--- fglrx-installer-8.723.1.orig/debian/overrides/fglrx-dev
+++ fglrx-installer-8.723.1/debian/overrides/fglrx-dev
@@ -0,0 +1,3 @@
+#We are in restricted, whether lintian has ever heard of it or not
+xorg-driver-fglrx-dev: unknown-section restricted
+
--- fglrx-installer-8.723.1.orig/debian/modaliases/fglrx_supported
+++ fglrx-installer-8.723.1/debian/modaliases/fglrx_supported
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+filename="$1"
+
+[ -e "$filename" ] || {
+    echo "USAGE: $0 path/to/fglrxko_pci_ids.h" >&2
+    exit 1
+}
+
+echo "# Listing generated by fglrx_supported. Do not edit manually."
+
+grep "0x" "$filename" | \
+  sed -n 's/FGL_ASIC_ID(0x\([0-9A-F]\{4\}\)),$/alias pci:v00001002d0000\1sv*sd*bc03sc*i* fglrx fglrx/p' | \
+  sort | uniq | sed -e 's/^[ \t]*//'
