#! /bin/sh

set -e

LASTVER="11.04.10"

if dpkg-maintscript-helper supports rm_conffile; then
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/applications/defaults.list "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/Thunar/volmanrc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/mount.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/actions-6.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/clock-5.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/launcher-2.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/launcher-3.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/pager-3.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/panels.xml "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/places-2.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/separator-3.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/systray-4.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/tasklist-2.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/xfce4-menu-1.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/xfce4-mixer-plugin-5.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/xfce4-orageclock-plugin-7.rc "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/exaile/settings.ini "$LASTVER" -- "$@"
  dpkg-maintscript-helper rm_conffile \
    /etc/xdg/xdg-xubuntu/xfce4/panel/cpugraph-3.rc "$LASTVER" -- "$@"
fi

case "$1" in
  upgrade)
    if dpkg --compare-versions "$2" eq "11.10.2"; then
      update-alternatives --remove lightdm-config-derivative /usr/share/xubuntu/lightdm/lightdm.conf
      update-alternatives --remove default-xsession-derivative /usr/share/xsessions/xubuntu.desktop
    fi
    ;;
esac

#DEBHELPER#
