#! /bin/sh -e

case "$0" in
    *experimental.postinst)
    FLAVOR=-experimental
    PRIO=60
    PRIOS=11
    ;;
    *lite.postinst)
    FLAVOR=-lite
    PRIO=40
    PRIOS=9
    ;;
    *)
    FLAVOR=""
    PRIO=50
    PRIOS=10
    ;;
esac

#DEBHELPER#

if [ "$1" = "configure" ]; then
   update-alternatives --install /usr/bin/x-window-manager \
   x-window-manager /usr/bin/icewm$FLAVOR $PRIO \
   --slave /usr/share/man/man1/x-window-manager.1.gz x-window-manager.1.gz \
   /usr/share/man/man1/icewm$FLAVOR.1x.gz

  update-alternatives --install /usr/bin/x-session-manager \
  x-session-manager /usr/bin/icewm-session$FLAVOR $PRIOS

fi

exit 0


