~ubuntu-branches/ubuntu/raring/nvidia-graphics-drivers-304/raring-proposed

« back to all changes in this revision

Viewing changes to debian/nvidia-304.prerm.in

  • Committer: Package Import Robot
  • Author(s): Alberto Milone
  • Date: 2013-03-06 16:25:21 UTC
  • Revision ID: package-import@ubuntu.com-20130306162521-vbw5hhjhlcy7r8ue
Tags: 304.84-0ubuntu2
* debian/rules:
  - Allow direct assignment of package name. Thanks to
    Andy Dick <adick@nvidia.com> for the patch.
  - Use flavour-agnostic template file names. The *.in
    template files currently need to be renamed when
    switching package flavours. To facilitate package
    flavour switching, we use the flavour-agnostic
    templates nvidia-graphics-drivers-*.in in the
    debian/templates directory and generate flavour
    specific files from them.
    This work is based on the original implementation
    by Daniel Dadap <ddadap@nvidia.com>.
* debian/templates/control.in:
  - Conflict/replace/provide xorg-driver-binary.
    Each nvidia and fglrx driver will do the same with
    xorg-driver-binary.
  - Drop any other conflicts/replaces/provides.
* debian/templates/nvidia-graphics-drivers.README.
  Debian.in:
  - Update the documentation so as to cover the
    fact that we moved templates to debian/templates.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
# prerm script for #DRIVERNAME#
3
 
#
4
 
# Copyright (C) 2007 Mario Limonciello
5
 
# Copyright (C) 2009 Canonical Ltd
6
 
# Authors: Alberto Milone
7
 
 
8
 
 
9
 
PACKAGE_NAME=#DRIVERNAME#
10
 
CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2`
11
 
CVERSION=${CVERSION#*really.}
12
 
 
13
 
remove_dkms_module() {
14
 
        echo "Removing all DKMS Modules"
15
 
        dkms remove -m $PACKAGE_NAME -v $CVERSION --all > /dev/null
16
 
        echo "Done."
17
 
}
18
 
 
19
 
case "$1" in
20
 
        upgrade)
21
 
                remove_dkms_module 
22
 
        ;;
23
 
        remove)
24
 
                remove_dkms_module 
25
 
        
26
 
                update-alternatives --remove #DEB_HOST_MULTIARCH#_gl_conf #LDSOCONF#
27
 
                update-alternatives --remove #OTHER_ARCH#_gl_conf #ALTLDSOCONF#
28
 
 
29
 
                # Trigger gmenu so as to update the gnome menu
30
 
                dpkg-trigger --by-package=$PACKAGE_NAME gmenucache || true
31
 
 
32
 
                # explicit ldconfig due to alternatives
33
 
                ldconfig
34
 
 
35
 
                # Update the grub gfxpayload blacklist
36
 
                if which update-grub-gfxpayload >/dev/null 2>&1; then
37
 
                    update-grub-gfxpayload
38
 
                fi
39
 
 
40
 
                # Remove any quirks for the driver
41
 
                if [ `which quirks-handler` ]; then
42
 
                    quirks-handler -d $PACKAGE_NAME -v
43
 
                fi
44
 
        ;;
45
 
esac
46
 
 
47
 
#DEBHELPER#