--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.links
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.links
@@ -0,0 +1,58 @@
+/usr/lib/nvidia-current/libGL.so.195.36.24 /usr/lib/nvidia-current/libGL.so.1
+/usr/lib/nvidia-current/libGL.so.1 /usr/lib/nvidia-current/libGL.so
+/usr/lib/nvidia-current/libGLcore.so.195.36.24 /usr/lib/nvidia-current/libGLcore.so.1
+
+/usr/lib/nvidia-current/libnvidia-cfg.so.195.36.24 /usr/lib/nvidia-current/libnvidia-cfg.so.1
+/usr/lib/nvidia-current/libnvidia-cfg.so.1 /usr/lib/nvidia-current/libnvidia-cfg.so
+
+/usr/lib/nvidia-current/xorg/libglx.so.195.36.24 /usr/lib/nvidia-current/xorg/libglx.so
+
+/usr/lib/nvidia-current/libXvMCNVIDIA.so.195.36.24 /usr/lib/nvidia-current/libXvMCNVIDIA.so
+/usr/lib/nvidia-current/libXvMCNVIDIA.so.195.36.24 /usr/lib/nvidia-current/libXvMCNVIDIA.so.1
+/usr/lib/nvidia-current/libXvMCNVIDIA.so.195.36.24 /usr/lib/nvidia-current/libXvMCNVIDIA_dynamic.so.1
+
+/usr/lib/nvidia-current/libcuda.so.195.36.24 /usr/lib/nvidia-current/libcuda.so
+/usr/lib/nvidia-current/libcuda.so.195.36.24 /usr/lib/nvidia-current/libcuda.so.1
+
+/usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so.195.36.24 /usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so.1
+/usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so.1 /usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so 
+
+/usr/lib/nvidia-current/libnvidia-tls.so.195.36.24 /usr/lib/nvidia-current/libnvidia-tls.so.1
+
+/usr/lib/nvidia-current/libOpenCL.so.1.0.0 /usr/lib/nvidia-current/libOpenCL.so.1.0
+/usr/lib/nvidia-current/libOpenCL.so.1.0 /usr/lib/nvidia-current/libOpenCL.so.1
+/usr/lib/nvidia-current/libOpenCL.so.1 /usr/lib/nvidia-current/libOpenCL.so
+/usr/lib/nvidia-current/libOpenCL.so /usr/lib/libOpenCL.so
+
+/usr/lib/nvidia-current/libnvidia-compiler.so.195.36.24 /usr/lib/nvidia-current/libnvidia-compiler.so.1
+/usr/lib/nvidia-current/libnvidia-compiler.so.1 /usr/lib/nvidia-current/libnvidia-compiler.so
+
+
+/usr/lib32/nvidia-current/libGL.so.195.36.24 /usr/lib32/nvidia-current/libGL.so.1
+/usr/lib32/nvidia-current/libGL.so.1 /usr/lib32/nvidia-current/libGL.so
+/usr/lib32/nvidia-current/libGLcore.so.195.36.24 /usr/lib32/nvidia-current/libGLcore.so.1
+
+/usr/lib32/nvidia-current/libnvidia-cfg.so.195.36.24 /usr/lib32/nvidia-current/libnvidia-cfg.so.1
+/usr/lib32/nvidia-current/libnvidia-cfg.so.1 /usr/lib32/nvidia-current/libnvidia-cfg.so
+
+/usr/lib/nvidia-current/xorg/libglx.so.195.36.24 /usr/lib/nvidia-current/xorg/libglx.so
+
+/usr/lib32/nvidia-current/libXvMCNVIDIA.so.195.36.24 /usr/lib32/nvidia-current/libXvMCNVIDIA.so
+/usr/lib32/nvidia-current/libXvMCNVIDIA.so.195.36.24 /usr/lib32/nvidia-current/libXvMCNVIDIA.so.1
+/usr/lib32/nvidia-current/libXvMCNVIDIA.so.195.36.24 /usr/lib32/nvidia-current/libXvMCNVIDIA_dynamic.so.1
+
+/usr/lib32/nvidia-current/libcuda.so.195.36.24 /usr/lib32/nvidia-current/libcuda.so
+/usr/lib32/nvidia-current/libcuda.so.195.36.24 /usr/lib32/nvidia-current/libcuda.so.1
+
+/usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.195.36.24 /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.1
+/usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.1 /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so
+
+/usr/lib32/nvidia-current/libnvidia-tls.so.195.36.24 /usr/lib32/nvidia-current/libnvidia-tls.so.1
+
+/usr/lib32/nvidia-current/libOpenCL.so.1.0.0 /usr/lib32/nvidia-current/libOpenCL.so.1.0
+/usr/lib32/nvidia-current/libOpenCL.so.1.0 /usr/lib32/nvidia-current/libOpenCL.so.1
+/usr/lib32/nvidia-current/libOpenCL.so.1 /usr/lib32/nvidia-current/libOpenCL.so
+/usr/lib32/nvidia-current/libOpenCL.so /usr/lib32/libOpenCL.so
+
+/usr/lib32/nvidia-current/libnvidia-compiler.so.195.36.24 /usr/lib32/nvidia-current/libnvidia-compiler.so.1
+/usr/lib32/nvidia-current/libnvidia-compiler.so.1 /usr/lib32/nvidia-current/libnvidia-compiler.so
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.override.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.override.in
@@ -0,0 +1,89 @@
+#DRIVERNAME#: library-not-linked-against-libc ./usr/lib/libGL.so.#VERSION#
+
+#DRIVERNAME#: shared-lib-without-dependency-information ./usr/lib/libGLcore.so.#VERSION#
+
+#DRIVERNAME#: library-not-linked-against-libc ./usr/lib/xorg/modules/extensions/libglx.so.#VERSION#
+
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/libGL.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/libGLcore.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/xorg/modules/extensions/libglx.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/libXvMCNVIDIA.so.#VERSION#
+
+#DRIVERNAME#: non-dev-pkg-with-shlib-symlink usr/lib/libGL.so.#VERSION# usr/lib/libGL.so
+#DRIVERNAME#: non-dev-pkg-with-shlib-symlink usr/lib/xorg/modules/extensions/libglx.so.#VERSION# usr/lib/xorg/modules/extensions/libglx.so
+
+
+#DRIVERNAME#: script-not-executable usr/src/#DRIVERNAME#-#VERSION#/conftest.sh
+#DRIVERNAME#: maintainer-script-ignores-errors prerm
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/#DRIVERNAME#/libGL.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/libGL.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/#DRIVERNAME#/libGLcore.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/libGLcore.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/#DRIVERNAME#/libXvMCNVIDIA.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/libXvMCNVIDIA.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/#DRIVERNAME#/libcuda.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/libcuda.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/#DRIVERNAME#/libnvidia-cfg.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/libnvidia-cfg.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/#DRIVERNAME#/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/libvdpau.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/#DRIVERNAME#/tls/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/tls/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/#DRIVERNAME#/vdpau/libvdpau_nvidia.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/vdpau/libvdpau_nvidia.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/vdpau/libvdpau_trace.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/#DRIVERNAME#/xorg/libglx.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/xorg/libglx.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/tls/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/tls/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib/vdpau/libvdpau_nvidia.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/vdpau/libvdpau_nvidia.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib/vdpau/libvdpau_trace.so.#VERSION#
+#DRIVERNAME#: unused-shlib-entry-in-control-file libnvidia-tls 190
+#DRIVERNAME#: shlibs-declares-dependency-on-other-package libgl1-mesa | libgl1
+#DRIVERNAME#: prerm-calls-ldconfig
+#DRIVERNAME#: copyright-without-copyright-notice
+#DRIVERNAME#: desktop-command-not-in-package /usr/share/applications/#DRIVERNAME#/ubuntu-nvidia-settings.desktop /usr/bin/nvidia-settings
+#DRIVERNAME#: shared-lib-without-dependency-information ./usr/lib/#DRIVERNAME#/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shared-lib-without-dependency-information ./usr/lib/#DRIVERNAME#/tls/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shared-lib-without-dependency-information ./usr/lib/tls/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: unknown-section restricted/misc
+nvidia-185-modaliases: copyright-without-copyright-notice
+nvidia-185-modaliases: extended-description-line-too-long
+nvidia-glx-185-dev: copyright-without-copyright-notice
+nvidia-glx-185-dev: extended-description-line-too-long
+nvidia-glx-185-dev: unknown-section restricted/misc
+nvidia-185-kernel-source: copyright-without-copyright-notice
+nvidia-185-kernel-source: unknown-section restricted/misc
+#DRIVERNAME#-dev: shlib-with-non-pic-code usr/lib/#DRIVERNAME#/libXvMCNVIDIA.so.#VERSION#
+#DRIVERNAME#-dev: shlib-without-PT_GNU_STACK-section usr/lib/#DRIVERNAME#/libXvMCNVIDIA.so.#VERSION#
+#DRIVERNAME#-dev: postinst-has-useless-call-to-ldconfig
+#DRIVERNAME#-dev: postrm-has-useless-call-to-ldconfig
+#DRIVERNAME#-dev: copyright-without-copyright-notice
+#DRIVERNAME#-dev: missing-dependency-on-libc needed by ./usr/lib/#DRIVERNAME#/libXvMCNVIDIA.so.#VERSION#
+#DRIVERNAME#-dev: unknown-section restricted/misc
+nvidia-glx-185: copyright-without-copyright-notice
+nvidia-glx-185: unknown-section restricted/misc
+#DRIVERNAME#-modaliases: copyright-without-copyright-notice
+
+#DRIVERNAME#: script-not-executable ./usr/src/#DRIVERNAME#-#VERSION#/conftest.sh
+#DRIVERNAME#: maintainer-script-ignores-errors prerm
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib32/#DRIVERNAME#/libGL.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib32/#DRIVERNAME#/libGLcore.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib32/#DRIVERNAME#/libXvMCNVIDIA.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib32/#DRIVERNAME#/libXvMCNVIDIA.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib32/#DRIVERNAME#/libcuda.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib32/#DRIVERNAME#/libnvidia-cfg.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib32/#DRIVERNAME#/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib32/#DRIVERNAME#/libvdpau_nvidia.so.#VERSION#
+#DRIVERNAME#: shlib-with-non-pic-code usr/lib32/#DRIVERNAME#/tls/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shlib-without-PT_GNU_STACK-section usr/lib32/#DRIVERNAME#/tls/libnvidia-tls.so.#VERSION#
+
+#DRIVERNAME#: shared-lib-without-dependency-information ./usr/lib/#DRIVERNAME#/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shared-lib-without-dependency-information ./usr/lib/#DRIVERNAME#/tls/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shared-lib-without-dependency-information ./usr/lib/tls/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shared-lib-without-dependency-information ./usr/lib32/#DRIVERNAME#/libnvidia-tls.so.#VERSION#
+#DRIVERNAME#: shared-lib-without-dependency-information ./usr/lib32/#DRIVERNAME#/tls/libnvidia-tls.so.#VERSION#
+
+
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.links.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.links.in
@@ -0,0 +1,30 @@
+#PKGLIBDIR#/libGL.so.#VERSION# #PKGLIBDIR#/libGL.so.1
+#PKGLIBDIR#/libGL.so.1 #PKGLIBDIR#/libGL.so
+#PKGLIBDIR#/libGLcore.so.#VERSION# #PKGLIBDIR#/libGLcore.so.1
+
+#PKGLIBDIR#/libnvidia-cfg.so.#VERSION# #PKGLIBDIR#/libnvidia-cfg.so.1
+#PKGLIBDIR#/libnvidia-cfg.so.1 #PKGLIBDIR#/libnvidia-cfg.so
+
+#NVIDIAEXTENSION#/libglx.so.#VERSION# #NVIDIAEXTENSION#/libglx.so
+
+#PKGLIBDIR#/libXvMCNVIDIA.so.#VERSION# #PKGLIBDIR#/libXvMCNVIDIA.so
+#PKGLIBDIR#/libXvMCNVIDIA.so.#VERSION# #PKGLIBDIR#/libXvMCNVIDIA.so.1
+#PKGLIBDIR#/libXvMCNVIDIA.so.#VERSION# #PKGLIBDIR#/libXvMCNVIDIA_dynamic.so.1
+
+#PKGLIBDIR#/libcuda.so.#VERSION# #PKGLIBDIR#/libcuda.so
+#PKGLIBDIR#/libcuda.so.#VERSION# #PKGLIBDIR#/libcuda.so.1
+
+#PKGVDPAUDIR#/libvdpau_nvidia.so.#VERSION# #PKGVDPAUDIR#/libvdpau_nvidia.so.1
+#PKGVDPAUDIR#/libvdpau_nvidia.so.1 #PKGVDPAUDIR#/libvdpau_nvidia.so 
+
+#PKGLIBDIR#/libnvidia-tls.so.#VERSION# #PKGLIBDIR#/libnvidia-tls.so.1
+
+#PKGLIBDIR#/libOpenCL.so.1.0.0 #PKGLIBDIR#/libOpenCL.so.1.0
+#PKGLIBDIR#/libOpenCL.so.1.0 #PKGLIBDIR#/libOpenCL.so.1
+#PKGLIBDIR#/libOpenCL.so.1 #PKGLIBDIR#/libOpenCL.so
+#PKGLIBDIR#/libOpenCL.so #LIBDIR#/libOpenCL.so
+
+#PKGLIBDIR#/libnvidia-compiler.so.#VERSION# #PKGLIBDIR#/libnvidia-compiler.so.1
+#PKGLIBDIR#/libnvidia-compiler.so.1 #PKGLIBDIR#/libnvidia-compiler.so
+
+
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.README.Debian
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.README.Debian
@@ -0,0 +1,85 @@
+NVIDIA video drivers for Ubuntu
+============================
+
+Further information can be found at http://www.nvidia.com/ -- look for
+the "Download Drivers" tab and follow links to the Linux drivers.
+
+This package is generated from the official NVIDIA 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.
+
+Kernel patches
+-------------------------
+   If you need to provide a kernel patch (say for a kernel not formally
+   supported yet by NVIDIA), you can add this patch in the
+   debian/dkms/patches directory and mention the patch in the
+   debian/dkms.conf.in file.
+
+   It is usually a good idea to restrict the use of a patch to certain
+   kernel versions with the PATCH_MATCH[n] variable.
+
+   See the DKMS man page for more information.
+
+32 bit libraries on 64 bit systems
+-------------------------
+   32 bit libraries are provided on 64 bit systems for compatibility
+   reasons.
+   
+   The following templates are merged together into the same file on
+   amd64:
+   debian/nvidia-current.links32.in
+   debian/nvidia-current.links.in
+
+   $ld_so_conf_path lets the system know where it should look for 32
+   bit libraries.
+
+Update procedure
+-------------------------
+When a new NVIDIA is available, do the following to update
+nvidia-current:
+
+0.  On your build system, make sure you have the prerequisites
+    installed:
+
+    $ sudo apt-get build-dep nvidia-current
+
+1.  Download the NVIDIA installers i.e. the .run files.
+
+2.  dch -i to update the version in the debian/changelog so that it
+    matches the new upstream version.
+
+    Also make sure that the changelog includes both the changes you
+    made (if any) to the files in debian/ changes and the changes from
+    upstream (i.e. NVIDIA) which you can find in the release notes of
+    the driver.
+
+3.  debclean to regenerate most of the files in debian/ from their
+    templates.
+
+4.  Temporarily move the debian/ directory out of the source directory
+    and compress it as $SOURCE_NAME _ $NEW_VERSION . orig . tar . gz
+    e.g. nvidia-graphics-drivers_195.36.24.orig.tar.gz
+
+5.  Move the debian/ directory back to the source directory and type
+    debuild -S -sa 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
+
+
+IMPORTANT NOTE: If any changes to files in debian/ are needed, make sure
+to discuss your changes with the maintainer (Alberto aka tseliot) before
+you upload.
+
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 21 Dec 2009 12:36:15 +0100
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current-dev.install
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current-dev.install
@@ -0,0 +1,3 @@
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/X11R6/lib/libXvMCNVIDIA.a       /usr/lib/nvidia-current
+
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/include/*                       /usr/include/nvidia-current
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.postinst.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.postinst.in
@@ -0,0 +1,168 @@
+#!/bin/sh
+# Copyright (C) 2007-2008 Mario Limonciello
+# Copyright (C) 2009 Canonical Ltd
+# Authors: Alberto Milone
+set -e
+
+PACKAGE_NAME=#DRIVERNAME#
+CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
+
+ARCH=`dpkg --print-architecture`
+case $ARCH in
+    amd64)
+        ARCH="x86_64"
+        ;;
+    lpia)
+        ARCH="i686"
+        ;;
+    i386)
+        ARCH="i686"
+        ;;
+    *)
+        echo "WARNING: unsupported arch: $ARCH"
+        ARCH="$ARCH"
+        ;;
+esac
+
+# 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
+}
+
+case "$1" in
+    configure)
+        # Deal with alternatives
+
+        # Deal with multi-arch ugliness until dpkg supports multi-arch:
+        # - On amd64 we need to install an additional slave link for 32bit vdpau
+        #   which - obviously - doesn't exist on i386
+        # - It is fine if we get the following:
+        #   +  warning: skip creation of /usr/lib32/vdpau/libvdpau_nvidia.so.1 because associated
+        #   +  file #PKGVDPAUDIR32#/libvdpau_nvidia.so.1 (of link group gl_conf) doesn't exist.
+        #
+        update-alternatives --force \
+            --install #SYSCONFDIR#/ld.so.conf.d/GL.conf gl_conf #LDSOCONF# #ALTPRIORITY# \
+            --slave #MANDIR#/nvidia-xconfig.1.gz man_nvidiaxconfig.gz #MANDIR#/alt-#DRIVERNAME#-xconfig.1.gz \
+            --slave #MANDIR#/nvidia-smi.1.gz nvidia-smi.1.gz #MANDIR#/alt-#DRIVERNAME#-smi.1.gz \
+            --slave #DATADIR#/applications/ubuntu-nvidia-settings.desktop nvidia_desktop #PKGDESKDIR#/ubuntu-nvidia-settings.desktop \
+            --slave #BINDIR#/nvidia-smi nvidia_smi #PKGBINDIR#/nvidia-smi \
+            --slave #BINDIR#/nvidia-xconfig nvidia_xconfig #PKGBINDIR#/nvidia-xconfig \
+            --slave #BINDIR#/nvidia-bug-report.sh nvidia_bug_report #PKGBINDIR#/nvidia-bug-report.sh \
+            --slave #LIBDIR#/XvMCConfig xvmcconfig #PKGCONFIGDIR#/XvMCConfig \
+            --slave #AUTOSTARTDIR#/#AUTOSTARTFILE# nvidia-autostart.desktop #PKGDATADIR#/#AUTOSTARTFILE# \
+            --slave #LIBDIR#/xorg/modules/drivers/nvidia_drv.so nvidia_drv #PKGDRIVERSDIR#/nvidia_drv.so \
+            --slave #SYSCONFDIR#/modprobe.d/nvidia-graphics-drivers.conf nvidia_modconf #PKGLIBCONFDIR#/modprobe.conf \
+            --slave #XORGEXTRA# xorg_extra_modules #NVIDIAEXTENSION# \
+            --slave #VDPAUDIR#/libvdpau_nvidia.so.1 libvdpau_nvidia.so.1 #PKGVDPAUDIR#/libvdpau_nvidia.so.1 \
+            --slave #LIBDIR#/libvdpau_nvidia.so libvdpau_nvidia.so #PKGVDPAUDIR#/libvdpau_nvidia.so \
+            --slave #VDPAUDIR32#/libvdpau_nvidia.so.1 libvdpau_nvidia.so.1_lib32 #PKGVDPAUDIR32#/libvdpau_nvidia.so.1 \
+            --slave #LIBDIR32#/libvdpau_nvidia.so libvdpau_nvidia.so_lib32 #PKGVDPAUDIR32#/libvdpau_nvidia.so
+
+        # 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" = "#LDSOCONF#" ]; 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
+
+        # Build the kernel module
+        /usr/lib/dkms/common.postinst $PACKAGE_NAME $CVERSION /usr/share/$PACKAGE_NAME $ARCH $2
+        exit $?
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+            echo "postinst called with unknown argument \`$1'" >&2
+            exit 1
+    ;;
+esac
+
+#DEBHELPER#
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.links32.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.links32.in
@@ -0,0 +1,28 @@
+#PKGLIBDIR32#/libGL.so.#VERSION# #PKGLIBDIR32#/libGL.so.1
+#PKGLIBDIR32#/libGL.so.1 #PKGLIBDIR32#/libGL.so
+#PKGLIBDIR32#/libGLcore.so.#VERSION# #PKGLIBDIR32#/libGLcore.so.1
+
+#PKGLIBDIR32#/libnvidia-cfg.so.#VERSION# #PKGLIBDIR32#/libnvidia-cfg.so.1
+#PKGLIBDIR32#/libnvidia-cfg.so.1 #PKGLIBDIR32#/libnvidia-cfg.so
+
+#NVIDIAEXTENSION#/libglx.so.#VERSION# #NVIDIAEXTENSION#/libglx.so
+
+#PKGLIBDIR32#/libXvMCNVIDIA.so.#VERSION# #PKGLIBDIR32#/libXvMCNVIDIA.so
+#PKGLIBDIR32#/libXvMCNVIDIA.so.#VERSION# #PKGLIBDIR32#/libXvMCNVIDIA.so.1
+#PKGLIBDIR32#/libXvMCNVIDIA.so.#VERSION# #PKGLIBDIR32#/libXvMCNVIDIA_dynamic.so.1
+
+#PKGLIBDIR32#/libcuda.so.#VERSION# #PKGLIBDIR32#/libcuda.so
+#PKGLIBDIR32#/libcuda.so.#VERSION# #PKGLIBDIR32#/libcuda.so.1
+
+#PKGVDPAUDIR32#/libvdpau_nvidia.so.#VERSION# #PKGVDPAUDIR32#/libvdpau_nvidia.so.1
+#PKGVDPAUDIR32#/libvdpau_nvidia.so.1 #PKGVDPAUDIR32#/libvdpau_nvidia.so
+
+#PKGLIBDIR32#/libnvidia-tls.so.#VERSION# #PKGLIBDIR32#/libnvidia-tls.so.1
+
+#PKGLIBDIR32#/libOpenCL.so.1.0.0 #PKGLIBDIR32#/libOpenCL.so.1.0
+#PKGLIBDIR32#/libOpenCL.so.1.0 #PKGLIBDIR32#/libOpenCL.so.1
+#PKGLIBDIR32#/libOpenCL.so.1 #PKGLIBDIR32#/libOpenCL.so
+#PKGLIBDIR32#/libOpenCL.so #LIBDIR32#/libOpenCL.so
+
+#PKGLIBDIR32#/libnvidia-compiler.so.#VERSION# #PKGLIBDIR32#/libnvidia-compiler.so.1
+#PKGLIBDIR32#/libnvidia-compiler.so.1 #PKGLIBDIR32#/libnvidia-compiler.so
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.preinst
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.preinst
@@ -0,0 +1,190 @@
+#! /bin/sh
+# preinst script for nvidia-current
+#
+# see: dh_installdeb(1)
+#
+# Copyright (C) 2009 Canonical Ltd
+# Authors: Alberto Milone
+
+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/
+
+if [ `dpkg --print-architecture` = "amd64" ]; then
+    HAS_LIB32="yes"
+fi
+
+case "$1" in
+    install|upgrade)
+
+    # We need to remove diversions from previous versions of the package
+
+    # clean up from old diversions
+    if [ -d /usr/share/nvidia-glx/diversions ]; then
+        rm -f /usr/lib/libGL.so.1
+        rm -f /usr/lib/libGL.so.1.2
+        
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions/libGL.so.1 /usr/lib/libGL.so.1 > /dev/null
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions/libGL.so.1.2 /usr/lib/libGL.so.1.2 > /dev/null
+
+        rm -f /usr/lib/xorg/modules/extensions/libGLcore.a
+        rm -f /usr/lib/xorg/modules/extensions/libglx.a
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions/libGLcore.a /usr/lib/xorg/modules/extensions/libGLcore.a > /dev/null
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions/libglx.a /usr/lib/xorg/modules/extensions/libglx.a > /dev/null
+
+        rmdir /usr/share/nvidia-glx/diversions || true;
+        rmdir /usr/share/nvidia-glx || true;
+    fi
+
+    if [ -d /usr/share/nvidia-glx/diversions-X11R6 ]; then
+
+        rm -f /usr/X11R6/lib/libGL.so.1
+        rm -f /usr/X11R6/lib/libGL.so.1.2
+        
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions-X11R6/libGL.so.1 /usr/X11R6/lib/libGL.so.1 > /dev/null
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions-X11R6/libGL.so.1.2 /usr/X11R6/lib/libGL.so.1.2 > /dev/null
+
+        rmdir /usr/share/nvidia-glx/diversions-X11R6 || true;
+        rmdir /usr/share/nvidia-glx || true;
+    fi
+    # remove X11R6 diversions
+    
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so.1 | grep 'nvidia-glx' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/X11R6/lib/nvidia/libGL.so.1.xlibmesa /usr/X11R6/lib/libGL.so.1 > /dev/null
+    fi
+    
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so.1.2 | grep 'nvidia-glx' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/X11R6/lib/nvidia/libGL.so.1.2.xlibmesa /usr/X11R6/lib/libGL.so.1.2 > /dev/null
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/modules/extensions/libGLcore.a | grep 'nvidia-glx' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/X11R6/lib/nvidia/libGLcore.a.xlibmesa /usr/X11R6/lib/modules/extensions/libGLcore.a > /dev/null
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/modules/extensions/libglx.a | grep 'nvidia-glx' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/X11R6/lib/nvidia/libglx.a.xlibmesa /usr/X11R6/lib/modules/extensions/libglx.a > /dev/null
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/modules/extensions/libglx.so | grep 'nvidia-glx' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/X11R6/lib/nvidia/libglx.so.xlibmesa /usr/X11R6/lib/modules/extensions/libglx.so > /dev/null
+    fi
+
+    # make sure these diversions don't exist anymore
+    if dpkg-divert --list /usr/lib/libGL.so | grep 'nvidia-glx-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-dev-envy --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/lib/libGL.so | grep 'nvidia-glx-177-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-177-dev --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/lib/libGL.so | grep 'nvidia-glx-new-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev-envy --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/lib/libGL.a | grep 'nvidia-glx-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-dev-envy --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/lib/libGL.a | grep 'nvidia-glx-new-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev-envy --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep 'nvidia-glx-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/X11R6/lib/nvidia/libGL.so.xlibmesa /usr/X11R6/lib/libGL.so > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-dev-envy --divert /usr/X11R6/lib/nvidia/libGL.so.xlibmesa /usr/X11R6/lib/libGL.so > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep 'nvidia-glx-new-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev --divert /usr/X11R6/lib/nvidia/libGL.so.xlibmesa /usr/X11R6/lib/libGL.so > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev-envy --divert /usr/X11R6/lib/nvidia/libGL.so.xlibmesa /usr/X11R6/lib/libGL.so > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep 'nvidia-glx-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/X11R6/lib/nvidia/libGL.a.xlibmesa /usr/X11R6/lib/libGL.a > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-dev-envy --divert /usr/X11R6/lib/nvidia/libGL.a.xlibmesa /usr/X11R6/lib/libGL.a > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep 'nvidia-glx-new-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev --divert /usr/X11R6/lib/nvidia/libGL.a.xlibmesa /usr/X11R6/lib/libGL.a > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev-envy --divert /usr/X11R6/lib/nvidia/libGL.a.xlibmesa /usr/X11R6/lib/libGL.a > /dev/null || true
+    fi
+
+
+    # Make sure that no diversion is still there
+    set -a "nvidia-glx" "nvidia-glx-new" "nvidia-glx-legacy" "nvidia-glx-envy"\
+            "nvidia-glx-new-envy" "nvidia-glx-legacy-envy" "nvidia-glx-180" \
+            "nvidia-glx-177" "nvidia-glx-173" "nvidia-glx-96" "nvidia-glx-71" \
+            "nvidia-glx-185" "nvidia-glx-190"
+
+    while [ $# -ge 1 ]; do
+        glxname=$1
+        glxdevname="$glxname-dev"
+    
+        if [ -n "$HAS_LIB32" ]; then
+            #Remove diversions of /usr/lib32/libGL.so -- only for the new name schemes (nvidia-glx-VER)
+            if dpkg-divert --list $glxname | grep "/usr/lib32/libGL.so " > /dev/null ; then
+                rm -f /usr/lib32/libGL.so > /dev/null || true
+                dpkg-divert --remove --rename --package $glxname --divert /usr/lib32/nvidia/libGL.so.xlibmesa /usr/lib32/libGL.so > /dev/null || true
+            fi
+
+            #Remove diversion of /usr/lib32/libGL.so.1
+            if dpkg-divert --list $glxname | grep /usr/lib32/libGL.so.1 > /dev/null ; then
+                rm -f /usr/lib32/libGL.so.1 > /dev/null || true
+                dpkg-divert --remove --rename --package $glxname --divert /usr/lib32/nvidia/libGL.so.1.xlibmesa /usr/lib32/libGL.so.1 > /dev/null || true
+            fi
+            
+            #Remove diversion of /usr/lib32/libGL.so.1.2
+            if dpkg-divert --list $glxname | grep /usr/lib32/libGL.so.1.2 > /dev/null ; then
+                rm -f /usr/lib32/libGL.so.1.2 > /dev/null || true
+                dpkg-divert --remove --rename --package $glxname --divert /usr/lib32/nvidia/libGL.so.1.2.xlibmesa /usr/lib32/libGL.so.1.2 > /dev/null || true
+            fi
+            
+        fi
+            
+
+        #Remove diversion of /usr/lib/xorg/modules/extensions/libGLcore.so
+        if dpkg-divert --list $glxname | grep /usr/lib/xorg/modules/extensions/libGLcore.so > /dev/null ; then
+            dpkg-divert --remove --rename --package $glxname --divert /usr/lib/nvidia/libGLcore.so.xlibmesa /usr/lib/xorg/modules/extensions/libGLcore.so > /dev/null || true
+        fi
+
+        #Remove diversion of /usr/lib/xorg/modules/extensions/libglx.so
+        if dpkg-divert --list $glxname | grep /usr/lib/xorg/modules/extensions/libglx.so > /dev/null ; then
+            rm -f /usr/lib/xorg/modules/extensions/libglx.so > /dev/null || true
+            dpkg-divert --remove --rename --package $glxname --divert /usr/lib/nvidia/libglx.so.xserver-xorg-core /usr/lib/xorg/modules/extensions/libglx.so > /dev/null || true
+        fi
+
+        #Remove diversion of /usr/lib/libGL.so.1
+        if dpkg-divert --list $glxname | grep "/usr/lib/libGL.so.1 " > /dev/null ; then
+            rm -f /usr/lib/libGL.so.1 > /dev/null || true
+            dpkg-divert --remove --rename --package $glxname --divert /usr/lib/nvidia/libGL.so.1.xlibmesa /usr/lib/libGL.so.1 > /dev/null || true
+        fi
+
+        #Remove diversion of /usr/lib/libGL.so.1.2
+        if dpkg-divert --list $glxname | grep /usr/lib/libGL.so.1.2 > /dev/null ; then
+            rm -f /usr/lib/libGL.so.1.2 > /dev/null || true
+            dpkg-divert --remove --rename --package $glxname --divert /usr/lib/nvidia/libGL.so.1.2.xlibmesa /usr/lib/libGL.so.1.2 > /dev/null || true
+        fi
+
+
+        shift
+    done
+
+    ;;
+
+    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
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-autostart.desktop
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-autostart.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=NVIDIA X Server Settings
+Comment=Configure NVIDIA X Server Settings
+Exec=sh -c '/usr/bin/nvidia-settings --load-config-only'
+Terminal=false
+Icon=nvidia-current-settings
+Categories=System;Settings;
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.docs
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.docs
@@ -0,0 +1,2 @@
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/share/doc/NVIDIA_Changelog
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/share/doc/README.txt
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.dirs.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.dirs.in
@@ -0,0 +1,23 @@
+#SYSCONFDIR#/modprobe.d
+#SYSCONFDIR#/OpenCL/vendors
+#PKGLIBDIR#
+#AUTOSTARTDIR#
+#BINDIR#
+#PKGTLSDIR#
+#PKGBINDIR#
+#PKGLIBDIR#
+#PKGLIBDIR32#
+/usr/lib/xorg/modules/drivers
+/usr/lib/xorg/modules/extensions
+#PKGDATADIR#
+#PKGDESKDIR#
+#MANDIR#
+#DATADIR#/pixmaps
+/usr/share/lintian/overrides
+#PKGDRIVERSDIR#
+#NVIDIAEXTENSION#
+/usr/src/#DRIVERNAME#-#VERSION#
+/usr/src/#DRIVERNAME#-#VERSION#/patches
+#VDPAUDIR#
+#VDPAUDIR32#
+#PKGLIBCONFDIR#
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current-dev.links
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current-dev.links
@@ -0,0 +1 @@
+/usr/include/nvidia-current /usr/share/doc/nvidia-current-dev/include
--- nvidia-graphics-drivers-195.36.24.orig/debian/control.in
+++ nvidia-graphics-drivers-195.36.24/debian/control.in
@@ -0,0 +1,90 @@
+Source: #DRIVERSRCNAME#
+Section: restricted/misc
+Priority: optional
+Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+Build-Depends: debhelper (>= 6.0.7~), sed (>> 3.0), libxext6, bzip2,
+ xserver-xorg-dev (>= 2:1.4), execstack, cdbs, libc6
+Standards-Version: 3.8.0
+
+Package: #DRIVERNAME#
+Architecture: i386 amd64 lpia
+Depends: x11-common (>= 1:7.0.0), make, sed (>> 3.0), dkms, linux-libc-dev, libc6-dev,
+ linux-headers-generic | linux-headers, patch, acpid, ${shlibs:Depends}
+Recommends: nvidia-settings
+Provides: ${xviddriver:Provides}
+Description: NVIDIA binary Xorg driver, kernel module and VDPAU library
+ The binary driver provide optimized hardware acceleration of OpenGL
+ applications via a direct-rendering X Server. AGP, PCIe, SLI, TV-out
+ and flat panel displays are also supported.
+ .
+ This package also includes the source for building the kernel module
+ required by the Xorg driver, and provides NVIDIA's implementation of
+ the Video Decode and presentation API. The latter enables acceleration
+ for NVIDIA 8 and later series cards for h264 video.
+ .
+ GPUs such as GeForce series 6 or newer are supported.
+ .
+ See /usr/share/doc/#DRIVERNAME#/README.txt.gz for a complete list 
+ of supported GPUs and PCIIDs
+ .
+ 
+Package: #DRIVERDEVNAME#
+Architecture: i386 amd64 lpia
+Depends: #DRIVERNAME# (>= #VERSION#)
+Description: NVIDIA binary Xorg driver development files
+ This package contains the NVIDIA binary Xorg driver
+ development files.
+ .
+ For more information on this source package visit NVIDIA's homepage
+ at http://www.nvidia.com/ .
+
+Package: #DRIVERNAME#-modaliases
+Section: admin
+Architecture: i386 amd64 lpia
+Description: Modaliases for the NVIDIA binary X.Org driver
+ The modaliases provide a list of pci id's which makes it possible to
+ detect the model of a graphic card.
+
+Package: nvidia-glx-185
+Architecture: i386 amd64 lpia
+Depends: #DRIVERNAME#
+Description: Transitional package for nvidia-glx-185
+ This is a transitional package for nvidia-glx-185, and can be safely removed
+ after the installation is complete.
+
+Package: nvidia-glx-185-dev
+Architecture: i386 amd64 lpia
+Depends: #DRIVERDEVNAME#
+Description: Transitional package for nvidia-glx-185-dev
+ This is a transitional package for nvidia-glx-185-dev, and can be safely removed
+ after the installation is complete.
+ 
+Package: nvidia-185-kernel-source
+Architecture: i386 amd64 lpia
+Depends: #DRIVERNAME#
+Description: Transitional package for nvidia-glx-185-kernel-source
+ This is a transitional package for nvidia-glx-185-kernel-source, and can be
+ safely removed after the installation is complete.
+
+Package: nvidia-185-modaliases
+Section: admin
+Architecture: i386 amd64 lpia
+Depends: #DRIVERNAME#-modaliases
+Description: Transitional package for nvidia-185-modaliases
+ This is a transitional package for nvidia-185-modaliases, and can be safely removed
+ after the installation is complete.
+
+Package: nvidia-185-libvdpau
+Architecture: i386 amd64 lpia
+Depends: #DRIVERNAME#
+Description: Transitional package for nvidia-185-libvdpau
+ This is a transitional package for nvidia-185-libvdpau, and can be safely removed
+ after the installation is complete.
+
+Package: nvidia-185-libvdpau-dev
+Architecture: i386 amd64 lpia
+Depends: #DRIVERDEVNAME#
+Description: Transitional package for nvidia-185-libvdpau-dev
+ This is a transitional package for nvidia-185-libvdpau-dev, and can be safely
+ removed after the installation is complete.
+
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current-dev.preinst
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current-dev.preinst
@@ -0,0 +1,81 @@
+#! /bin/sh
+# preinst script for nvidia-current-dev
+#
+# see: dh_installdeb(1)
+#
+# Copyright (C) 2009-2010 Canonical Ltd
+# Authors: Alberto Milone
+#
+set -e
+
+case "$1" in
+    install|upgrade)
+    # We need to remove diversions from previous versions of the package
+    
+    if [ -d /usr/share/nvidia-glx/diversions/ ] ; then
+        rm -f /usr/lib/libGL.so 
+            rm -f /usr/lib/libGL.a 
+            dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/share/nvidia-glx/diversions/libGL.so /usr/lib/libGL.so > /dev/null
+        dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/share/nvidia-glx/diversions/libGL.a  /usr/lib/libGL.a > /dev/null
+
+        rmdir  /usr/share/nvidia-glx/diversions/ || true
+        rmdir /usr/share/nvidia-glx || true
+    fi
+
+    if [ ! -d /usr/lib/nvidia ]; then
+        mkdir -p /usr/lib/nvidia || true
+    fi
+
+    # Remove old old old gl header diversions
+    if [ -e /usr/share/nvidia-glx/diversions/gl.h ]; then
+      if [ -e /usr/include/GL/gl.h ]; then 
+          rm -f /usr/include/GL/gl.h /usr/include/GL/glx.h /usr/include/GL/glxtokens.h
+      fi        
+      dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/share/nvidia-glx/diversions/gl.h /usr/include/GL/gl.h > /dev/null
+      dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/share/nvidia-glx/diversions/glx.h /usr/include/GL/glx.h > /dev/null
+      dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/share/nvidia-glx/diversions/glxext.h /usr/include/GL/glxext.h > /dev/null
+    fi
+
+
+    # Make sure that no diversion is still there
+    set -a "nvidia-glx-dev" "nvidia-glx-new-dev" "nvidia-glx-legacy-dev" "nvidia-glx-dev-envy"\
+            "nvidia-glx-new-dev-envy" "nvidia-glx-legacy-dev-envy" "nvidia-glx-180-dev" \
+            "nvidia-glx-177-dev" "nvidia-glx-173-dev" "nvidia-glx-96-dev" "nvidia-glx-71-dev" \
+            "nvidia-glx-185-dev" "nvidia-glx-190-dev"
+
+    while [ $# -ge 1 ]; do
+        glxdevname=$1
+
+        if dpkg-divert --list /usr/lib/libGL.so | grep $glxdevname > /dev/null ; then 
+            dpkg-divert --remove --rename --package $glxdevname --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null
+        fi
+        if dpkg-divert --list /usr/lib/libGL.a | grep $glxdevname > /dev/null ; then 
+            dpkg-divert --remove --rename --package $glxdevname --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null
+        fi
+        if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep $glxdevname > /dev/null ; then  
+               dpkg-divert --remove --rename --package $glxdevname --divert /usr/X11R6/lib/nvidia/libGL.so.xlibmesa /usr/X11R6/lib/libGL.so > /dev/null
+        fi
+        if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep $glxdevname > /dev/null ; then 
+            dpkg-divert --remove --rename --package $glxdevname --divert /usr/X11R6/lib/nvidia/libGL.a.xlibmesa /usr/X11R6/lib/libGL.a > /dev/null    
+        fi
+
+        shift
+    done
+
+  ;;
+
+    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
--- nvidia-graphics-drivers-195.36.24.orig/debian/ubuntu-nvidia-settings.desktop
+++ nvidia-graphics-drivers-195.36.24/debian/ubuntu-nvidia-settings.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=NVIDIA X Server Settings
+Comment=Configure NVIDIA X Server Settings
+Exec=/usr/bin/nvidia-settings
+Icon=nvidia-current-settings
+Categories=System;Settings;
--- nvidia-graphics-drivers-195.36.24.orig/debian/ubuntu-nvidia-settings.desktop.in
+++ nvidia-graphics-drivers-195.36.24/debian/ubuntu-nvidia-settings.desktop.in
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=NVIDIA X Server Settings
+Comment=Configure NVIDIA X Server Settings
+Exec=#BINDIR#/nvidia-settings
+Icon=#DRIVERNAME#-settings
+Categories=System;Settings;
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-autostart.desktop.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-autostart.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=NVIDIA X Server Settings
+Comment=Configure NVIDIA X Server Settings
+Exec=sh -c '#BINDIR#/nvidia-settings --load-config-only'
+Terminal=false
+Icon=#DRIVERNAME#-settings
+Categories=System;Settings;
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current-dev.links.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current-dev.links.in
@@ -0,0 +1 @@
+#INCLUDEDIR#/#DRIVERNAME# /usr/share/doc/#DRIVERDEVNAME#/include
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.install
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.install
@@ -0,0 +1,31 @@
+debian/nvidia-current.override                 usr/share/lintian/overrides
+
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/X11R6/lib/modules/drivers/nvidia_drv.so /usr/lib/nvidia-current/xorg
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/X11R6/lib/modules/extensions/libglx.so.195.36.24 /usr/lib/nvidia-current/xorg
+
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/lib/libGL*.so*                  /usr/lib/nvidia-current
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/lib/libnvidia*.so*              /usr/lib/nvidia-current
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/lib/libcuda*.so*                /usr/lib/nvidia-current
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/lib/libOpenCL*.so*              /usr/lib/nvidia-current
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/lib/libnvidia-compiler*.so*     /usr/lib/nvidia-current
+
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/lib/vdpau/libvdpau_nvidia.so*   /usr/lib/nvidia-current/vdpau
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/lib/tls/*.so*                   /usr/lib/nvidia-current/tls
+
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/X11R6/lib/libXvMCNVIDIA.so.195.36.24  /usr/lib/nvidia-current
+
+debian/dkms/patches/*                         usr/src/nvidia-current-195.36.24/patches
+debian/dkms.conf                              usr/src/nvidia-current-195.36.24
+debian/temp/modules/nvidia-kernel/nv/*        usr/src/nvidia-current-195.36.24
+
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/bin/nvidia-bug-report.sh /usr/lib/nvidia-current/bin
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/bin/nvidia-xconfig /usr/lib/nvidia-current/bin
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/bin/nvidia-smi /usr/lib/nvidia-current/bin
+
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/share/pixmaps/nvidia-current-settings.png /usr/share/pixmaps
+
+debian/ubuntu-nvidia-settings.desktop   /usr/share/nvidia-current
+
+debian/nvidia-autostart.desktop /usr/share/nvidia-current
+
+NVIDIA-Linux-x86_64-195.36.24-pkg2/etc/OpenCL/vendors/nvidia.icd /etc/OpenCL/vendors
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.prerm.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.prerm.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+# prerm script for #DRIVERNAME#
+#
+# Copyright (C) 2007 Mario Limonciello
+# Copyright (C) 2009 Canonical Ltd
+# Authors: Alberto Milone
+
+
+PACKAGE_NAME=#DRIVERNAME#
+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 #LDSOCONF#
+
+		# Trigger gmenu so as to update the gnome menu
+		dpkg-trigger gmenucache || true
+
+		# explicit ldconfig due to alternatives
+		ldconfig
+	;;
+esac
+
+#DEBHELPER#
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.links32
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.links32
@@ -0,0 +1,28 @@
+/usr/lib32/nvidia-current/libGL.so.195.36.24 /usr/lib32/nvidia-current/libGL.so.1
+/usr/lib32/nvidia-current/libGL.so.1 /usr/lib32/nvidia-current/libGL.so
+/usr/lib32/nvidia-current/libGLcore.so.195.36.24 /usr/lib32/nvidia-current/libGLcore.so.1
+
+/usr/lib32/nvidia-current/libnvidia-cfg.so.195.36.24 /usr/lib32/nvidia-current/libnvidia-cfg.so.1
+/usr/lib32/nvidia-current/libnvidia-cfg.so.1 /usr/lib32/nvidia-current/libnvidia-cfg.so
+
+/usr/lib/nvidia-current/xorg/libglx.so.195.36.24 /usr/lib/nvidia-current/xorg/libglx.so
+
+/usr/lib32/nvidia-current/libXvMCNVIDIA.so.195.36.24 /usr/lib32/nvidia-current/libXvMCNVIDIA.so
+/usr/lib32/nvidia-current/libXvMCNVIDIA.so.195.36.24 /usr/lib32/nvidia-current/libXvMCNVIDIA.so.1
+/usr/lib32/nvidia-current/libXvMCNVIDIA.so.195.36.24 /usr/lib32/nvidia-current/libXvMCNVIDIA_dynamic.so.1
+
+/usr/lib32/nvidia-current/libcuda.so.195.36.24 /usr/lib32/nvidia-current/libcuda.so
+/usr/lib32/nvidia-current/libcuda.so.195.36.24 /usr/lib32/nvidia-current/libcuda.so.1
+
+/usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.195.36.24 /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.1
+/usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.1 /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so
+
+/usr/lib32/nvidia-current/libnvidia-tls.so.195.36.24 /usr/lib32/nvidia-current/libnvidia-tls.so.1
+
+/usr/lib32/nvidia-current/libOpenCL.so.1.0.0 /usr/lib32/nvidia-current/libOpenCL.so.1.0
+/usr/lib32/nvidia-current/libOpenCL.so.1.0 /usr/lib32/nvidia-current/libOpenCL.so.1
+/usr/lib32/nvidia-current/libOpenCL.so.1 /usr/lib32/nvidia-current/libOpenCL.so
+/usr/lib32/nvidia-current/libOpenCL.so /usr/lib32/libOpenCL.so
+
+/usr/lib32/nvidia-current/libnvidia-compiler.so.195.36.24 /usr/lib32/nvidia-current/libnvidia-compiler.so.1
+/usr/lib32/nvidia-current/libnvidia-compiler.so.1 /usr/lib32/nvidia-current/libnvidia-compiler.so
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia_supported
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia_supported
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+set -e
+
+# This is a nasty kluge, but it seems to work. Better check the output when
+# upgrading to a new release of the nvidia driver, though.
+
+# Whenever a PCI ID is supported by both nvidia and nvidia_legacy, it is only
+# listed for nvidia, as long as nvidia_legacy is *after* nvidia in the
+# parameter list.
+
+[ -n "$1" ] || {
+  echo "USAGE: $0 path/to/nv/nv-kernel.o nvidia \\" >&2
+  echo "    path/to/nv-legacy/nv-kernel.o nvidia_legacy [...]" >&2
+  exit 1
+}
+
+echo "# Listing generated by nvidia_supported. Do not edit manually."
+
+device_ids() {
+  local filename="$1"
+
+  local list_prev="$(mktemp)"
+  local list_cur="$(mktemp)"
+
+  # Find the symbols of the .rodata section...
+  objdump --section=.rodata --syms "$filename" |
+  sed -nr '/SYMBOL TABLE/,/^$/ {
+    s/^([0-9a-f]+)\s+l\s+O\s+\S+\s+([0-9a-f]+)\s+\S+.*/\1 \2/p
+  }' |
+  while read start length; do
+    objdump --section=.rodata --full-contents \
+      --start-address="0x$start" \
+      --stop-address="$((0x$start+0x$length))" "$filename" |
+    sed -nr 's/^ [0-9a-f]+ ([0-9a-f]{2})([0-9a-f]{2})0000.*/\2\1/p' |
+    sort | uniq | grep -vx "0000" >"$list_cur"
+
+    # The consistent thing between different releases has been that there are
+    # two subsequent symbols with the same PCI ID list near the beginning. Find
+    # them.
+    if [ -s "$list_prev" -a -s "$list_cur" ] &&
+       cmp -s "$list_prev" "$list_cur"; then
+      cat "$list_cur"
+      break
+    fi
+
+    cp "$list_cur" "$list_prev"
+  done
+
+  rm -f "$list_prev" "$list_cur"
+}
+
+seen_ids=' '
+
+while [ -n "$1" ]; do
+  filename="$1"; shift
+  modname="$1";  shift
+  pkgname="$1";  shift
+
+  orig_ids="$(device_ids "$filename")"
+  if [ -z "$orig_ids" ]; then
+    echo "WARNING: No IDs were found from $filename" >&2
+  fi
+
+  for id in $orig_ids; do
+    case "$seen_ids" in
+      *" $id "*)
+        # Already seen the ID.
+        ;;
+      *)
+        # Not seen it yet.
+        seen_ids="${seen_ids}${id} "
+
+        printf "alias pci:v%08Xd%08Xsv*sd*bc03sc*i* %s %s\n" \
+          0x10de "0x$id" "$modname" "$pkgname"
+        ;;
+    esac
+  done
+done | sort
+
+# vim:set et sw=2 sts=2:
--- nvidia-graphics-drivers-195.36.24.orig/debian/rules
+++ nvidia-graphics-drivers-195.36.24/debian/rules
@@ -0,0 +1,294 @@
+#!/usr/bin/make -f
+#
+# Copyright (C) 2009 Canonical Ltd
+# Authors: Alberto Milone
+#
+# This file on the Mandriva nvidia packages, on Ubuntu's previous
+# nvidia packaging scripts and on Ubuntu's fglrx scripts.
+
+############# HOW TO ENABLE A DRIVER ####################
+
+#- Run "update-alternatives --set gl_conf $(ld_so_conf_path)" as root.
+#- Run "ldconfig" as root.
+
+
+#########################################################
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+
+SERVERMINVERS = $(shell cat /usr/share/xserver-xorg/serverminver 2>/dev/null)
+VIDEOABI = $(shell cat /usr/share/xserver-xorg/videoabiver 2>/dev/null)
+INPUTABI = $(shell cat /usr/share/xserver-xorg/inputabiver 2>/dev/null)
+SERVER_DEPENDS = xserver-xorg-core (>= $(SERVERMINVERS))
+VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI)
+
+
+# Package names
+PKG_driver           := nvidia-current
+PKG_driver_dev       := $(PKG_driver)-dev
+PKG_modalias         := $(PKG_driver)-modaliases
+PKG_version          := $(shell dpkg-parsechangelog | awk -F' ' '/^Version:/ {print $$2}' | awk -F- '{print $$1}')
+PKG_source           := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+PKG_module           := $(PKG_driver)
+
+# Priority of the alternative
+alt_priority         := 9700
+
+# Installer details
+dirname_x86          := NVIDIA-Linux-x86-$(PKG_version)-pkg0
+dirname_x86_64       := NVIDIA-Linux-x86_64-$(PKG_version)-pkg2
+filename_x86         := $(dirname_x86).run
+filename_x86_64      := $(dirname_x86_64).run
+url                  := ftp://download.nvidia.com/XFree86/Linux-x86/$(PKG_version)/$(filename_x86)
+
+ifeq ($(DEB_BUILD_ARCH),amd64)
+filename             := $(filename_x86_64)
+dirname              := $(dirname_x86_64)
+else
+filename             := $(filename_x86)
+dirname              := $(dirname_x86)
+endif
+
+bindir               := /usr/bin
+datadir              := /usr/share
+PKG_datadir          := $(datadir)/$(PKG_driver)
+libdir               := /usr/lib
+libdir32             := /usr/lib32
+includedir           := /usr/include
+sysconfdir           := /etc
+PKG_libdir           := $(libdir)/$(PKG_driver)
+PKG_libdir32         := $(libdir32)/$(PKG_driver)
+xorg_libdir          := $(libdir)/xorg
+xorg_extra_modules   := $(xorg_libdir)/extra-modules
+xorg_extensionsdir   := $(xorg_libdir)/modules/extensions
+PKG_driversdir       := $(libdir)/$(PKG_driver)/xorg
+PKG_extensionsdir    := $(PKG_driversdir)
+PKG_bindir           := $(PKG_libdir)/bin
+PKG_deskdir          := $(PKG_datadir)
+PKG_configdir        := $(PKG_libdir)
+ld_so_conf_dir       := $(PKG_configdir)
+ld_so_conf_file      := ld.so.conf
+ld_so_conf_path      := $(ld_so_conf_dir)/$(ld_so_conf_file)
+mandir               := /usr/share/man/man1
+PKG_bugdir           := /usr/share/bug/$(PKG_driver)
+autostartdir         := /etc/xdg/autostart
+PKG_autostartdir     := $(PKG_configdir)
+autostartfile        := nvidia-autostart.desktop
+desktopfile          := ubuntu-nvidia-settings.desktop
+PKG_vdpaudir         := $(PKG_libdir)/vdpau
+PKG_tlsdir           := $(PKG_libdir)/tls
+PKG_vdpaudir32       := $(PKG_libdir32)/vdpau
+PKG_tlsdir32         := $(PKG_libdir32)/tls
+vdpaudir             := $(libdir)/vdpau
+tlsdir               := $(libdir)/tls
+vdpaudir32           := $(libdir32)/vdpau
+tlsdir32             := $(libdir32)/tls
+
+# 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_libconfdir := /lib/$(PKG_driver)
+
+
+# -Xlib32
+DEB_DH_SHLIBDEPS_ARGS_$(PKG_driver)="-Xtls -Xconf" -X$(PKG_libdir32)#  
+DEB_SHLIBDEPS_INCLUDE_$(PKG_driver) := $(CURDIR)/debian/$(PKG_driver)$(PKG_libdir)/:$(libdir)/
+DEB_SHLIBDEPS_INCLUDE_$(PKG_driver_dev) := $(CURDIR)/debian/$(PKG_driver_dev)$(PKG_libdir)/:$(libdir)/
+
+# This makes sure that the xserver ABI is bumped to match the current one when the
+# packages are built
+.PHONY: serverabi
+serverabi:
+ifeq ($(SERVERMINVERS),)
+	@echo error: xserver-xorg-dev needs to be installed
+	@exit 1
+else
+	echo "xserver:Depends=$(SERVER_DEPENDS)" >> debian/$(PKG_driver).substvars
+	echo "xviddriver:Provides=$(VIDDRIVER_PROVIDES)" >> debian/$(PKG_driver).substvars
+	echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(PKG_driver).substvars
+endif
+#			 $(PKG_driver).shlibs              \
+
+.PHONY: regen-from-templates
+regen-from-templates:
+	#Create important strings
+	for i in dkms.conf \
+			 $(PKG_driver).README.Debian      \
+			 control                           \
+			 copyright                         \
+			 ubuntu-nvidia-settings.desktop    \
+			 nvidia-autostart.desktop          \
+			 $(PKG_driver).install             \
+			 $(PKG_driver_dev).install         \
+			 $(PKG_driver).links               \
+			 $(PKG_driver).links32             \
+			 $(PKG_driver_dev).links           \
+			 $(PKG_driver).override            \
+			 $(PKG_driver).dirs                \
+			 $(PKG_driver).docs                \
+			 $(PKG_driver).examples            \
+			 $(PKG_driver).postrm              \
+			 $(PKG_driver).postinst            \
+			 $(PKG_driver).preinst             \
+			 $(PKG_driver).prerm               \
+			 $(PKG_driver_dev).preinst; do     \
+		sed -e "s|#LIBDIR#|$(libdir)|g"         \
+			-e "s|#LIBDIR32#|$(libdir32)|g"     \
+			-e "s|#BINDIR#|$(bindir)|g"         \
+			-e "s|#VERSION#|$(PKG_version)|g"   \
+			-e "s|#SYSCONFDIR#|$(sysconfdir)|g" \
+			-e "s|#MANDIR#|$(mandir)|g" \
+			-e "s|#LDSOCONF#|$(ld_so_conf_path)|g" \
+			-e "s|#ALTPRIORITY#|$(alt_priority)|g" \
+			-e "s|#AUTOSTARTDIR#|$(autostartdir)|g" \
+			-e "s|#AUTOSTARTFILE#|$(autostartfile)|g" \
+			-e "s|#DATADIR#|$(datadir)|g" \
+			-e "s|#PKGDESKDIR#|$(PKG_deskdir)|g" \
+			-e "s|#PKGDATADIR#|$(PKG_datadir)|g" \
+			-e "s|#PKGCONFIGDIR#|$(PKG_configdir)|g" \
+			-e "s|#PKGBINDIR#|$(PKG_bindir)|g" \
+			-e "s|#PKGLIBDIR#|$(PKG_libdir)|g" \
+			-e "s|#PKGLIBDIR32#|$(PKG_libdir32)|g" \
+			-e "s|#PKGDRIVERSDIR#|$(PKG_driversdir)|g" \
+			-e "s|#XORGEXTRA#|$(xorg_extra_modules)|g" \
+			-e "s|#NVIDIAEXTENSION#|$(PKG_extensionsdir)|g" \
+			-e "s|#XORGEXTENSIONSDIR#|$(xorg_extensionsdir)|g" \
+			-e "s|#DRIVERNAME#|$(PKG_driver)|g" \
+			-e "s|#DRIVERDEVNAME#|$(PKG_driver_dev)|g" \
+			-e "s|#DRIVERSRCNAME#|$(PKG_source)|g" \
+			-e "s|#MODULENAME#|$(PKG_module)|g" \
+			-e "s|#DIRNAME#|$(dirname)|g" \
+			-e "s|#INCLUDEDIR#|$(includedir)|g" \
+			-e "s|#URL#|$(url)|g" \
+			-e "s|#VDPAUDIR#|$(vdpaudir)|g" \
+			-e "s|#VDPAUDIR32#|$(vdpaudir32)|g" \
+			-e "s|#TLSDIR#|$(tlsdir)|g" \
+			-e "s|#PKGVDPAUDIR#|$(PKG_vdpaudir)|g" \
+			-e "s|#PKGVDPAUDIR32#|$(PKG_vdpaudir32)|g" \
+			-e "s|#PKGTLSDIR#|$(PKG_tlsdir)|g" \
+			-e "s|#PKGLIBCONFDIR#|$(PKG_libconfdir)|g" \
+			debian/$$i.in > debian/$$i;      \
+	done
+ifeq ($(DEB_BUILD_ARCH),amd64)
+	cat $(CURDIR)/debian/$(PKG_driver).links $(CURDIR)/debian/$(PKG_driver).links32 > \
+	$(CURDIR)/debian/$(PKG_driver).links_new
+	mv -f $(CURDIR)/debian/$(PKG_driver).links_new $(CURDIR)/debian/$(PKG_driver).links 
+endif
+# Pre-config
+#makebuilddir/$(PKG_driver):: regen-from-templates
+
+configure/$(PKG_driver)::
+	rm -rf $(dirname_x86) $(dirname_x86_64)
+	
+	# Make the installers executable and extract them
+	chmod 755 $(filename_x86)
+	chmod 755 $(filename_x86_64)
+	./$(filename_x86) --extract-only
+	./$(filename_x86_64) --extract-only
+	
+	# Get around Xen checks
+	cp $(dirname)/usr/src/nv/nv.c $(dirname)/usr/src/nv/nv1.c
+	cp $(dirname)/usr/src/nv/nv-linux.h $(dirname)/usr/src/nv/nv-linux1.h
+	sed 's/CONFIG_XEN/CONFIG_ALB/g'  $(dirname)/usr/src/nv/nv1.c > $(dirname)/usr/src/nv/nv.c
+	sed 's/CONFIG_XEN/CONFIG_ALB/g'  $(dirname)/usr/src/nv/nv-linux1.h > $(dirname)/usr/src/nv/nv-linux.h
+	rm $(dirname)/usr/src/nv/nv1.c
+	rm $(dirname)/usr/src/nv/nv-linux1.h
+
+	# kernel module source
+	mkdir -p $(CURDIR)/debian/temp/modules/nvidia-kernel/nv
+	cp -R $(CURDIR)/$(dirname)/usr/src/nv $(CURDIR)/debian/temp/modules/nvidia-kernel/
+	cp $(CURDIR)/debian/temp/modules/nvidia-kernel/nv/Makefile.kbuild \
+	   $(CURDIR)/debian/temp/modules/nvidia-kernel/nv/Makefile
+
+	# Rename the png file for nvidia-settings
+	mv $(dirname)/usr/share/pixmaps/nvidia-settings.png \
+	$(dirname)/usr/share/pixmaps/$(PKG_driver)-settings.png
+
+	# Disable the stack markings of binaries for security reasons.
+	# See (LP: #409456)
+	find $(dirname) -name *.so* | xargs -n1 execstack -c
+
+ifeq ($(DEB_BUILD_ARCH),amd64)
+	# Disable the stack markings of 32bit binaries on amd64
+	# See (LP: #409456)
+	find $(dirname_x86) -name *.so* | xargs -n1 execstack -c
+endif
+	# Disable the stack markings of other binaries (only for the current arch)
+	#   Note: don't use for loops or pass more than 1 argument to execstack
+	#         or it will fail.
+	execstack -c $(dirname)$(bindir)/nvidia-xconfig || true
+	execstack -c $(dirname)$(bindir)/nvidia-smi || true
+
+#binary-install/$(PKG_driver_dev)::
+
+binary-install/$(PKG_driver):: serverabi
+ifeq ($(DEB_BUILD_ARCH),amd64)
+	#32 bit libraries on 64 bit
+	dh_installdirs -p$(PKG_driver) "$(PKG_libdir32)" 
+	dh_installdirs -p$(PKG_driver) "$(PKG_tlsdir32)"
+
+	dh_install -p$(PKG_driver) "$(dirname_x86)$(libdir)/libGL*.so*"  "$(PKG_libdir32)"
+	dh_install -p$(PKG_driver) "$(dirname_x86)$(libdir)/libnvidia*.so*"  "$(PKG_libdir32)"
+	dh_install -p$(PKG_driver) "$(dirname_x86)$(libdir)/libcuda*.so*"  "$(PKG_libdir32)"
+
+	dh_install -p$(PKG_driver)  "$(dirname_x86)/usr/X11R6/lib/*.so*"  "$(PKG_libdir32)"
+	dh_install -p$(PKG_driver)  "$(dirname_x86)$(vdpaudir)/libvdpau_nvidia.so*"  "$(PKG_vdpaudir32)"
+	dh_install -p$(PKG_driver)  "$(dirname_x86)$(tlsdir)/lib*"  "$(PKG_tlsdir32)"
+
+	dh_install -p$(PKG_driver) "$(dirname_x86)$(libdir)/libOpenCL*.so*"  "$(PKG_libdir32)"
+	dh_install -p$(PKG_driver) "$(dirname_x86)$(libdir)/libnvidia-compiler*.so*"  "$(PKG_libdir32)"
+endif
+	
+	# Generate modaliases for Jockey and nvidia-common
+	mkdir -p $(CURDIR)/debian/$(PKG_driver)-modaliases/usr/share/jockey/modaliases/
+	sh -e $(CURDIR)/debian/nvidia_supported \
+		$(dirname)/usr/src/nv/nv-kernel.o nvidia_current $(PKG_driver) \
+		> $(CURDIR)/debian/$(PKG_driver)-modaliases/usr/share/jockey/modaliases/$(PKG_driver)
+
+	# Configuration stuff
+
+	# ld.so.conf
+	dh_installdirs -p$(PKG_driver) "$(ld_so_conf_dir)"
+	echo "$(PKG_libdir)" >	"$(CURDIR)/debian/$(PKG_driver)$(ld_so_conf_path)"
+ifeq ($(DEB_BUILD_ARCH),amd64)
+	echo "$(PKG_libdir32)" >>	$(CURDIR)/debian/$(PKG_driver)$(ld_so_conf_path)
+endif
+
+	# Blacklist any other driver that udev may want to load instead of $(PKG_module)
+	printf "blacklist nouveau\nblacklist lbm-nouveau\nblacklist nvidia-173\nblacklist nvidia-96\n" > $(CURDIR)/debian/$(PKG_driver)$(PKG_libconfdir)/modprobe.conf
+
+	# Create an alias for the module so that it can be used as nvidia
+	echo "alias nvidia $(PKG_module)" >> $(CURDIR)/debian/$(PKG_driver)$(PKG_configdir)/modprobe.conf
+
+	# XvMCConfig
+	dh_installdirs -p$(PKG_driver) "$(PKG_configdir)"
+	echo "libXvMCNVIDIA_dynamic.so.1" > $(CURDIR)/debian/$(PKG_driver)/$(PKG_configdir)/XvMCConfig
+
+	dh_install -p$(PKG_driver) $(dirname)$(mandir)/nvidia-xconfig.1.gz "$(mandir)";
+	dh_install -p$(PKG_driver) $(dirname)$(mandir)/nvidia-settings.1.gz "$(mandir)";
+	dh_install -p$(PKG_driver) $(dirname)$(mandir)/nvidia-smi.1.gz "$(mandir)";
+
+	# Rename the man pages in order to use alternatives
+	for file in $(CURDIR)/debian/$(PKG_driver)$(mandir)/*.gz; do \
+		mv $$file $(CURDIR)/debian/$(PKG_driver)$(mandir)/`basename $$file | sed 's/nvidia/alt-$(PKG_driver)/'`; \
+	done
+
+	rm -rf debian/temp
+
+
+clean:: regen-from-templates
+#	for file in $(CURDIR)/debian/*.in \
+#	; do \
+#		if [ `basename $$file` != "control.in" ]; then \
+#			rm -f $(CURDIR)/debian/`basename $$file | sed 's/\.in\$$//'`; \
+#		fi \
+#	done
+	rm -fr $(dirname_x86) $(dirname_x86_64)
+	rm -fr debian/temp
+
+
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.postrm.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.postrm.in
@@ -0,0 +1,42 @@
+#! /bin/sh
+# postrm script for #DRIVERNAME#
+#
+# see: dh_installdeb(1)
+#
+# Copyright (C) 2009-2010 Canonical Ltd
+# Authors: Alberto Milone
+
+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/
+
+case "$1" in
+    remove|purge)
+
+    ;;
+    
+    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#
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.examples.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.examples.in
@@ -0,0 +1,2 @@
+#DIRNAME#/usr/share/doc/XF86Config.sample
+
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.install.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.install.in
@@ -0,0 +1,31 @@
+debian/#DRIVERNAME#.override                 usr/share/lintian/overrides
+
+#DIRNAME#/usr/X11R6/lib/modules/drivers/nvidia_drv.so #PKGDRIVERSDIR#
+#DIRNAME#/usr/X11R6/lib/modules/extensions/libglx.so.#VERSION# #NVIDIAEXTENSION#
+
+#DIRNAME#/usr/lib/libGL*.so*                  #PKGLIBDIR#
+#DIRNAME#/usr/lib/libnvidia*.so*              #PKGLIBDIR#
+#DIRNAME#/usr/lib/libcuda*.so*                #PKGLIBDIR#
+#DIRNAME#/usr/lib/libOpenCL*.so*              #PKGLIBDIR#
+#DIRNAME#/usr/lib/libnvidia-compiler*.so*     #PKGLIBDIR#
+
+#DIRNAME#/usr/lib/vdpau/libvdpau_nvidia.so*   #PKGVDPAUDIR#
+#DIRNAME#/usr/lib/tls/*.so*                   #PKGTLSDIR#
+
+#DIRNAME#/usr/X11R6/lib/libXvMCNVIDIA.so.#VERSION#  #PKGLIBDIR#
+
+debian/dkms/patches/*                         usr/src/#DRIVERNAME#-#VERSION#/patches
+debian/dkms.conf                              usr/src/#DRIVERNAME#-#VERSION#
+debian/temp/modules/nvidia-kernel/nv/*        usr/src/#DRIVERNAME#-#VERSION#
+
+#DIRNAME#/usr/bin/nvidia-bug-report.sh #PKGBINDIR#
+#DIRNAME#/usr/bin/nvidia-xconfig #PKGBINDIR#
+#DIRNAME#/usr/bin/nvidia-smi #PKGBINDIR#
+
+#DIRNAME#/usr/share/pixmaps/#DRIVERNAME#-settings.png #DATADIR#/pixmaps
+
+debian/ubuntu-nvidia-settings.desktop   #PKGDESKDIR#
+
+debian/#AUTOSTARTFILE# #PKGDATADIR#
+
+#DIRNAME##SYSCONFDIR#/OpenCL/vendors/nvidia.icd #SYSCONFDIR#/OpenCL/vendors
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.postrm
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.postrm
@@ -0,0 +1,42 @@
+#! /bin/sh
+# postrm script for nvidia-current
+#
+# see: dh_installdeb(1)
+#
+# Copyright (C) 2009-2010 Canonical Ltd
+# Authors: Alberto Milone
+
+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/
+
+case "$1" in
+    remove|purge)
+
+    ;;
+    
+    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#
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.docs.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.docs.in
@@ -0,0 +1,2 @@
+#DIRNAME#/usr/share/doc/NVIDIA_Changelog
+#DIRNAME#/usr/share/doc/README.txt
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current-dev.install.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current-dev.install.in
@@ -0,0 +1,3 @@
+#DIRNAME#/usr/X11R6/lib/libXvMCNVIDIA.a       #PKGLIBDIR#
+
+#DIRNAME#/usr/include/*                       #INCLUDEDIR#/#DRIVERNAME#
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.preinst.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.preinst.in
@@ -0,0 +1,190 @@
+#! /bin/sh
+# preinst script for #DRIVERNAME#
+#
+# see: dh_installdeb(1)
+#
+# Copyright (C) 2009 Canonical Ltd
+# Authors: Alberto Milone
+
+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/
+
+if [ `dpkg --print-architecture` = "amd64" ]; then
+    HAS_LIB32="yes"
+fi
+
+case "$1" in
+    install|upgrade)
+
+    # We need to remove diversions from previous versions of the package
+
+    # clean up from old diversions
+    if [ -d /usr/share/nvidia-glx/diversions ]; then
+        rm -f /usr/lib/libGL.so.1
+        rm -f /usr/lib/libGL.so.1.2
+        
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions/libGL.so.1 /usr/lib/libGL.so.1 > /dev/null
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions/libGL.so.1.2 /usr/lib/libGL.so.1.2 > /dev/null
+
+        rm -f /usr/lib/xorg/modules/extensions/libGLcore.a
+        rm -f /usr/lib/xorg/modules/extensions/libglx.a
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions/libGLcore.a /usr/lib/xorg/modules/extensions/libGLcore.a > /dev/null
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions/libglx.a /usr/lib/xorg/modules/extensions/libglx.a > /dev/null
+
+        rmdir /usr/share/nvidia-glx/diversions || true;
+        rmdir /usr/share/nvidia-glx || true;
+    fi
+
+    if [ -d /usr/share/nvidia-glx/diversions-X11R6 ]; then
+
+        rm -f /usr/X11R6/lib/libGL.so.1
+        rm -f /usr/X11R6/lib/libGL.so.1.2
+        
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions-X11R6/libGL.so.1 /usr/X11R6/lib/libGL.so.1 > /dev/null
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/share/nvidia-glx/diversions-X11R6/libGL.so.1.2 /usr/X11R6/lib/libGL.so.1.2 > /dev/null
+
+        rmdir /usr/share/nvidia-glx/diversions-X11R6 || true;
+        rmdir /usr/share/nvidia-glx || true;
+    fi
+    # remove X11R6 diversions
+    
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so.1 | grep 'nvidia-glx' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/X11R6/lib/nvidia/libGL.so.1.xlibmesa /usr/X11R6/lib/libGL.so.1 > /dev/null
+    fi
+    
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so.1.2 | grep 'nvidia-glx' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/X11R6/lib/nvidia/libGL.so.1.2.xlibmesa /usr/X11R6/lib/libGL.so.1.2 > /dev/null
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/modules/extensions/libGLcore.a | grep 'nvidia-glx' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/X11R6/lib/nvidia/libGLcore.a.xlibmesa /usr/X11R6/lib/modules/extensions/libGLcore.a > /dev/null
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/modules/extensions/libglx.a | grep 'nvidia-glx' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/X11R6/lib/nvidia/libglx.a.xlibmesa /usr/X11R6/lib/modules/extensions/libglx.a > /dev/null
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/modules/extensions/libglx.so | grep 'nvidia-glx' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx --divert /usr/X11R6/lib/nvidia/libglx.so.xlibmesa /usr/X11R6/lib/modules/extensions/libglx.so > /dev/null
+    fi
+
+    # make sure these diversions don't exist anymore
+    if dpkg-divert --list /usr/lib/libGL.so | grep 'nvidia-glx-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-dev-envy --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/lib/libGL.so | grep 'nvidia-glx-177-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-177-dev --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/lib/libGL.so | grep 'nvidia-glx-new-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev-envy --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/lib/libGL.a | grep 'nvidia-glx-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-dev-envy --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/lib/libGL.a | grep 'nvidia-glx-new-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev-envy --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep 'nvidia-glx-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/X11R6/lib/nvidia/libGL.so.xlibmesa /usr/X11R6/lib/libGL.so > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-dev-envy --divert /usr/X11R6/lib/nvidia/libGL.so.xlibmesa /usr/X11R6/lib/libGL.so > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep 'nvidia-glx-new-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev --divert /usr/X11R6/lib/nvidia/libGL.so.xlibmesa /usr/X11R6/lib/libGL.so > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev-envy --divert /usr/X11R6/lib/nvidia/libGL.so.xlibmesa /usr/X11R6/lib/libGL.so > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep 'nvidia-glx-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/X11R6/lib/nvidia/libGL.a.xlibmesa /usr/X11R6/lib/libGL.a > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-dev-envy --divert /usr/X11R6/lib/nvidia/libGL.a.xlibmesa /usr/X11R6/lib/libGL.a > /dev/null || true
+    fi
+    if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep 'nvidia-glx-new-dev' > /dev/null ; then
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev --divert /usr/X11R6/lib/nvidia/libGL.a.xlibmesa /usr/X11R6/lib/libGL.a > /dev/null || true
+        dpkg-divert --remove --rename --package nvidia-glx-new-dev-envy --divert /usr/X11R6/lib/nvidia/libGL.a.xlibmesa /usr/X11R6/lib/libGL.a > /dev/null || true
+    fi
+
+
+    # Make sure that no diversion is still there
+    set -a "nvidia-glx" "nvidia-glx-new" "nvidia-glx-legacy" "nvidia-glx-envy"\
+            "nvidia-glx-new-envy" "nvidia-glx-legacy-envy" "nvidia-glx-180" \
+            "nvidia-glx-177" "nvidia-glx-173" "nvidia-glx-96" "nvidia-glx-71" \
+            "nvidia-glx-185" "nvidia-glx-190"
+
+    while [ $# -ge 1 ]; do
+        glxname=$1
+        glxdevname="$glxname-dev"
+    
+        if [ -n "$HAS_LIB32" ]; then
+            #Remove diversions of /usr/lib32/libGL.so -- only for the new name schemes (nvidia-glx-VER)
+            if dpkg-divert --list $glxname | grep "/usr/lib32/libGL.so " > /dev/null ; then
+                rm -f /usr/lib32/libGL.so > /dev/null || true
+                dpkg-divert --remove --rename --package $glxname --divert /usr/lib32/nvidia/libGL.so.xlibmesa /usr/lib32/libGL.so > /dev/null || true
+            fi
+
+            #Remove diversion of /usr/lib32/libGL.so.1
+            if dpkg-divert --list $glxname | grep /usr/lib32/libGL.so.1 > /dev/null ; then
+                rm -f /usr/lib32/libGL.so.1 > /dev/null || true
+                dpkg-divert --remove --rename --package $glxname --divert /usr/lib32/nvidia/libGL.so.1.xlibmesa /usr/lib32/libGL.so.1 > /dev/null || true
+            fi
+            
+            #Remove diversion of /usr/lib32/libGL.so.1.2
+            if dpkg-divert --list $glxname | grep /usr/lib32/libGL.so.1.2 > /dev/null ; then
+                rm -f /usr/lib32/libGL.so.1.2 > /dev/null || true
+                dpkg-divert --remove --rename --package $glxname --divert /usr/lib32/nvidia/libGL.so.1.2.xlibmesa /usr/lib32/libGL.so.1.2 > /dev/null || true
+            fi
+            
+        fi
+            
+
+        #Remove diversion of /usr/lib/xorg/modules/extensions/libGLcore.so
+        if dpkg-divert --list $glxname | grep /usr/lib/xorg/modules/extensions/libGLcore.so > /dev/null ; then
+            dpkg-divert --remove --rename --package $glxname --divert /usr/lib/nvidia/libGLcore.so.xlibmesa /usr/lib/xorg/modules/extensions/libGLcore.so > /dev/null || true
+        fi
+
+        #Remove diversion of /usr/lib/xorg/modules/extensions/libglx.so
+        if dpkg-divert --list $glxname | grep /usr/lib/xorg/modules/extensions/libglx.so > /dev/null ; then
+            rm -f /usr/lib/xorg/modules/extensions/libglx.so > /dev/null || true
+            dpkg-divert --remove --rename --package $glxname --divert /usr/lib/nvidia/libglx.so.xserver-xorg-core /usr/lib/xorg/modules/extensions/libglx.so > /dev/null || true
+        fi
+
+        #Remove diversion of /usr/lib/libGL.so.1
+        if dpkg-divert --list $glxname | grep "/usr/lib/libGL.so.1 " > /dev/null ; then
+            rm -f /usr/lib/libGL.so.1 > /dev/null || true
+            dpkg-divert --remove --rename --package $glxname --divert /usr/lib/nvidia/libGL.so.1.xlibmesa /usr/lib/libGL.so.1 > /dev/null || true
+        fi
+
+        #Remove diversion of /usr/lib/libGL.so.1.2
+        if dpkg-divert --list $glxname | grep /usr/lib/libGL.so.1.2 > /dev/null ; then
+            rm -f /usr/lib/libGL.so.1.2 > /dev/null || true
+            dpkg-divert --remove --rename --package $glxname --divert /usr/lib/nvidia/libGL.so.1.2.xlibmesa /usr/lib/libGL.so.1.2 > /dev/null || true
+        fi
+
+
+        shift
+    done
+
+    ;;
+
+    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
--- nvidia-graphics-drivers-195.36.24.orig/debian/compat
+++ nvidia-graphics-drivers-195.36.24/debian/compat
@@ -0,0 +1 @@
+5
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.prerm
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.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=nvidia-current
+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/nvidia-current/ld.so.conf
+
+		# Trigger gmenu so as to update the gnome menu
+		dpkg-trigger gmenucache || true
+
+		# explicit ldconfig due to alternatives
+		ldconfig
+	;;
+esac
+
+#DEBHELPER#
--- nvidia-graphics-drivers-195.36.24.orig/debian/copyright.in
+++ nvidia-graphics-drivers-195.36.24/debian/copyright.in
@@ -0,0 +1,195 @@
+This package was debianized by Randall Donald <rdonald@debian.org> on
+Mon, 31 Mar 2003 23:40:05 -0800.
+
+It was downloaded from
+#URL#
+
+Upstream Author: NVIDIA <linux-bugs@nvidia.com>
+
+
+Copyright:
+
+First a note from the README file
+
+Q: Why does NVIDIA not provide rpms anymore?
+
+A: Not every Linux distribution uses rpm, and NVIDIA wanted a single
+   solution that would work across all Linux distributions.  As indicated
+   in the NVIDIA Software License, Linux distributions are welcome to
+   repackage and redistribute the NVIDIA Linux driver in whatever package
+   format they wish.
+
+Furthermore, an email from NVIDIA:
+
+Greetings, Randall!  Comments below:
+
+On 30 Jul 2003, Randall Donald wrote:
+
+> To whom it may concern,
+> 
+> My name is Randall Donald and I am the maintainer for the Debian
+> downloader packages nvidia-glx-src and nvidia-kernel-src. 
+> As stated in your license and the README file 
+> ( "As indicated in the NVIDIA Software License, Linux distributions 
+>   are welcome to repackage and redistribute the NVIDIA Linux driver in 
+>   whatever package format they wish." )
+> I wish to include packages containing the Linux driver files in the Debian archive. 
+> I'd like to know if it is legally permitted to distribute binary kernel modules 
+> compiled from the NVIDIA kernel module source and Debian kernel headers. 
+
+This is fine; thanks for asking.
+
+> I am also wondering if the "No Separation of Components" clause 
+> ( No Separation of Components.  The SOFTWARE is licensed as a
+>   single product.  Its component parts may not be separated for use
+>   on more than one computer, nor otherwise used separately from the
+>   other parts.) applies to splitting the glx driver and kernel module source into
+>  multiple binary packages.
+
+This is also fine.  I believe this section of the license was
+intended to prevent users from doing things like using our Windows
+control panel with a competitor's display driver (that's not actually
+possible, but you get the idea...).  In the case of separating the
+driver into a glx package and a kernel package (like we used to
+do ourselves), this is simply a packaging issue; of course users
+will use the packages together when they install.
+
+Please feel free to redistribute the NVIDIA graphics driver.
+
+Thank you for doing this for the NVIDIA+Debian community!
+
+- Andy
+
+
+
+The NVIDIA Software Licence is as follows.   
+   
+From http://www.nvidia.com/view.asp?IO=nv_swlicense and extracted from the 
+installer: 
+
+
+           License For Customer Use of NVIDIA Software
+
+
+IMPORTANT NOTICE -- READ CAREFULLY: This License For Customer Use of
+NVIDIA Software ("LICENSE") is the agreement which governs use of
+the software of NVIDIA Corporation and its subsidiaries ("NVIDIA")
+downloadable herefrom, including computer software and associated
+printed materials ("SOFTWARE").  By downloading, installing, copying,
+or otherwise using the SOFTWARE, you agree to be bound by the terms
+of this LICENSE.  If you do not agree to the terms of this LICENSE,
+do not download the SOFTWARE.
+
+RECITALS
+
+Use of NVIDIA's products requires three elements: the SOFTWARE, the
+hardware on a graphics controller board, and a personal computer. The
+SOFTWARE is protected by copyright laws and international copyright
+treaties, as well as other intellectual property laws and treaties.
+The SOFTWARE is not sold, and instead is only licensed for use,
+strictly in accordance with this document.  The hardware is protected
+by various patents, and is sold, but this agreement does not cover
+that sale, since it may not necessarily be sold as a package with
+the SOFTWARE.  This agreement sets forth the terms and conditions
+of the SOFTWARE LICENSE only.
+
+1.  DEFINITIONS
+
+1.1  Customer.  Customer means the entity or individual that
+downloads the SOFTWARE.
+
+2.  GRANT OF LICENSE
+
+2.1  Rights and Limitations of Grant.  NVIDIA hereby grants Customer
+the following non-exclusive, non-transferable right to use the
+SOFTWARE, with the following limitations:
+
+2.1.1  Rights.  Customer may install and use one copy of the SOFTWARE
+on a single computer, and except for making one back-up copy of
+the Software, may not otherwise copy the SOFTWARE.  This LICENSE
+of SOFTWARE may not be shared or used concurrently on different
+computers.
+
+2.1.2  Linux Exception.  Notwithstanding the foregoing terms of
+Section 2.1.1, SOFTWARE designed exclusively for use on the Linux
+operating system may be copied and redistributed, provided that
+the binary files thereof are not modified in any way (except for
+unzipping of compressed files).
+
+2.1.3  Limitations.
+
+No Reverse Engineering.  Customer may not reverse engineer,
+decompile, or disassemble the SOFTWARE, nor attempt in any other
+manner to obtain the source code.
+
+No Separation of Components.  The SOFTWARE is licensed as a
+single product.  Its component parts may not be separated for use
+on more than one computer, nor otherwise used separately from the
+other parts.
+
+No Rental.  Customer may not rent or lease the SOFTWARE to someone
+else.
+
+3.  TERMINATION
+
+This LICENSE will automatically terminate if Customer fails to
+comply with any of the terms and conditions hereof.  In such event,
+Customer must destroy all copies of the SOFTWARE and all of its
+component parts.
+
+4.  COPYRIGHT
+
+All title and copyrights in and to the SOFTWARE (including but
+not limited to all images, photographs, animations, video, audio,
+music, text, and other information incorporated into the SOFTWARE),
+the accompanying printed materials, and any copies of the SOFTWARE,
+are owned by NVIDIA, or its suppliers.  The SOFTWARE is protected
+by copyright laws and international treaty provisions.  Accordingly,
+Customer is required to treat the SOFTWARE like any other copyrighted
+material, except as otherwise allowed pursuant to this LICENSE
+and that it may make one copy of the SOFTWARE solely for backup or
+archive purposes.
+
+5.  APPLICABLE LAW
+
+This agreement shall be deemed to have been made in, and shall be
+construed pursuant to, the laws of the State of California.
+
+6.  DISCLAIMER OF WARRANTIES AND LIMITATION ON LIABILITY
+
+6.1  No Warranties.  TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE
+LAW, THE SOFTWARE IS PROVIDED "AS IS" AND NVIDIA AND ITS SUPPLIERS
+DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT
+NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE.
+
+6.2  No Liability for Consequential Damages.  TO THE MAXIMUM
+EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL NVIDIA OR
+ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR
+CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
+DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS
+OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT
+OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF NVIDIA HAS
+BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7.  MISCELLANEOUS 
+
+The United Nations Convention on Contracts for the International
+Sale of Goods is specifically disclaimed.  If any provision of this
+LICENSE is inconsistent with, or cannot be fully enforced under,
+the law, such provision will be construed as limited to the extent
+necessary to be consistent with and fully enforceable under the law.
+This agreement is the final, complete and exclusive agreement between
+the parties relating to the subject matter hereof, and supersedes
+all prior or contemporaneous understandings and agreements relating
+to such subject matter, whether oral or written.  Customer agrees
+that it will not ship, transfer or export the SOFTWARE into any
+country, or use the SOFTWARE in any manner, prohibited by the
+United States Bureau of Export Administration or any export laws,
+restrictions or regulations.  This LICENSE may only be modified in
+writing signed by an authorized officer of NVIDIA.
+
+---------------------------------------------------------------------
+
+The Debian packaging is (C) 2009, Canonical Ltd and is licensed
+under the GPL, see `/usr/share/common-licenses/GPL'.
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.examples
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.examples
@@ -0,0 +1,2 @@
+NVIDIA-Linux-x86_64-195.36.24-pkg2/usr/share/doc/XF86Config.sample
+
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.dirs
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.dirs
@@ -0,0 +1,23 @@
+/etc/modprobe.d
+/etc/OpenCL/vendors
+/usr/lib/nvidia-current
+/etc/xdg/autostart
+/usr/bin
+/usr/lib/nvidia-current/tls
+/usr/lib/nvidia-current/bin
+/usr/lib/nvidia-current
+/usr/lib32/nvidia-current
+/usr/lib/xorg/modules/drivers
+/usr/lib/xorg/modules/extensions
+/usr/share/nvidia-current
+/usr/share/nvidia-current
+/usr/share/man/man1
+/usr/share/pixmaps
+/usr/share/lintian/overrides
+/usr/lib/nvidia-current/xorg
+/usr/lib/nvidia-current/xorg
+/usr/src/nvidia-current-195.36.24
+/usr/src/nvidia-current-195.36.24/patches
+/usr/lib/vdpau
+/usr/lib32/vdpau
+/lib/nvidia-current
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.override
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.override
@@ -0,0 +1,89 @@
+nvidia-current: library-not-linked-against-libc ./usr/lib/libGL.so.195.36.24
+
+nvidia-current: shared-lib-without-dependency-information ./usr/lib/libGLcore.so.195.36.24
+
+nvidia-current: library-not-linked-against-libc ./usr/lib/xorg/modules/extensions/libglx.so.195.36.24
+
+nvidia-current: shlib-with-non-pic-code usr/lib/libGL.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/libGLcore.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/xorg/modules/extensions/libglx.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/libXvMCNVIDIA.so.195.36.24
+
+nvidia-current: non-dev-pkg-with-shlib-symlink usr/lib/libGL.so.195.36.24 usr/lib/libGL.so
+nvidia-current: non-dev-pkg-with-shlib-symlink usr/lib/xorg/modules/extensions/libglx.so.195.36.24 usr/lib/xorg/modules/extensions/libglx.so
+
+
+nvidia-current: script-not-executable usr/src/nvidia-current-195.36.24/conftest.sh
+nvidia-current: maintainer-script-ignores-errors prerm
+nvidia-current: shlib-with-non-pic-code usr/lib/nvidia-current/libGL.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/libGL.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/nvidia-current/libGLcore.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/libGLcore.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/nvidia-current/libXvMCNVIDIA.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/libXvMCNVIDIA.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/nvidia-current/libcuda.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/libcuda.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/nvidia-current/libnvidia-cfg.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/libnvidia-cfg.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/nvidia-current/libnvidia-tls.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/libnvidia-tls.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/libvdpau.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/nvidia-current/tls/libnvidia-tls.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/tls/libnvidia-tls.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/vdpau/libvdpau_trace.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/nvidia-current/xorg/libglx.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/xorg/libglx.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/tls/libnvidia-tls.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/tls/libnvidia-tls.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib/vdpau/libvdpau_nvidia.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/vdpau/libvdpau_nvidia.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib/vdpau/libvdpau_trace.so.195.36.24
+nvidia-current: unused-shlib-entry-in-control-file libnvidia-tls 190
+nvidia-current: shlibs-declares-dependency-on-other-package libgl1-mesa | libgl1
+nvidia-current: prerm-calls-ldconfig
+nvidia-current: copyright-without-copyright-notice
+nvidia-current: desktop-command-not-in-package /usr/share/applications/nvidia-current/ubuntu-nvidia-settings.desktop /usr/bin/nvidia-settings
+nvidia-current: shared-lib-without-dependency-information ./usr/lib/nvidia-current/libnvidia-tls.so.195.36.24
+nvidia-current: shared-lib-without-dependency-information ./usr/lib/nvidia-current/tls/libnvidia-tls.so.195.36.24
+nvidia-current: shared-lib-without-dependency-information ./usr/lib/tls/libnvidia-tls.so.195.36.24
+nvidia-current: unknown-section restricted/misc
+nvidia-185-modaliases: copyright-without-copyright-notice
+nvidia-185-modaliases: extended-description-line-too-long
+nvidia-glx-185-dev: copyright-without-copyright-notice
+nvidia-glx-185-dev: extended-description-line-too-long
+nvidia-glx-185-dev: unknown-section restricted/misc
+nvidia-185-kernel-source: copyright-without-copyright-notice
+nvidia-185-kernel-source: unknown-section restricted/misc
+nvidia-current-dev: shlib-with-non-pic-code usr/lib/nvidia-current/libXvMCNVIDIA.so.195.36.24
+nvidia-current-dev: shlib-without-PT_GNU_STACK-section usr/lib/nvidia-current/libXvMCNVIDIA.so.195.36.24
+nvidia-current-dev: postinst-has-useless-call-to-ldconfig
+nvidia-current-dev: postrm-has-useless-call-to-ldconfig
+nvidia-current-dev: copyright-without-copyright-notice
+nvidia-current-dev: missing-dependency-on-libc needed by ./usr/lib/nvidia-current/libXvMCNVIDIA.so.195.36.24
+nvidia-current-dev: unknown-section restricted/misc
+nvidia-glx-185: copyright-without-copyright-notice
+nvidia-glx-185: unknown-section restricted/misc
+nvidia-current-modaliases: copyright-without-copyright-notice
+
+nvidia-current: script-not-executable ./usr/src/nvidia-current-195.36.24/conftest.sh
+nvidia-current: maintainer-script-ignores-errors prerm
+nvidia-current: shlib-with-non-pic-code usr/lib32/nvidia-current/libGL.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib32/nvidia-current/libGLcore.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib32/nvidia-current/libXvMCNVIDIA.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib32/nvidia-current/libXvMCNVIDIA.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib32/nvidia-current/libcuda.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib32/nvidia-current/libnvidia-cfg.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib32/nvidia-current/libnvidia-tls.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib32/nvidia-current/libvdpau_nvidia.so.195.36.24
+nvidia-current: shlib-with-non-pic-code usr/lib32/nvidia-current/tls/libnvidia-tls.so.195.36.24
+nvidia-current: shlib-without-PT_GNU_STACK-section usr/lib32/nvidia-current/tls/libnvidia-tls.so.195.36.24
+
+nvidia-current: shared-lib-without-dependency-information ./usr/lib/nvidia-current/libnvidia-tls.so.195.36.24
+nvidia-current: shared-lib-without-dependency-information ./usr/lib/nvidia-current/tls/libnvidia-tls.so.195.36.24
+nvidia-current: shared-lib-without-dependency-information ./usr/lib/tls/libnvidia-tls.so.195.36.24
+nvidia-current: shared-lib-without-dependency-information ./usr/lib32/nvidia-current/libnvidia-tls.so.195.36.24
+nvidia-current: shared-lib-without-dependency-information ./usr/lib32/nvidia-current/tls/libnvidia-tls.so.195.36.24
+
+
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current-dev.preinst.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current-dev.preinst.in
@@ -0,0 +1,81 @@
+#! /bin/sh
+# preinst script for #DRIVERDEVNAME#
+#
+# see: dh_installdeb(1)
+#
+# Copyright (C) 2009-2010 Canonical Ltd
+# Authors: Alberto Milone
+#
+set -e
+
+case "$1" in
+    install|upgrade)
+    # We need to remove diversions from previous versions of the package
+    
+    if [ -d /usr/share/nvidia-glx/diversions/ ] ; then
+        rm -f /usr/lib/libGL.so 
+            rm -f /usr/lib/libGL.a 
+            dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/share/nvidia-glx/diversions/libGL.so /usr/lib/libGL.so > /dev/null
+        dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/share/nvidia-glx/diversions/libGL.a  /usr/lib/libGL.a > /dev/null
+
+        rmdir  /usr/share/nvidia-glx/diversions/ || true
+        rmdir /usr/share/nvidia-glx || true
+    fi
+
+    if [ ! -d /usr/lib/nvidia ]; then
+        mkdir -p /usr/lib/nvidia || true
+    fi
+
+    # Remove old old old gl header diversions
+    if [ -e /usr/share/nvidia-glx/diversions/gl.h ]; then
+      if [ -e /usr/include/GL/gl.h ]; then 
+          rm -f /usr/include/GL/gl.h /usr/include/GL/glx.h /usr/include/GL/glxtokens.h
+      fi        
+      dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/share/nvidia-glx/diversions/gl.h /usr/include/GL/gl.h > /dev/null
+      dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/share/nvidia-glx/diversions/glx.h /usr/include/GL/glx.h > /dev/null
+      dpkg-divert --remove --rename --package nvidia-glx-dev --divert /usr/share/nvidia-glx/diversions/glxext.h /usr/include/GL/glxext.h > /dev/null
+    fi
+
+
+    # Make sure that no diversion is still there
+    set -a "nvidia-glx-dev" "nvidia-glx-new-dev" "nvidia-glx-legacy-dev" "nvidia-glx-dev-envy"\
+            "nvidia-glx-new-dev-envy" "nvidia-glx-legacy-dev-envy" "nvidia-glx-180-dev" \
+            "nvidia-glx-177-dev" "nvidia-glx-173-dev" "nvidia-glx-96-dev" "nvidia-glx-71-dev" \
+            "nvidia-glx-185-dev" "nvidia-glx-190-dev"
+
+    while [ $# -ge 1 ]; do
+        glxdevname=$1
+
+        if dpkg-divert --list /usr/lib/libGL.so | grep $glxdevname > /dev/null ; then 
+            dpkg-divert --remove --rename --package $glxdevname --divert /usr/lib/nvidia/libGL.so.xlibmesa /usr/lib/libGL.so > /dev/null
+        fi
+        if dpkg-divert --list /usr/lib/libGL.a | grep $glxdevname > /dev/null ; then 
+            dpkg-divert --remove --rename --package $glxdevname --divert /usr/lib/nvidia/libGL.a.xlibmesa /usr/lib/libGL.a > /dev/null
+        fi
+        if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep $glxdevname > /dev/null ; then  
+               dpkg-divert --remove --rename --package $glxdevname --divert /usr/X11R6/lib/nvidia/libGL.so.xlibmesa /usr/X11R6/lib/libGL.so > /dev/null
+        fi
+        if dpkg-divert --list /usr/X11R6/lib/libGL.so | grep $glxdevname > /dev/null ; then 
+            dpkg-divert --remove --rename --package $glxdevname --divert /usr/X11R6/lib/nvidia/libGL.a.xlibmesa /usr/X11R6/lib/libGL.a > /dev/null    
+        fi
+
+        shift
+    done
+
+  ;;
+
+    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
--- nvidia-graphics-drivers-195.36.24.orig/debian/dkms.conf.in
+++ nvidia-graphics-drivers-195.36.24/debian/dkms.conf.in
@@ -0,0 +1,16 @@
+PACKAGE_NAME="#DRIVERNAME#"
+PACKAGE_VERSION="#VERSION#"
+CLEAN="make clean"
+BUILT_MODULE_NAME[0]="nvidia"
+DEST_MODULE_NAME[0]="#MODULENAME#"
+MAKE[0]="make module KERNDIR=/lib/modules/$kernelver IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=$kernel_source_dir"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/char/drm"
+AUTOINSTALL="yes"
+PATCH[0]="vga_arbiter_workaround.patch"
+PATCH_MATCH[0]="^2.6.32"
+#PATCH[0]="rt_preempt_31.patch"
+#PATCH_MATCH[0]="2.6.31"
+#PATCH[1]="fall_back_on_mtrr_if_no_pat.patch"
+#PATCH_MATCH[1]="2.6.31"
+#PATCH[2]="nvidia-rt-compat.patch"
+#PATCH_MATCH[2]="2.6.31"
--- nvidia-graphics-drivers-195.36.24.orig/debian/control
+++ nvidia-graphics-drivers-195.36.24/debian/control
@@ -0,0 +1,90 @@
+Source: nvidia-graphics-drivers
+Section: restricted/misc
+Priority: optional
+Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+Build-Depends: debhelper (>= 6.0.7~), sed (>> 3.0), libxext6, bzip2,
+ xserver-xorg-dev (>= 2:1.4), execstack, cdbs, libc6
+Standards-Version: 3.8.0
+
+Package: nvidia-current
+Architecture: i386 amd64 lpia
+Depends: x11-common (>= 1:7.0.0), make, sed (>> 3.0), dkms, linux-libc-dev, libc6-dev,
+ linux-headers-generic | linux-headers, patch, acpid, ${shlibs:Depends}
+Recommends: nvidia-settings
+Provides: ${xviddriver:Provides}
+Description: NVIDIA binary Xorg driver, kernel module and VDPAU library
+ The binary driver provide optimized hardware acceleration of OpenGL
+ applications via a direct-rendering X Server. AGP, PCIe, SLI, TV-out
+ and flat panel displays are also supported.
+ .
+ This package also includes the source for building the kernel module
+ required by the Xorg driver, and provides NVIDIA's implementation of
+ the Video Decode and presentation API. The latter enables acceleration
+ for NVIDIA 8 and later series cards for h264 video.
+ .
+ GPUs such as GeForce series 6 or newer are supported.
+ .
+ See /usr/share/doc/nvidia-current/README.txt.gz for a complete list 
+ of supported GPUs and PCIIDs
+ .
+ 
+Package: nvidia-current-dev
+Architecture: i386 amd64 lpia
+Depends: nvidia-current (>= 195.36.24)
+Description: NVIDIA binary Xorg driver development files
+ This package contains the NVIDIA binary Xorg driver
+ development files.
+ .
+ For more information on this source package visit NVIDIA's homepage
+ at http://www.nvidia.com/ .
+
+Package: nvidia-current-modaliases
+Section: admin
+Architecture: i386 amd64 lpia
+Description: Modaliases for the NVIDIA binary X.Org driver
+ The modaliases provide a list of pci id's which makes it possible to
+ detect the model of a graphic card.
+
+Package: nvidia-glx-185
+Architecture: i386 amd64 lpia
+Depends: nvidia-current
+Description: Transitional package for nvidia-glx-185
+ This is a transitional package for nvidia-glx-185, and can be safely removed
+ after the installation is complete.
+
+Package: nvidia-glx-185-dev
+Architecture: i386 amd64 lpia
+Depends: nvidia-current-dev
+Description: Transitional package for nvidia-glx-185-dev
+ This is a transitional package for nvidia-glx-185-dev, and can be safely removed
+ after the installation is complete.
+ 
+Package: nvidia-185-kernel-source
+Architecture: i386 amd64 lpia
+Depends: nvidia-current
+Description: Transitional package for nvidia-glx-185-kernel-source
+ This is a transitional package for nvidia-glx-185-kernel-source, and can be
+ safely removed after the installation is complete.
+
+Package: nvidia-185-modaliases
+Section: admin
+Architecture: i386 amd64 lpia
+Depends: nvidia-current-modaliases
+Description: Transitional package for nvidia-185-modaliases
+ This is a transitional package for nvidia-185-modaliases, and can be safely removed
+ after the installation is complete.
+
+Package: nvidia-185-libvdpau
+Architecture: i386 amd64 lpia
+Depends: nvidia-current
+Description: Transitional package for nvidia-185-libvdpau
+ This is a transitional package for nvidia-185-libvdpau, and can be safely removed
+ after the installation is complete.
+
+Package: nvidia-185-libvdpau-dev
+Architecture: i386 amd64 lpia
+Depends: nvidia-current-dev
+Description: Transitional package for nvidia-185-libvdpau-dev
+ This is a transitional package for nvidia-185-libvdpau-dev, and can be safely
+ removed after the installation is complete.
+
--- nvidia-graphics-drivers-195.36.24.orig/debian/dkms.conf
+++ nvidia-graphics-drivers-195.36.24/debian/dkms.conf
@@ -0,0 +1,16 @@
+PACKAGE_NAME="nvidia-current"
+PACKAGE_VERSION="195.36.24"
+CLEAN="make clean"
+BUILT_MODULE_NAME[0]="nvidia"
+DEST_MODULE_NAME[0]="nvidia-current"
+MAKE[0]="make module KERNDIR=/lib/modules/$kernelver IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=$kernel_source_dir"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/char/drm"
+AUTOINSTALL="yes"
+PATCH[0]="vga_arbiter_workaround.patch"
+PATCH_MATCH[0]="^2.6.32"
+#PATCH[0]="rt_preempt_31.patch"
+#PATCH_MATCH[0]="2.6.31"
+#PATCH[1]="fall_back_on_mtrr_if_no_pat.patch"
+#PATCH_MATCH[1]="2.6.31"
+#PATCH[2]="nvidia-rt-compat.patch"
+#PATCH_MATCH[2]="2.6.31"
--- nvidia-graphics-drivers-195.36.24.orig/debian/copyright
+++ nvidia-graphics-drivers-195.36.24/debian/copyright
@@ -0,0 +1,195 @@
+This package was debianized by Randall Donald <rdonald@debian.org> on
+Mon, 31 Mar 2003 23:40:05 -0800.
+
+It was downloaded from
+ftp://download.nvidia.com/XFree86/Linux-x86/195.36.24/NVIDIA-Linux-x86-195.36.24-pkg0.run
+
+Upstream Author: NVIDIA <linux-bugs@nvidia.com>
+
+
+Copyright:
+
+First a note from the README file
+
+Q: Why does NVIDIA not provide rpms anymore?
+
+A: Not every Linux distribution uses rpm, and NVIDIA wanted a single
+   solution that would work across all Linux distributions.  As indicated
+   in the NVIDIA Software License, Linux distributions are welcome to
+   repackage and redistribute the NVIDIA Linux driver in whatever package
+   format they wish.
+
+Furthermore, an email from NVIDIA:
+
+Greetings, Randall!  Comments below:
+
+On 30 Jul 2003, Randall Donald wrote:
+
+> To whom it may concern,
+> 
+> My name is Randall Donald and I am the maintainer for the Debian
+> downloader packages nvidia-glx-src and nvidia-kernel-src. 
+> As stated in your license and the README file 
+> ( "As indicated in the NVIDIA Software License, Linux distributions 
+>   are welcome to repackage and redistribute the NVIDIA Linux driver in 
+>   whatever package format they wish." )
+> I wish to include packages containing the Linux driver files in the Debian archive. 
+> I'd like to know if it is legally permitted to distribute binary kernel modules 
+> compiled from the NVIDIA kernel module source and Debian kernel headers. 
+
+This is fine; thanks for asking.
+
+> I am also wondering if the "No Separation of Components" clause 
+> ( No Separation of Components.  The SOFTWARE is licensed as a
+>   single product.  Its component parts may not be separated for use
+>   on more than one computer, nor otherwise used separately from the
+>   other parts.) applies to splitting the glx driver and kernel module source into
+>  multiple binary packages.
+
+This is also fine.  I believe this section of the license was
+intended to prevent users from doing things like using our Windows
+control panel with a competitor's display driver (that's not actually
+possible, but you get the idea...).  In the case of separating the
+driver into a glx package and a kernel package (like we used to
+do ourselves), this is simply a packaging issue; of course users
+will use the packages together when they install.
+
+Please feel free to redistribute the NVIDIA graphics driver.
+
+Thank you for doing this for the NVIDIA+Debian community!
+
+- Andy
+
+
+
+The NVIDIA Software Licence is as follows.   
+   
+From http://www.nvidia.com/view.asp?IO=nv_swlicense and extracted from the 
+installer: 
+
+
+           License For Customer Use of NVIDIA Software
+
+
+IMPORTANT NOTICE -- READ CAREFULLY: This License For Customer Use of
+NVIDIA Software ("LICENSE") is the agreement which governs use of
+the software of NVIDIA Corporation and its subsidiaries ("NVIDIA")
+downloadable herefrom, including computer software and associated
+printed materials ("SOFTWARE").  By downloading, installing, copying,
+or otherwise using the SOFTWARE, you agree to be bound by the terms
+of this LICENSE.  If you do not agree to the terms of this LICENSE,
+do not download the SOFTWARE.
+
+RECITALS
+
+Use of NVIDIA's products requires three elements: the SOFTWARE, the
+hardware on a graphics controller board, and a personal computer. The
+SOFTWARE is protected by copyright laws and international copyright
+treaties, as well as other intellectual property laws and treaties.
+The SOFTWARE is not sold, and instead is only licensed for use,
+strictly in accordance with this document.  The hardware is protected
+by various patents, and is sold, but this agreement does not cover
+that sale, since it may not necessarily be sold as a package with
+the SOFTWARE.  This agreement sets forth the terms and conditions
+of the SOFTWARE LICENSE only.
+
+1.  DEFINITIONS
+
+1.1  Customer.  Customer means the entity or individual that
+downloads the SOFTWARE.
+
+2.  GRANT OF LICENSE
+
+2.1  Rights and Limitations of Grant.  NVIDIA hereby grants Customer
+the following non-exclusive, non-transferable right to use the
+SOFTWARE, with the following limitations:
+
+2.1.1  Rights.  Customer may install and use one copy of the SOFTWARE
+on a single computer, and except for making one back-up copy of
+the Software, may not otherwise copy the SOFTWARE.  This LICENSE
+of SOFTWARE may not be shared or used concurrently on different
+computers.
+
+2.1.2  Linux Exception.  Notwithstanding the foregoing terms of
+Section 2.1.1, SOFTWARE designed exclusively for use on the Linux
+operating system may be copied and redistributed, provided that
+the binary files thereof are not modified in any way (except for
+unzipping of compressed files).
+
+2.1.3  Limitations.
+
+No Reverse Engineering.  Customer may not reverse engineer,
+decompile, or disassemble the SOFTWARE, nor attempt in any other
+manner to obtain the source code.
+
+No Separation of Components.  The SOFTWARE is licensed as a
+single product.  Its component parts may not be separated for use
+on more than one computer, nor otherwise used separately from the
+other parts.
+
+No Rental.  Customer may not rent or lease the SOFTWARE to someone
+else.
+
+3.  TERMINATION
+
+This LICENSE will automatically terminate if Customer fails to
+comply with any of the terms and conditions hereof.  In such event,
+Customer must destroy all copies of the SOFTWARE and all of its
+component parts.
+
+4.  COPYRIGHT
+
+All title and copyrights in and to the SOFTWARE (including but
+not limited to all images, photographs, animations, video, audio,
+music, text, and other information incorporated into the SOFTWARE),
+the accompanying printed materials, and any copies of the SOFTWARE,
+are owned by NVIDIA, or its suppliers.  The SOFTWARE is protected
+by copyright laws and international treaty provisions.  Accordingly,
+Customer is required to treat the SOFTWARE like any other copyrighted
+material, except as otherwise allowed pursuant to this LICENSE
+and that it may make one copy of the SOFTWARE solely for backup or
+archive purposes.
+
+5.  APPLICABLE LAW
+
+This agreement shall be deemed to have been made in, and shall be
+construed pursuant to, the laws of the State of California.
+
+6.  DISCLAIMER OF WARRANTIES AND LIMITATION ON LIABILITY
+
+6.1  No Warranties.  TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE
+LAW, THE SOFTWARE IS PROVIDED "AS IS" AND NVIDIA AND ITS SUPPLIERS
+DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT
+NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE.
+
+6.2  No Liability for Consequential Damages.  TO THE MAXIMUM
+EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL NVIDIA OR
+ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR
+CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
+DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS
+OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT
+OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF NVIDIA HAS
+BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7.  MISCELLANEOUS 
+
+The United Nations Convention on Contracts for the International
+Sale of Goods is specifically disclaimed.  If any provision of this
+LICENSE is inconsistent with, or cannot be fully enforced under,
+the law, such provision will be construed as limited to the extent
+necessary to be consistent with and fully enforceable under the law.
+This agreement is the final, complete and exclusive agreement between
+the parties relating to the subject matter hereof, and supersedes
+all prior or contemporaneous understandings and agreements relating
+to such subject matter, whether oral or written.  Customer agrees
+that it will not ship, transfer or export the SOFTWARE into any
+country, or use the SOFTWARE in any manner, prohibited by the
+United States Bureau of Export Administration or any export laws,
+restrictions or regulations.  This LICENSE may only be modified in
+writing signed by an authorized officer of NVIDIA.
+
+---------------------------------------------------------------------
+
+The Debian packaging is (C) 2009, Canonical Ltd and is licensed
+under the GPL, see `/usr/share/common-licenses/GPL'.
--- nvidia-graphics-drivers-195.36.24.orig/debian/changelog
+++ nvidia-graphics-drivers-195.36.24/debian/changelog
@@ -0,0 +1,951 @@
+nvidia-graphics-drivers (195.36.24-0ubuntu1~10.04) lucid-proposed; urgency=low
+
+  * New upstream release:
+    - Added support for the following GPUs:
+      o GeForce GTX 480
+      o GeForce GTX 470
+      o Tesla C2050
+    - Fixed a problem that caused occasional red flashes in XVideo
+      frames (LP: #580763).
+    - Added official support for xserver 1.8. The -ignoreABI option
+      is no longer required with this version of the server.
+    - Updated the "Supported NVIDIA GPU Products" list to include
+      various supported GPUs that were missing previously.
+  * debian/nvidia-current.dirs.in:
+    - Do not install empty directories (GL, CL, cuda) in
+      /usr/share/include (LP: #540171).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 24 May 2010 13:38:24 +0200
+
+nvidia-graphics-drivers (195.36.15-0ubuntu3) lucid-proposed; urgency=low
+
+  * debian/dkms/patches/vga_arbiter_workaround.patch:
+    - Prevent X from crashing with kernel 2.6.32 when 2 or more
+      nvidia cards are available (LP: #573557).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 04 May 2010 13:03:46 +0200
+
+nvidia-graphics-drivers (195.36.15-0ubuntu2) lucid; urgency=low
+
+  * debian/nvidia-$flavour.{dirs|postinst}.in, rules:
+    - Install the blacklist file in /lib/nvidia-$flavour instead
+      of /usr/lib/nvidia-$flavour 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). 
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Fri, 09 Apr 2010 13:18:57 +0200
+
+nvidia-graphics-drivers (195.36.15-0ubuntu1) lucid; urgency=low
+
+  * New upstream release:
+    - Fixed a bug that caused the X server to crash when rendering
+      occurred while the X server was not on the active VT.
+    - Fixed a regression that caused the driver to fail to properly
+      adjust the GPU fan speed on some GPUs.
+    - Fixed a bug that prevented performance level transitions on
+      recent GPUs with SDDR3 and GDDR5 memory.
+  * debian/nvidia-$flavour.{postinst|prerm}.in:
+    - Call gmenucache trigger so that the icon of nvidia-settings
+      shows up in the menu (LP: #522969).
+  * debian/nvidia-current.links{32}.in:
+    - Add link to libOpenCL.so in /usr/lib and in /usr/lib32.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 17 Mar 2010 10:21:52 +0100
+
+nvidia-graphics-drivers (195.36.08-0ubuntu1) lucid; urgency=low
+
+  * New upstream release:
+    - Added support for the following GPUs:
+      o Quadro FX 880M
+      o GeForce GTS 350M
+      o GeForce GTS 360M
+    - Fixed a bug that caused screen corruption after an application
+      released a GLX_NV_present_video device.
+    - Fixed brightness control hotkeys on some laptops.
+    - Fixed a bug that caused G-Sync stereo synchronization to fail
+      sometimes when enabling frame lock.
+    - Fixed a bug that caused OpenGL applications to occasionally crash
+      with "double free or corruption" messages when exiting.
+    - On GPUs with VDPAU feature set A, enhanced VDPAU's handling of
+      some corrupted or incorrectly formatted MPEG-1/2 streams. This
+      solves a reported issue with "0testbad.mpg".
+    - Fixed a bug in the VDPAU video mixer that caused chroma
+      aberrations, and corruption in the right-hand few columns of
+      pixels, when post-processing video surfaces with widths not an
+      exact multiple of 4 pixels.
+    - Fixed a bug that prevented the GPUFanControlState attribute from
+      being set on the nvidia-settings command line.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Fri, 05 Mar 2010 11:07:16 +0100
+
+nvidia-graphics-drivers (195.36.03-0ubuntu1) lucid; urgency=low
+
+  * New upstream release:
+    - Fixed a regression that made the "TVStandard" X
+      configuration option cause system hangs with products
+      from the GeForce 6 and 7 series.
+    - Worked around a bug in some AUO laptop flat panels
+      where the native mode in the EDID is invalid, leading to
+      a 640x480 desktop repeated six times across the screen.
+    - Increased the maximum number of slices supported by VDPAU
+      for MPEG-2 streams, in order to cope with the region 1
+      DVD "A Christmas Story".
+    - Added unofficial preliminary support for xorg-server
+      video driver ABI version 7, including xorg-server-1.7.99.2.
+    - Fix the soname of libvdpau_nvidia.so.1 and
+      libvdpau_trace.so.1 to match their filenames.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 17 Feb 2010 19:13:53 +0100
+
+nvidia-graphics-drivers (190.53-0ubuntu14) lucid; urgency=low
+
+  * debian/rules:
+    - Blacklist lbm-nouveau.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 04 Feb 2010 16:29:15 -0800
+
+nvidia-graphics-drivers (190.53-0ubuntu13) lucid; urgency=low
+
+  * debian/rules:
+    - Use the real name of the kernel module in the modalias
+      file instead of the alias.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 04 Feb 2010 11:22:57 -0800
+
+nvidia-graphics-drivers (190.53-0ubuntu12) lucid; urgency=low
+
+  * debian/nvidia-current.postinst.in:
+    - Pass -u to update-initramfs in addition to -k. 
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 03 Feb 2010 12:59:56 -0800
+
+nvidia-graphics-drivers (190.53-0ubuntu11) lucid; urgency=low
+
+  * debian/postinst.in:
+    - Update initramfs for the current kernel instead of
+      echoing the action.
+ 
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 03 Feb 2010 10:32:32 -0800
+
+nvidia-graphics-drivers (190.53-0ubuntu10) lucid; urgency=low
+
+  * debian/postinst.in:
+    - Update the initramfs for the current kernel and for the
+      newest one so that the blacklist file is included in
+      the initramfs and nouveau can be blacklisted early.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 03 Feb 2010 09:40:53 -0800
+
+nvidia-graphics-drivers (190.53-0ubuntu9) lucid; urgency=low
+
+  * debian/control.in:
+    - Add transitional packages for nvidia-185-libvdpau and
+      nvidia-185-libvdpau-dev so that old vdpau libraries
+      don't break the alternatives system.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 26 Jan 2010 12:30:23 +0100
+
+nvidia-graphics-drivers (190.53-0ubuntu8) lucid; urgency=low
+
+  * Install slave link to libvdpau_nvidia.so in /usr/lib
+    and /usr/lib32 (on amd64) so as not to break
+    compatibility with applications which look for
+    libvdpau_nvidia.so (LP: #510390).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 21 Jan 2010 20:56:06 +0100
+
+nvidia-graphics-drivers (190.53-0ubuntu7) lucid; urgency=low
+
+  * debian/rules:
+    - Blacklist nouveau and the other nvidia proprietary
+      drivers in the modprobe.conf file.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 21 Jan 2010 15:55:39 +0100
+
+nvidia-graphics-drivers (190.53-0ubuntu6) lucid; urgency=low
+
+  * debian/compat:
+    - Bump compatibility to 5.
+  * debian/nvidia-current.dirs.in:
+    - Add #VDPAUDIR# and #VDPAUDIR32# so that alternatives
+      for vdpau won't fail.
+  * debian/nvidia-current.{install|links|links32}.in:
+    - Install libvdpau_nvidia.* in the vdpau subdirectory so
+      that they are not included in the ld cache.
+  * debian/nvidia-current.postinst.in:
+    - Add libvdpau_nvidia.so.1 and libvdpau_nvidia.so.1_lib32
+      slave links so as to support multiple installations of
+      nvidia drivers that support vdpau.
+    - Install alternative with --force so that files that
+      already exist (from unofficial PPAs or from the Nvidia
+      installer, etc.) are overwritten thus avoiding to
+      install a broken alternative.
+  * debian/rules:
+    - Use global replacement when generating files from
+      templates.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 19 Jan 2010 12:14:08 +0100
+
+nvidia-graphics-drivers (190.53-0ubuntu5) lucid; urgency=low
+
+  * debian/nvidia-current.links.in
+    - Add libvdpau_nvidia.so.1 which points to libvdpau_nvidia.so.$ver
+      and make libvdpau_nvidia.so point to libvdpau_nvidia.so.1 so
+      that the library can be found at runtime (LP: #432172).
+  * debian/nvidia-current.postinst.in:
+    - Remove gl_libraries slave link as the file in ld.so.conf.d is
+      enough.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Sun, 17 Jan 2010 13:20:28 +0100
+
+nvidia-graphics-drivers (190.53-0ubuntu4) lucid; urgency=low
+
+  * debian/control.in:
+    - There's no need for the -dev package to conflict with
+      the mesa development packages any more.
+  * debian/nvidia-current.postinst.in:
+    - Do not set slaves for libglx and libdri. We don't need
+      this any more as, thanks to a change in X, xorg_extra_modules
+      will suffice.
+    - Set link to $PKG_libdir in /usr/lib/GL with alternatives.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 11 Jan 2010 15:44:30 +0100
+
+nvidia-graphics-drivers (190.53-0ubuntu3) lucid; urgency=low
+
+  * List my name among the authors instead of the copyright
+    holders.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Sat, 09 Jan 2010 14:53:51 +0100
+
+nvidia-graphics-drivers (190.53-0ubuntu2) lucid; urgency=low
+
+  * Assign copyright to Canonical Ltd instead of Canonical
+    Services Ltd in the packaging scripts and in the copyright
+    file.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Sat, 09 Jan 2010 14:22:36 +0100
+
+nvidia-graphics-drivers (190.53-0ubuntu1) lucid; urgency=low
+  * Rework packaging taking Mandriva's as a model:
+    - Use alternatives instead of diversions.
+    - Reduce the number of binary packages to nvidia-current,
+      nvidia-current-dev and nvidia-current-modaliases.
+  * debian/rules:
+    - Switch to CDBS.
+    - Remove libGL.la as no static library is provided.
+  * debian/nvidia-current.README.Debian.in:
+    - Document the update process.
+  * nvidia-current.postinst: try to build the module for the most
+    recent kernel in addition to building it for the current kernel
+    (LP: #474917).
+  * New upstream release (LP: #494166):
+   - Add support for xserver 1.7.x.
+   - Added support for the following GPUs:
+     o GeForce G102M
+     o GeForce GT 220
+     o GeForce G210
+     o GeForce G210M
+     o GeForce GT 230M
+     o GeForce GT 240M
+     o GeForce GTS 250M
+     o GeForce GTS 260M 
+   - Fixed a bug in the nvidia-settings disclaimer window for the GPU
+     Clock Frequencies Coolbits page, such that the "Accept" button is
+     selectable when the desktop is so tall that the entire disclaimer
+     can be viewed without scrolling.
+   - Fixed a recent regression that caused the Xinerama option to not
+     be set properly in the X configuration file when saving and
+     merging from the nvidia-settings X Server Display Configuration
+     page.
+   - Fixed a resource leak in VDPAU's blit-based presentation queue.
+     This bug limited the number of presentation queue objects that
+     could be created and destroyed in a single application instance,
+     and hence could limit the number of streams that could be
+     displayed and/or the number of iterations of "loop" playback.
+   - Fixed a power management regression that prevented some notebooks
+     and systems with integrated GeForce 8 and 9 series GPUs from
+     suspending.
+   - Fixed a regression that caused TV-OUT controls to be unavailable
+     on some GeForce 6 and 7 series GPUs.
+   - Updated the NVIDIA X driver to allow, on GeForce 8 or greater
+     GPUs, more modes to validate on digital display devices whose
+     EDIDs report very constrained HorizSync or VertRefresh ranges.
+   - Fixed a randomly occuring X server crash caused by the PixmapCache
+     option.
+   - Increased the allowed amount of overscan compensation from 100 to
+     200.
+   - On GPUs with VDPAU feature set B, VDPAU's handling of some
+     corrupted or incorrectly formatted H.264 and MPEG streams has
+     been improved.
+   - Fixed a memory allocation problem with pre-GeForce 8 GPUs that
+     caused GLX_EXT_texture_from_pixmap clients (e.g., Compiz, KDE 4)
+     to display incorrect contents.
+   - Modified the installation location and names of internal VDPAU
+     libraries to conform to conventions and Debian packaging guidelines.
+     New versions of libvdpau expect this layout. Compatibility with old
+     versions of libvdpau is maintained with symlinks.
+   - Fixed a bug that could cause errors in graphical applications run
+     after a previous application using VDPAU and OpenGL. This behaviour
+     was observed when running Gwenole Beauchesne's hwdecode-demos
+     application.
+   - Modified vdpau.h to increment VDPAU_VERSION, to reflect the fact that
+     new features have been added in the past. Also, add the new define
+     VDPAU_INTERFACE_VERSION.
+   - Fixed a periodic temporary hang in the VDPAU blit-based presentation
+     queue.
+   - Fixed a problem that caused resolution limitations or corruption on
+     certain DisplayPort devices such as the Apple 24" Cinema display or
+     some DisplayPort to VGA adapters.
+   - Disabled the UseEvents option for GeForce 8 series and higher GPUs
+     due to a problem that causes occasional short hangs. It will be
+     re-enabled when that bug has been tracked down and fixed.
+   - VDPAU now allows multiple streams to be decoded at once, without the
+     need to set any environment variables.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Fri, 08 Jan 2010 23:13:07 +0100
+
+nvidia-graphics-drivers-180 (185.18.36-0ubuntu9) karmic; urgency=low
+
+  * debian.binary/patches, dkms.conf.in:
+    - nvidia-rt-compat.patch: Update patch to allow the driver to
+      work with rt kernels again (LP: #413296). Thanks to Iain Bucław
+      for the patch.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Sun, 25 Oct 2009 10:25:29 +0100
+
+nvidia-graphics-drivers-180 (185.18.36-0ubuntu8) karmic; urgency=low
+
+  * debian/control, debian/control.in:
+    - Add dependency on patch to nvidia-$VER-kernel-source (LP: #453961).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 19 Oct 2009 10:49:30 +0200
+
+nvidia-graphics-drivers-180 (185.18.36-0ubuntu7) karmic; urgency=low
+
+  * debian.binary/patches, dkms.conf.in:
+    - fall_back_on_mtrr_if_no_pat.patch: Fall back on MTRRs if the
+      CPU doesn't support the PAT (LP: #391461).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 14 Oct 2009 14:30:13 +0200
+
+nvidia-graphics-drivers-180 (185.18.36-0ubuntu6) karmic; urgency=low
+
+  * debian/nvidia-185-kernel-source.postinst:
+    - There were bugs of undefined variables in the smart buildd detection
+      scripts.  These should be upstream DKMS anyway, so reference them
+      from there (LP: #450493)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Tue, 13 Oct 2009 22:24:00 -0500
+
+nvidia-graphics-drivers-180 (185.18.36-0ubuntu5) karmic; urgency=low
+
+  * debian/upstream_info:
+    - Treat lpia as i386 so as to fix FTBFS.
+  * debian/nvidia-185-kernel-source.postinst:
+    - Re-use the smart buildd detection system that we already use in the
+      bcmwl-kernel-source package so as to allow pre-compiled modules when
+      the nvidia driver is included in a customised image. The old behaviour
+      is preserved in any other case.
+  * debian/control, debian/control.in, debian.binary/control.template:
+    - Set arch to lpia for every package.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 12 Oct 2009 12:51:29 +0200
+
+nvidia-graphics-drivers-180 (185.18.36-0ubuntu4) karmic; urgency=low
+
+  [ Alberto Milone ]
+  * debian/control, debian/control.in:
+    - Change the section of the -modaliases package to "admin" as the package
+      is not "restricted" (LP: #429153).
+    - Add the lpia architecture to the -185 packages.
+
+  [ Kees Cook ]
+  * debian/control.in:
+    - Add build dependency on execstack.
+  * debian/rules:
+    - Drop executable stack markings from precompiled binaries (LP: #409456).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 08 Oct 2009 16:42:13 +0200
+
+nvidia-graphics-drivers-180 (185.18.36-0ubuntu3) karmic; urgency=low
+
+  * Re-introduce a patch to allow the NVIDIA drivers to build against the RT
+    kernel (LP: #413296
+
+ -- Luke Yelavich <themuso@ubuntu.com>  Sat, 26 Sep 2009 22:10:10 +1000
+
+nvidia-graphics-drivers-180 (185.18.36-0ubuntu2) karmic; urgency=low
+
+  * debian/control.in:
+    - Attempt to clean up the provides/conflicts/replaces to only have
+      currently valid package names (for Karmic) to avoid confusion.
+    - For the transitional packages, don't conflict, so that they should
+      be installable. (LP: #418681)
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Fri, 28 Aug 2009 01:11:58 -0500
+
+nvidia-graphics-drivers-180 (185.18.36-0ubuntu1) karmic; urgency=low
+
+  * New upstream release (LP: #408561)
+    - Fixed a bug that caused kernel panics when starting X on some mobile GPUs
+    - Fixed an interaction problem between VDPAU and PowerMizer when using
+      VDPAU solely as a display mechanism, and not to decode video streams. The 
+      GPU performance level should now be raised, if required, in this scenario.
+    - Fixed VDPAU to avoid "display preemption" in some cases where a 
+      VdpOutputSurface is deleted while it is still active (either queued or
+      visible) in a VdpPresentationQueue. In particular, this can occur in 
+      MPlayer when using the "-fs" option, and could completely prevent VDPAU 
+      from operating successfully, depending on the exact timing conditions.
+  * debian/nvidia-glx-185.preinst:
+     - Update to print-architecture rather than print-installation-architecture
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Sun, 23 Aug 2009 11:38:08 -0500
+
+nvidia-graphics-drivers-180 (185.18.31-0ubuntu1) karmic; urgency=low
+
+  * Rename package as -185 and make -180 a transitional package.
+  * Drop drm_agp_memory-2.6.31.patch as the module builds with 2.6.31
+    kernels now.
+  * New upstream release:
+    -Fixed a crash on certain mobile GPUs.
+    -Added code to forcibly terminate long-running CUDA kernels when Ctrl-C
+     is pressed.
+    -Fixed a bug that could cause occasional memory corruption problems or
+     segmentation faults when running OpenGL applications on Quadro GPUs.
+    -Fixed a deadlock in the OpenGL library that could be triggered in certain
+     rare circumstances on Quadro GPUs.
+    -Fixed an interaction problem between PowerMizer and CUDA applications 
+     that caused the performance level to be reduced while the CUDA kernel is
+     running.
+    -Made CUDA compute-exclusive mode persistent across GPU resets.
+    -Fixed the order of outputs in the GPUScaling nvidia-settings property.
+    -Fixed a bug that caused graphics corruption in some OpenGL applications
+     when the Unified Back Buffer is enabled the application window is moved.
+    -Fixed a bug that caused glXGetVideoSyncSGI, glXWaitVideoSyncSGI, and 
+     glXGetRefreshRateSGI to operate on the wrong screen when there are 
+     multiple X screens.
+    -Fixed a bug that causes corruption or GPU errors when an application 
+     paints a redirected window whose background is set to ParentRelative on
+     X.Org servers older than 1.5. This was typically triggered by running
+     Kopete while using Compiz or Beryl.
+    -Fixed a bug in VDPAU that could cause visible corruption when decoding
+     H.264 clips with alternating frame/field coded reference pictures, and a
+     video surface is concurrently removed from the DPB, and re-used as the 
+     decode target, in a single decode operation. This affected all GPUs 
+     supported by VDPAU.
+    -Fixed a bug in VDPAU that could cause visible corruption near the bottom
+     edge of the picture when decoding VC-1 advanced profile clips whose 
+     heights are not exact multiples of 16 pixels, on G98 and MCP7x (IGP) GPUs.
+    -Enhanced VDPAU to better handle corrupt/invalid H.264 bitstreams on G84,
+     G86, G92, G94, G96, or GT200 GPUs. This should prevent most cases of 
+     "display preemption" that are caused by bitstream errors.
+    -Fixed an X server crash when using the VDPAU overlay-based presentation 
+     queue and VT-switching away from the X server.
+    -Enhanced VDPAU's detection of the GPU's video decode capabilities.
+    -Fixed a bug in VDPAU that could cause ghosting/flashing issues when 
+     decoding H.264 clips, in certain full DPB scenarios, on G98 and MCP7x.
+    -Fixed VDPAU to detect an attempt to destroy the VdpDevice object when 
+     other device-owned objects still exist. VDPAU now triggers 
+     "display preemption", and returns an error, when this occurs.
+    -Enhanced VDPAU's error handling and resource management in presentation
+     queue creation and operation. This change correctly propagates all errors
+     back to the client application, and avoids some resource leaks.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Fri, 07 Aug 2009 15:45:14 +0200
+
+nvidia-graphics-drivers-180 (185.18.14-0ubuntu3) karmic; urgency=low
+
+  * nvidia-rt-compat.patch: Dropped, the driver builds fine against the
+    2.6.29.5 realtime kernel without it.
+
+ -- Luke Yelavich <themuso@ubuntu.com>  Tue, 07 Jul 2009 19:20:57 +1000
+
+nvidia-graphics-drivers-180 (185.18.14-0ubuntu2) karmic; urgency=low
+
+  * Add in drm_agp_memory-2.6.31.patch to enable 2.6.31 support
+    until NVIDIA has it in their next driver release. (LP: #394262)
+    - Thanks everyone in that bug for finding and testing this patch.
+    - Note: this patch appears to be a bit of a hack (removing i2c support)
+      so take it with a grain of salt if there are still problems.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Thu, 02 Jul 2009 12:30:34 -0500
+
+nvidia-graphics-drivers-180 (185.18.14-0ubuntu1) karmic; urgency=low
+
+  * New upstream release (LP: #376067):
+    - Fixed a Xinerama drawable resource management problem that can 
+      cause GLXBadDrawable errors in certain cases, such as when Wine
+      applications are run.
+      (LP: #344721)
+    - Fixed XineramaQueryScreens to return 0 screens instead of 1 
+      screen with the geometry of screen 0 when XineramaIsActive 
+      returns false. This conforms to the Xinerama manual page and 
+      fixes an interaction problem with Compiz when there is more 
+      than one X screen.
+    - Moved kernel module loading earlier in the X driver's 
+      initialization, to facilitate more graceful fallbacks if the 
+      kernel module cannot be loaded. Removed the LoadKernelModule X 
+      configuration option.
+    - Added support for new horizontal interlaced and checkerboard 
+      passive stereo modes.
+    - Fixed an OpenGL driver crash while running Bibble 5.
+    - Fixed a DisplayPort interaction problem with power management 
+      suspend/resume events.
+    - Fixed occasional X driver memory management performance 
+      problems when a composite manager is running.
+      (LP: 294925)
+    - Fixed a bug with VT-switching or mode-switching while using 
+      Compiz; the bug could lead to a corrupted desktop (e.g., a 
+      white screen) or in the worst case an X server crash.
+    - Fixed a bug that could cause GPU errors in some cases while 
+      driving Quadro SDI products.
+    - Fixed a several second hang when VT-switching while OpenGL 
+      stereo applications were running on pre-G80 Quadro GPUs.
+    - Added support for multiple swap group members on G80 and later 
+      Quadro GPUs.
+    - Fixed the behavior of the NV_CTRL_FRAMELOCK_SYNC_DELAY 
+      NV-CONTROL attribute on Quadro G-Sync II.
+    - Fixed a problem with Quadro SDI where transitioning from 
+      "clone mode" to "OpenGL mode" would fail.
+    - Fixed VDPAU to eliminate some cases of corruption when decoding 
+      H.264 video containing field-coded reference frames on G84, G86, 
+      G92, G94, G96, or GT200 GPUs. Such streams are commonly found in 
+      DVB broadcasts.
+    - Slightly improved the performance of the VDPAU noise reduction 
+      algorithm.
+    - Enhanced VDPAU to validate whether overlay usage is supported by 
+      the current hardware configuration, and to automatically fall 
+      back to the blit-based presentation queue if required.
+    - Fixed error checking in VdpVideoMixerRender, to reject calls 
+      that specify more layers than the VdpMixer was created with.
+    - Modified VDPAU's VDPAU_DEBUG code to emit a complete backtrace 
+      on all platforms, not just on 32-bit Linux.
+    - Improved interaction between VDPAU and PowerMizer; appropriate 
+      performance levels should now be chosen for video playback of all 
+      standard resolutions on all supported GPUs.
+    - Fixed a bug in VDPAU that sometimes caused "display preemption" 
+      when the VdpDecoderCreate function failed.
+    - Fixed a potential segfault in the VDPAU trace library, triggered 
+      by a multi-threaded application creating a new VdpDevice in one 
+      thread, at the same time that another thread detected "display 
+      preemption".
+    - Improved compatibility with recent Linux kernels.
+    - OpenOffice and Skype no longer have flickering buttons on mouseover
+      when compiz is enabled. (LP: #286932)
+    - smplayer and VirtualBox no longer display video corruption with
+      composite (LP: #364764)
+
+ -- Bryce Harrington <bryce@ubuntu.com>  Fri, 26 Jun 2009 22:35:09 -0700
+
+nvidia-graphics-drivers-180 (180.53-0ubuntu1) jaunty-proposed; urgency=low
+
+  * New upstream release (LP: #364965)
+    - Added support for the following GPUs:
+      o GeForce 9600 GSO 512
+      o GeForce 9400 GT
+      o GeForce GTS 250
+      o GeForce GT 130
+      o GeForce GT 140
+    - Updated nvidia-bug-report.sh to compress its log file; running 
+      `nvidia-bug-report.sh` now produces "nvidia-bug-report.log.gz".
+    - Addressed a problem that could lead to intermittent hangs and system
+      crashes on some GeForce 9 and later GPUs.
+    - Fixed an X server crash when viewing the website www.tim.it.
+    - Fixed a DisplayPort interaction problem with power management 
+      suspend/resume events.
+    - Fixed rendering corruption in the OpenGL 16-bit RGB Workstation 
+      Overlay.
+    - Fixed a recent VDPAU regression that caused aborted playback and hangs
+      when decoding some H.264 clips on G84, G86, G92, G94, G96, and GT200 GPUs.
+    - Fixed an interaction problem that could corrupt the EDID of the Fujitsu
+      Technology Solutions Celsius H270 notebook's internal flatpanel.
+    - Fixed occasional X driver memory management performance problems when a
+      composite manager is running.
+    - Fixed a bug that could interfere with the detection of display devices
+      attached to secondary GPUs when first starting X after cold boots.
+    - Fixed a problem that could result in temporary stalls when moving OpenGL
+      application windows on GeForce 8 and later GPUs.
+    - Fixed a bug that prevented VGA fonts from being saved/restored correctly
+      on GeForce 8 and later GPUs.
+    - Improved compatibility with recent Linux kernels.
+    - Reduced CPU usage of nvidia-smi utility for reporting Quadro Plex information.
+    - Fixed compatibility problem with LandMark GeoProbe.
+    - Fixed stability problems with some GeForce 6200/7200/7300 GPUs on 
+      multi-core/SMP systems (LP: #353502).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Fri, 24 Apr 2009 14:17:09 +0200
+
+nvidia-graphics-drivers-180 (180.44-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release (LP: #348852).
+    - Added support for the following GPUs:
+      o Quadro FX 3800
+      o Quadro FX 1800
+      o Quadro FX 580
+      o Quadro FX 380
+      o Quadro NVS 295
+      o GeForce GT 120
+      o GeForce G100
+    - Fixed a problem that could cause Xid errors and display corruption
+      in certain cases when OpenGL is used to render to redirected windows,
+      for example when Java2D is used with the -Dsun.java2d.opengl=true option.
+    - Updated glGetStringi(GL_EXTENSIONS, i) to no longer return NULL in 
+      OpenGL 3.0 preview contexts.
+    - Fixed OpenGL crashes while running KDE4's Plasma.
+    - Fixed OpenGL crashes when using a large number of texture objects.
+    - Fixed the timestamp reporting in the GL_NV_present_video extension
+      on SDI II with Quadro FX 4800 and 5800.
+    - Improved power management support on some systems, such as 
+      Hewlett-Packard xw4600 workstations.
+    - Fixed a problem that caused the screen to flicker momentarily when
+      OpenGL applications exit unexpectedly on GeForce 6 and 7 series GPUs.
+    - Fixed an X server crash when an X client attempts to draw trapezoids
+      and RenderAccel is disabled.
+    - Improved recovery from certain types of errors.
+    - Fixed a bug that caused Autodesk Maya to freeze when overlays are 
+      enabled.
+    - Fixed an interaction problem between OpenGL and memory tracking
+      libraries such as MicroQuill SmartHeap.
+    - Added support for RG renderbuffers in OpenGL 3.0.
+    - Added support for OpenGL 3.0 floating-point depth buffers.
+    - Fixed a problem that caused Valgrind to crash when tracing a program
+      that uses OpenGL.
+    - Updated VDPAU to support VC-1/WMV acceleration on all GPUs supported
+      by VDPAU; see the README for details.
+    - Fixed VDPAU corruption on some H.264 clips.
+    - Updated VDPAU documentation in the README and in vdpau.h, in 
+      particular regarding how to use the deinterlacing algorithms in the
+      VdpVideoMixer object. Explicitly documented "half rate" deinterlacing,
+      which should allow the advanced algorithms to run on more low-end
+      systems.
+    - Implemented a "skip chroma deinterlace" option in VDPAU, which should
+      allow the advanced deinterlacing algorithms to run on more low-end
+      systems. See vdpau.h.
+    - Fixed VDPAU VC-1 decoding on 64-bit platforms.
+    - Updated the VDPAU wrapper library to print dlerror() messages when
+      driver loading problems occur.
+    - Improved VDPAU's handling of some corrupt H.264 streams, and some
+      corrupt/invalid MPEG streams on some GPUs.
+    - Fixed VDPAU to correctly handle WMV "range reduction" on some GPUs.
+      A minor backwards-compatible API change was made for this; see
+      vdpau.h's documentation for structure field VdpPictureInfoVC1.rangered.
+    - Fixed a problem that caused surfaces to be marked as visible too early
+      when the blit presentation queue is in use.
+    - Fixed VDPAU to prevent some cases of "display preemption" in the face
+      of missing H.264 reference frames on some GPUs.
+    - Fixed corruption decoding H.264 clips with pictures where 
+      pic_order_cnt_type implies log2_max_pic_order_cnt_lsb_minus4 is not
+      used, on G84, G86, G92, G94, G96, GT200 GPUs.
+    - Update vdpau.h to document exact requirements for VdpDecoderRender
+      bitstream data content.
+    - Fix VDPAU error handling in some unusual low memory situations.
+    - Fix hang in VDPAU in some cases of output mode timing changes.
+  * debian/nvidia-glx-$VER-preinst:
+    - Look for diversions in a more accurate way with grep.
+  * debian/nvidia-glx-$VER-dev.preinst.in:
+    - Make sure that diversions on /usr/lib/libGL.so are only removed
+      and not added (LP: #335621).
+  * debian/nvidia-glx-$VER-dev.links.in:
+    - Do not create a symlink to /usr/lib/libGL.so.#VERSION# in
+      /usr/lib/libGL.so
+  * debian/nvidia-glx-$VER.postrm.in, debian/nvidia-glx-$VER-dev.postrm.in:
+    - pass --ignore-fail-on-non-empty to rmdir 
+  * debian/nvidia-glx-$VER-dev.preinst.in:
+    - If /usr/lib/libGL.so is a symlink and already exists then do not 
+      create a new one, otherwise create a symlink to /usr/lib/libGL.so.$PKGVER
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 31 Mar 2009 09:23:32 +0200
+
+nvidia-graphics-drivers-180 (180.37-0ubuntu2) jaunty; urgency=low
+
+  * Make nvidia-180-libvdpau-dev Architecture: i386 amd64 rather than all.
+    Although it's technically architecture-independent, it's tiny (so
+    archive space waste is minimal) and it's only installable on those two
+    architectures.
+  * Add a binary-indep target (empty), per policy.
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Fri, 20 Mar 2009 16:34:59 +0000
+
+nvidia-graphics-drivers-180 (180.37-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release (LP: #335879).
+    - Fixed a problem that caused signals to be blocked in some applications.
+    - Fixed a problem that could cause Xid errors and display corruption in 
+      certain cases when OpenGL is used to render to redirected windows, for
+      example when Java2D is used with the -Dsun.java2d.opengl=true option.
+    - glGetStringi(GL_EXTENSIONS, i) no longer returns NULL in OpenGL 3.0 
+      preview contexts.
+    - Fixed a problem that caused the screen to flicker momentarily when
+      OpenGL applications exit unexpectedly on GeForce 6 and 7 series GPUs.
+    - Fixed an X server crash when an X client attempts to draw trapezoids
+      and RenderAccel is disabled.
+    - Improved recovery from certain types of errors.
+    - VDPAU updates:
+      o Fixed corruption on some H.264 clips.
+      o Update documentation.
+      o Fixed VC-1 decoding on 64-bit platforms.
+      o Improved handling of invalid H.264 streams.
+      o Fixed a problem that caused surfaces to be marked as visible too
+        early when the blit presentation queue is in use.
+  * nvidia-glx-VER.preinst:
+    - Remove diversion on /usr/lib32/libGL.so.1.2 to
+      /usr/lib32/nvidia/libGL.so.1.2.xlibmesa instead of
+      /usr/lib32/nvidia/libGL.so.1.2.xserver-xorg-core (LP: #333550).
+  * debian.binary/patches/nvidia-rt-compat.patch:
+    - Restore compatibility with -rt kernels. Thanks to Alessio Igor Bogani
+      for the patch.
+  * debian/dkms.conf.in:
+    - Make sure that the patch for -rt kernels is applied only to 2.6.28.x
+      kernels.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Fri, 13 Mar 2009 09:27:20 +0100
+
+nvidia-graphics-drivers-180 (180.35-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release (LP: #334205).
+    * Added support for the following GPUs:
+      o GeForce GT 120
+      o GeForce G100
+      o Quadro FX 3700M
+    * Fixed a bug that caused Maya to freeze when overlays are enabled.
+    * Fixed an interaction problem with some applications that use memory tracking
+      libraries.
+    * Added support for RG renderbuffers in OpenGL 3.0.
+    * Added support for OpenGL 3.0 floating-point depth buffers.
+    * Fixed a problem that caused Valgrind to crash when tracing a program that 
+      uses OpenGL.
+    * VDPAU updates:
+      o VDPAU now supports VC-1/WMV acceleration on all GPUs supported by VDPAU;
+        see the README for details.
+      o Expand the documentation of VDPAU's VdpVideoMixer, in particular regarding
+        how to use the deinterlacing algorithms. Explicitly document "half rate" 
+        deinterlacing, which should allow the advanced algorithms to run on more 
+        low-end systems. See vdpau.h.
+      o Implement a "skip chroma deinterlace" option in VDPAU, which should allow
+        the advanced deinterlacing algorithms to run on more low-end systems. See
+        vdpau.h.
+      o Enhance VDPAU to correctly handle some forms of corrupt/invalid MPEG 
+        streams on some GPUs.
+      o Fix VDPAU to prevent some cases of "display preemption" in the face of 
+        missing H.264 reference frames on some GPUs.
+      o Fix VDPAU to correctly handle VC-1 skipped pictures with missing start 
+        codes on some GPUs.
+      o Fix VDPAU to correctly handle WMV "range reduction" on some GPUs. A minor
+        backwards-compatible API change was made for this; see vdpau.h's 
+        documentation for structure field VdpPictureInfoVC1.rangered.
+      o Fix VDPAU wrapper library to print dlerror() messages when problems occur,
+        which will simplify debugging of driver loading issues.
+
+
+ -- Alberto Milone (tseliot) <albertomilone@alice.it>  Wed, 25 Feb 2009 11:49:59 +0100
+
+nvidia-graphics-drivers-180 (180.29-0ubuntu2) jaunty; urgency=low
+
+  * debian/control.in:
+    - Revert change adding dependency to nvidia-glx-180 on nvidia-180-libvdpau.
+      This would cause any package that built against nvidia-180-libvpdau to
+      depend and build depend on nvidia-glx-180.
+    - Add replaces to nvidia-glx-177 instead.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 11 Feb 2009 11:53:50 -0600
+
+nvidia-graphics-drivers-180 (180.29-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release (LP: #327690).
+    * Fixed a problem in VDPAU that prevented the overlay-based presentation
+      queue from being used on displays connected by component video.
+    * Fixed various problems in VDPAU that caused visual corruption when
+      decoding certain MPEG-2 video streams.
+    * Fixed a crash in VDPAU caused by certain invalid MPEG-2 streams, in
+      64-bit drivers for some GPUs.
+    * Fixed an X driver performance problem on integrated GPUs.
+    * Fixed a stability problem with OpenGL applications using FSAA.
+    * Fixed an initialization problem that caused some AGP GPUs to be used
+      in PCI compatibility mode.
+    * Fixed a bug that could result in stability problems after changing
+      clock settings via the Coolbits interface.
+    * debian/control.in: add dependency on nvidia-glx-180 to nvidia-180-libvdpau
+      since nvidia-180-libvdpau can't be installed if other nvidia-glx-* packages
+      contain vdpau (LP: #326720).
+
+ -- Alberto Milone (tseliot) <albertomilone@alice.it>  Wed, 11 Feb 2009 11:29:09 +0100
+
+nvidia-graphics-drivers-180 (180.27-0ubuntu1) jaunty; urgency=low
+
+  * New upstream release. Supports the new X.org ABI (LP: #308410, #322416)
+    * Added support for the following GPUs:
+       o GeForce GTX 295
+       o GeForce GTX 285
+       o GeForce 9300 GE
+       o Quadro NVS 420
+    * Fixed a bug that caused VDPAU to display a green screen when using the
+      overlay-based presentation queue with interlaced modes.
+    * Fixed a bug that prevented VDPAU from working correctly after X server 
+      restarts on some GPUs.
+    * Improved VDPAU's handling of mode switches; eliminated a crash in its 
+      mode switch recovery code and a hang in the blit-based presentation queue.
+    * Fixed a bug that caused VDPAU to crash when using DisplayPort devices.
+    * Fixed a potential hang in VDPAU when using the blit-based presentation 
+      queue on systems with multiple GPUs not in SLI mode.
+    * Implemented missing error checking of layer data in VDPAU's VdpVideoMixerRender
+      function.
+    * Improved VDPAU's handling of setups with multiple GPUs, if a subset of the
+      GPUs cannot be supported due to resource limitations.
+    * Improved GPU video memory management coordination between the NVIDIA X driver 
+      and VDPAU.
+    * Fix potential hang in VDPAU when the overlay is already in use.
+    * Improved workstation OpenGL performance.
+    * Fixed an X driver acceleration bug that resulted in Xid errors on GeForce 6 and
+      7 series GPUs.
+    * Updated the X driver to consider GPUs it does not recognize supported, allowing
+      it to drive some GPUs it previously ignored.
+    * Added the ability to run distribution provided pre- and post- installation hooks
+      to 'nvidia-installer'; please see the 'nvidia-installer' manual page for details.
+    * Updated the X driver's metamode parser to allow mode names with periods (i.e. '.'s).
+    * Fixed a problem with hotkey switching on some recent mobile GPUs.
+    * worked around a power management regression in and improved compatibility with
+      recent Linux 2.6 kernels.
+    * Added support for OpenGL 3.0 for GeForce 8 series and newer GPUs.
+  * debian/nvidia-glx-180.preinst:
+    - Correct typo in the removal of diversions of /usr/lib/xorg/modules/extensions/libglx.so
+  * debian/nvidia-glx-180.postrm.in
+    - Do not remove libGL.so (LP: #309116)
+  * debian/nvidia-glx-180-dev.preinst.in:
+    - Add diversion on /usr/lib/libGL.so since (the postrm tries to remove it already)
+  * debian/scriptremove.sh:
+    - Remove from source.
+
+ -- Alberto Milone (tseliot) <albertomilone@alice.it>  Thu, 29 Jan 2009 12:36:09 +0100
+
+nvidia-graphics-drivers-180 (180.22-0ubuntu2) jaunty; urgency=low
+
+  * debian/control.in:
+    - Replaces for both the VDPAU binary packages over the old
+      NV packaging. (LP: #315632)
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Fri, 09 Jan 2009 17:24:15 -0600
+
+nvidia-graphics-drivers-180 (180.22-0ubuntu1) jaunty; urgency=low
+
+  * New upstream version.  First "stable" driver in 180 series. (LP: #315169)
+    *  Added support for the following GPUs:
+          o Quadro FX 2700M
+          o GeForce 9400M G
+          o GeForce 9400M
+          o GeForce 9800 GT
+          o GeForce 8200M G
+          o GeForce Go 7700
+          o GeForce 9800M GTX
+          o GeForce 9800M GT
+          o GeForce 9800M GS
+          o GeForce 9500 GT
+          o GeForce 9700M GT
+          o GeForce 9650M GT
+          o GeForce 9500 GT
+    * Added initial support for PureVideo-like features via the new VDPAU API (see the vdpau.h header file installed with the driver).
+    * Added support for CUDA 2.1.
+    * Added preliminary support for OpenGL 3.0.
+    * Added new OpenGL workstation performance optimizations.
+    * Enabled the glyph cache by default and extended its support to all supported GPUs.
+    * Disabled shared memory X pixmaps by default; see the "AllowSHMPixmaps" option.
+    * Improved X pixmap placement on GeForce 8 series and later GPUs.
+    * Improved stability on some GeForce 8 series and newer GPUs.
+    * Fixed a regression that could result in window decoration corruption when running Compiz using Geforce 6 and 7 series GPUs. (LP: #306605)
+    * Fixed an nvidia-settings crash when xorg.conf contains Device and Screen sections but no ServerLayout section.
+    * Fixed a problem parsing the monitor sync range X config file options.
+    * Fixed a problem with the SDI sync skew controls in nvidia-settings.
+    * Fixed a problem that caused some SDI applications to hang or crash.
+    * Added support for SDI full-range color. (LP: #218736)
+    * Improved compatibility with recent Linux kernels.
+  * debian/rules:
+    - Create patches directory in case it wasn't present in orig.tar.gz
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Thu, 08 Jan 2009 14:26:09 -0600
+
+nvidia-graphics-drivers-180 (180.18-0ubuntu2) jaunty; urgency=low
+
+  * debian/control:
+    - Add versioned dependency for libvdpau.
+
+ -- Mario Limonciello <superm1@ubuntu.com>  Wed, 07 Jan 2009 18:59:22 -0600
+
+nvidia-graphics-drivers-180 (180.18-0ubuntu1) jaunty; urgency=low
+
+  [ Thomas Cheutz ]
+  * Add driver 180.18 (LP: #307791)
+   * Fixed an X server hang rendering very large fonts.
+   * Added a check to nvidia-installer to not consider Compiz's libglx.so
+     a conflicting X extension library.
+   * VDPAU updates:
+    o Relaxed restrictions on the number of H.264 references frames.
+    o Fixed corruption problems in some video bitstreams.
+    o Fixed a problem that prevented the presentation queue from working in some
+      multi-display or multi-screen configurations when using overlay based presentation.
+
+  [ Alexey Borzenkov ]
+  * Fix false positive when generating modaliases
+
+  [ Mario Limonciello ]
+  * debian/control:
+    - Introduce nvidia-180-libvdpau and nvidia-180-libvdpau-dev packages so that
+      applications will be able to build depend and depend on libvdpau without needing
+      to depend on nvidia driver itself.
+  * debian/rules:
+    - Install VDPAU headers and libraries into appropriate packages.
+    - Don't run debhelper commands with -s as arch independent packages are ignored.
+
+ -- Mario Limonciello <mario_limonciello@dell.com>  Wed, 07 Jan 2009 12:58:13 -0600
+
+nvidia-graphics-drivers-180 (180.11-0ubuntu1) jaunty; urgency=low
+
+  * Add driver 180.11:
+    *  Added support for the following new GPUs:
+       o GeForce 9400M
+    * Fixed font corruption on GeForce 6 and 7 series GPUs when the GlyphCache setting
+      is enabled.
+    * Fixed a memory leak problem when the GlyphCache setting is enabled.
+    * Added support for GVO full-range color.
+    * Fixed a problem parsing the monitor sync range X config file options.
+    * Improved VDPAU error detection and reporting.
+    * Improved VDPAU support for some video bitstreams.
+
+ -- Alberto Milone (tseliot) <albertomilone@alice.it>  Wed, 03 Dec 2008 11:07:30 +0100
+
+nvidia-graphics-drivers-180 (180.08-0ubuntu1) jaunty; urgency=low
+
+  * Add driver 180.08 (LP: #297543):
+    *  Added support for the following new GPUs:
+       o Quadro NVS 450
+       o Quadro FX 370 LP
+       o Quadro FX 5800
+       o Quadro FX 4800
+       o Quadro FX 470
+       o Quadro CX
+    * Added preliminary support for OpenGL 3.0.
+    * Improved VDPAU error recovery on some GPUs.
+    * Added support for CUDA 2.1.
+    * Added initial support for PureVideo-like features on Linux via the new VDPAU API
+      (see the vdpau.h header file installed with the driver).
+    * Added new workstation performance optimizations.
+    * Enabled the X Render "GlyphCache" by default.
+    * Disabled shared memory X pixmaps by default; see the “AllowSHMPixmaps" option.
+    * Fixed a regression that could result in window decoration corruption when running
+      Compiz using Geforce 6 and 7 series GPUs.
+    * Improved X pixmap placement on GeForce 8 series and later GPUs.
+    * Improved compatibility with recent Linux kernels.
+    * Improved stability on some GeForce 8 series and newer GPUs.
+  * Add diversions on /usr/lib/libGL.so.1, /usr/lib/libGL.so.1.2,
+    /usr/lib/xorg/modules/extensions/libglx.so without checking their existence in
+    Ubuntu 32 bit too (LP: #287470)
+  * Remove quotation marks from the SOURCES varialble in
+    nvidia-VER-kernel-source.postinst
+  * Switch to DKMS patching system (in debian/rules) so as to have different
+    patches for different kernel versions
+
+ -- Alberto Milone (tseliot) <albertomilone@alice.it>  Sun, 30 Nov 2008 16:34:22 +0100
+
+
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.postinst
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.postinst
@@ -0,0 +1,168 @@
+#!/bin/sh
+# Copyright (C) 2007-2008 Mario Limonciello
+# Copyright (C) 2009 Canonical Ltd
+# Authors: Alberto Milone
+set -e
+
+PACKAGE_NAME=nvidia-current
+CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
+
+ARCH=`dpkg --print-architecture`
+case $ARCH in
+    amd64)
+        ARCH="x86_64"
+        ;;
+    lpia)
+        ARCH="i686"
+        ;;
+    i386)
+        ARCH="i686"
+        ;;
+    *)
+        echo "WARNING: unsupported arch: $ARCH"
+        ARCH="$ARCH"
+        ;;
+esac
+
+# 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
+}
+
+case "$1" in
+    configure)
+        # Deal with alternatives
+
+        # Deal with multi-arch ugliness until dpkg supports multi-arch:
+        # - On amd64 we need to install an additional slave link for 32bit vdpau
+        #   which - obviously - doesn't exist on i386
+        # - It is fine if we get the following:
+        #   +  warning: skip creation of /usr/lib32/vdpau/libvdpau_nvidia.so.1 because associated
+        #   +  file /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.1 (of link group gl_conf) doesn't exist.
+        #
+        update-alternatives --force \
+            --install /etc/ld.so.conf.d/GL.conf gl_conf /usr/lib/nvidia-current/ld.so.conf 9700 \
+            --slave /usr/share/man/man1/nvidia-xconfig.1.gz man_nvidiaxconfig.gz /usr/share/man/man1/alt-nvidia-current-xconfig.1.gz \
+            --slave /usr/share/man/man1/nvidia-smi.1.gz nvidia-smi.1.gz /usr/share/man/man1/alt-nvidia-current-smi.1.gz \
+            --slave /usr/share/applications/ubuntu-nvidia-settings.desktop nvidia_desktop /usr/share/nvidia-current/ubuntu-nvidia-settings.desktop \
+            --slave /usr/bin/nvidia-smi nvidia_smi /usr/lib/nvidia-current/bin/nvidia-smi \
+            --slave /usr/bin/nvidia-xconfig nvidia_xconfig /usr/lib/nvidia-current/bin/nvidia-xconfig \
+            --slave /usr/bin/nvidia-bug-report.sh nvidia_bug_report /usr/lib/nvidia-current/bin/nvidia-bug-report.sh \
+            --slave /usr/lib/XvMCConfig xvmcconfig /usr/lib/nvidia-current/XvMCConfig \
+            --slave /etc/xdg/autostart/nvidia-autostart.desktop nvidia-autostart.desktop /usr/share/nvidia-current/nvidia-autostart.desktop \
+            --slave /usr/lib/xorg/modules/drivers/nvidia_drv.so nvidia_drv /usr/lib/nvidia-current/xorg/nvidia_drv.so \
+            --slave /etc/modprobe.d/nvidia-graphics-drivers.conf nvidia_modconf /lib/nvidia-current/modprobe.conf \
+            --slave /usr/lib/xorg/extra-modules xorg_extra_modules /usr/lib/nvidia-current/xorg \
+            --slave /usr/lib/vdpau/libvdpau_nvidia.so.1 libvdpau_nvidia.so.1 /usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so.1 \
+            --slave /usr/lib/libvdpau_nvidia.so libvdpau_nvidia.so /usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so \
+            --slave /usr/lib32/vdpau/libvdpau_nvidia.so.1 libvdpau_nvidia.so.1_lib32 /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.1 \
+            --slave /usr/lib32/libvdpau_nvidia.so libvdpau_nvidia.so_lib32 /usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so
+
+        # 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/nvidia-current/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
+
+        # Build the kernel module
+        /usr/lib/dkms/common.postinst $PACKAGE_NAME $CVERSION /usr/share/$PACKAGE_NAME $ARCH $2
+        exit $?
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+            echo "postinst called with unknown argument \`$1'" >&2
+            exit 1
+    ;;
+esac
+
+#DEBHELPER#
--- nvidia-graphics-drivers-195.36.24.orig/debian/nvidia-current.README.Debian.in
+++ nvidia-graphics-drivers-195.36.24/debian/nvidia-current.README.Debian.in
@@ -0,0 +1,85 @@
+NVIDIA video drivers for Ubuntu
+============================
+
+Further information can be found at http://www.nvidia.com/ -- look for
+the "Download Drivers" tab and follow links to the Linux drivers.
+
+This package is generated from the official NVIDIA 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.
+
+Kernel patches
+-------------------------
+   If you need to provide a kernel patch (say for a kernel not formally
+   supported yet by NVIDIA), you can add this patch in the
+   debian/dkms/patches directory and mention the patch in the
+   debian/dkms.conf.in file.
+
+   It is usually a good idea to restrict the use of a patch to certain
+   kernel versions with the PATCH_MATCH[n] variable.
+
+   See the DKMS man page for more information.
+
+32 bit libraries on 64 bit systems
+-------------------------
+   32 bit libraries are provided on 64 bit systems for compatibility
+   reasons.
+   
+   The following templates are merged together into the same file on
+   amd64:
+   debian/nvidia-current.links32.in
+   debian/nvidia-current.links.in
+
+   $ld_so_conf_path lets the system know where it should look for 32
+   bit libraries.
+
+Update procedure
+-------------------------
+When a new NVIDIA is available, do the following to update
+#DRIVERNAME#:
+
+0.  On your build system, make sure you have the prerequisites
+    installed:
+
+    $ sudo apt-get build-dep #DRIVERNAME#
+
+1.  Download the NVIDIA installers i.e. the .run files.
+
+2.  dch -i to update the version in the debian/changelog so that it
+    matches the new upstream version.
+
+    Also make sure that the changelog includes both the changes you
+    made (if any) to the files in debian/ changes and the changes from
+    upstream (i.e. NVIDIA) which you can find in the release notes of
+    the driver.
+
+3.  debclean to regenerate most of the files in debian/ from their
+    templates.
+
+4.  Temporarily move the debian/ directory out of the source directory
+    and compress it as $SOURCE_NAME _ $NEW_VERSION . orig . tar . gz
+    e.g. #DRIVERSRCNAME#_#VERSION#.orig.tar.gz
+
+5.  Move the debian/ directory back to the source directory and type
+    debuild -S -sa 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
+
+
+IMPORTANT NOTE: If any changes to files in debian/ are needed, make sure
+to discuss your changes with the maintainer (Alberto aka tseliot) before
+you upload.
+
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 21 Dec 2009 12:36:15 +0100
--- nvidia-graphics-drivers-195.36.24.orig/debian/dkms/patches/nvidia-rt-compat.patch
+++ nvidia-graphics-drivers-195.36.24/debian/dkms/patches/nvidia-rt-compat.patch
@@ -0,0 +1,133 @@
+diff -Nurp nv.orig/os-interface.c nv/os-interface.c
+--- nv.orig/os-interface.c	2009-08-15 02:58:45.000000000 +0200
++++ nv/os-interface.c	2009-10-25 11:38:18.366928071 +0100
+@@ -88,7 +88,7 @@ typedef struct os_sema_s
+     nv_stack_t        *sp;
+     struct completion  completion;
+ #if defined(CONFIG_PREEMPT_RT)
+-    raw_spinlock_t     lock;
++    atomic_spinlock_t     lock;
+ #else
+     spinlock_t         lock;
+ #endif
+@@ -127,7 +127,11 @@ RM_STATUS NV_API_CALL os_alloc_sema
+     os_sema = (os_sema_t *)*ppSema;
+     os_sema->sp = sp;
+     init_completion(&os_sema->completion);
++#if defined(CONFIG_PREEMPT_RT)
++    atomic_spin_lock_init(&os_sema->lock);
++#else
+     spin_lock_init(&os_sema->lock);
++#endif
+     os_sema->count = 1;
+ 
+     return RM_OK;
+@@ -171,18 +175,30 @@ RM_STATUS NV_API_CALL os_acquire_sema
+     os_sema_t *os_sema = (os_sema_t *)pSema;
+     unsigned long old_irq;
+ 
++#if defined(CONFIG_PREEMPT_RT)
++    atomic_spin_lock_irqsave(&os_sema->lock, old_irq);
++#else
+     spin_lock_irqsave(&os_sema->lock, old_irq);
++#endif
+     if (os_sema->count <= 0)
+     {
+         os_sema->count--;
++#if defined(CONFIG_PREEMPT_RT)
++        atomic_spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#else
+         spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#endif
+         wait_for_completion(&os_sema->completion);
+     }
+     else
+     {
+         os_sema->count--;
+         rm_disable_interrupts(os_sema->sp);
++#if defined(CONFIG_PREEMPT_RT)
++        atomic_spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#else
+         spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#endif
+     }
+ 
+     return RM_OK;
+@@ -205,17 +221,29 @@ BOOL NV_API_CALL os_cond_acquire_sema
+     os_sema_t *os_sema = (os_sema_t *)pSema;
+     unsigned long old_irq;
+ 
++#if defined(CONFIG_PREEMPT_RT)
++    atomic_spin_lock_irqsave(&os_sema->lock, old_irq);
++#else
+     spin_lock_irqsave(&os_sema->lock, old_irq);
++#endif
+     if (os_sema->count <= 0)
+     {
++#if defined(CONFIG_PREEMPT_RT)
++        atomic_spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#else
+         spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#endif
+         return FALSE;
+     }
+     else
+     {
+         os_sema->count--;
+         rm_disable_interrupts(os_sema->sp);
++#if defined(CONFIG_PREEMPT_RT)
++        atomic_spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#else
+         spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#endif
+         return TRUE;
+     }
+ 
+@@ -239,7 +267,11 @@ RM_STATUS NV_API_CALL os_release_sema
+     unsigned long old_irq;
+     BOOL doWakeup;
+ 
++#if defined(CONFIG_PREEMPT_RT)
++    atomic_spin_lock_irqsave(&os_sema->lock, old_irq);
++#else
+     spin_lock_irqsave(&os_sema->lock, old_irq);
++#endif
+     if (os_sema->count < 0)
+     {
+         doWakeup = TRUE;
+@@ -250,7 +282,11 @@ RM_STATUS NV_API_CALL os_release_sema
+         rm_enable_interrupts(os_sema->sp);
+     }
+     os_sema->count++;
++#if defined(CONFIG_PREEMPT_RT)
++    atomic_spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#else
+     spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#endif
+ 
+     if (doWakeup)
+         complete(&os_sema->completion);
+@@ -1319,7 +1355,11 @@ NvU64 NV_API_CALL os_acquire_spinlock(vo
+     unsigned long oldIrql;
+ 
+     os_sema = (os_sema_t *) pSema;
++#if defined(CONFIG_PREEMPT_RT)
++    atomic_spin_lock_irqsave(&os_sema->lock, oldIrql);
++#else
+     spin_lock_irqsave(&os_sema->lock, oldIrql);
++#endif
+ 
+     return oldIrql;
+ }
+@@ -1330,7 +1370,11 @@ void NV_API_CALL os_release_spinlock(voi
+     unsigned long old_irq = (unsigned long) oldIrql;
+ 
+     os_sema = (os_sema_t *) pSema;
++#if defined(CONFIG_PREEMPT_RT)
++    atomic_spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#else
+     spin_unlock_irqrestore(&os_sema->lock, old_irq);
++#endif
+ }
+ 
+ 
--- nvidia-graphics-drivers-195.36.24.orig/debian/dkms/patches/drm_agp_memory-2.6.31.patch
+++ nvidia-graphics-drivers-195.36.24/debian/dkms/patches/drm_agp_memory-2.6.31.patch
@@ -0,0 +1,33 @@
+diff -rupN nvidia-185.18.14.orig/nv-i2c.c nvidia-185.18.14.new/nv-i2c.c
+--- nvidia-185.18.14.orig/nv-i2c.c	2009-06-30 15:11:50.000000000 +0100
++++ nvidia-185.18.14.new/nv-i2c.c	2009-06-30 15:41:23.000000000 +0100
+@@ -218,8 +218,6 @@ struct i2c_adapter nv_i2c_adapter_protot
+ #if defined(NV_I2C_ADAPTER_HAS_DEC_USE)
+     .dec_use           = nv_i2c_adapter_dec_use,
+ #endif
+-    .client_register   = nv_i2c_adapter_register_client,
+-    .client_unregister = nv_i2c_adapter_unregister_client,
+     .data              = NULL,
+ };
+ 
+@@ -241,8 +239,6 @@ struct i2c_adapter nv_i2c_adapter_protot
+     .owner             = THIS_MODULE,
+     .algo              = &nv_i2c_algo,
+     .algo_data         = NULL,
+-    .client_register   = nv_i2c_adapter_register_client,
+-    .client_unregister = nv_i2c_adapter_unregister_client,
+ };
+ 
+ #endif // defined(KERNEL_2_4)
+diff -rupN nvidia-185.18.14.orig/os-agp.c nvidia-185.18.14.new/os-agp.c
+--- nvidia-185.18.14.orig/os-agp.c	2009-06-30 15:11:50.000000000 +0100
++++ nvidia-185.18.14.new/os-agp.c	2009-06-30 15:12:58.000000000 +0100
+@@ -293,7 +293,7 @@ RM_STATUS KernLoadAGPPages(
+     {
+          nv_pte_t *page_ptr = at->page_table[i];
+ 
+-         page_ptr->phys_addr = (ptr->memory[i] & PAGE_MASK);
++	 page_ptr->phys_addr = (page_to_phys(ptr->pages[i]) & PAGE_MASK);
+          page_ptr->virt_addr = (unsigned long) __va(page_ptr->phys_addr);
+          page_ptr->dma_addr  = page_ptr->phys_addr;
+     }
--- nvidia-graphics-drivers-195.36.24.orig/debian/dkms/patches/fall_back_on_mtrr_if_no_pat.patch
+++ nvidia-graphics-drivers-195.36.24/debian/dkms/patches/fall_back_on_mtrr_if_no_pat.patch
@@ -0,0 +1,22 @@
+diff -ru nv/nv.c nv.4796515/nv.c
+--- nv/nv.c	2009-09-23 08:26:44.000000000 -0700
++++ nv.4796515/nv.c	2009-10-07 08:34:18.359240138 -0700
+@@ -940,9 +940,15 @@
+     if (!test_bit(X86_FEATURE_PAT,
+             (volatile unsigned long *)&boot_cpu_data.x86_capability))
+     {
+-        nv_printf(NV_DBG_ERRORS,
+-            "NVRM: CPU does not support the PAT, falling back to MTRRs.\n");
+-        return NV_PAT_MODE_DISABLED;
++        if ((boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) ||
++                (boot_cpu_data.cpuid_level < 1) ||
++                ((cpuid_edx(1) & (1 << 16)) == 0) ||
++                (boot_cpu_data.x86 != 6) || (boot_cpu_data.x86_model >= 15))
++        {
++            nv_printf(NV_DBG_ERRORS,
++                "NVRM: CPU does not support the PAT, falling back to MTRRs.\n");
++            return NV_PAT_MODE_DISABLED;
++        }
+     }
+ 
+     NV_READ_PAT_ENTRIES(pat1, pat2);
--- nvidia-graphics-drivers-195.36.24.orig/debian/dkms/patches/rt_preempt_31.patch
+++ nvidia-graphics-drivers-195.36.24/debian/dkms/patches/rt_preempt_31.patch
@@ -0,0 +1,12 @@
+diff -urN NVIDIA-Linux-x86-185.18.36-pkg1/usr/src/nv/nv-linux.h NVIDIA-Linux-x86-185.18.36-pkg1.new/usr/src/nv/nv-linux.h
+--- nvidia-185.18.36/nv-linux.h	2009-08-15 10:58:45.000000000 +1000
++++ nvidia-185.18.36.new/nv-linux.h	2009-09-26 21:43:35.000000000 +1000
+@@ -721,7 +721,7 @@
+ #define nv_up(lock)                     up(&lock)
+ 
+ #if defined(CONFIG_PREEMPT_RT)
+-#define NV_INIT_MUTEX(mutex) init_MUTEX(mutex)
++#define NV_INIT_MUTEX(mutex) semaphore_init(mutex)
+ #else
+ #if !defined(__SEMAPHORE_INITIALIZER) && defined(__COMPAT_SEMAPHORE_INITIALIZER)
+ #define __SEMAPHORE_INITIALIZER __COMPAT_SEMAPHORE_INITIALIZER
--- nvidia-graphics-drivers-195.36.24.orig/debian/dkms/patches/vga_arbiter_workaround.patch
+++ nvidia-graphics-drivers-195.36.24/debian/dkms/patches/vga_arbiter_workaround.patch
@@ -0,0 +1,13 @@
+diff -ru nv/nv.c nv.682377/nv.c
+--- nv/nv.c	2010-04-22 11:49:41.000000000 -0700
++++ nv.682377/nv.c	2010-05-03 15:24:45.330672559 -0700
+@@ -4749,6 +4749,9 @@
+     pci_set_master(dev);
+ 
+ #if defined(CONFIG_VGA_ARB)
++#if defined(VGA_DEFAULT_DEVICE)
++    vga_tryget(VGA_DEFAULT_DEVICE, VGA_RSRC_LEGACY_MASK);
++#endif
+     vga_set_legacy_decoding(dev, VGA_RSRC_NONE);
+ #endif
+ 
