#! /bin/sh

case "$1" in
    configure)
        # Update MIME database only if it's older than the packages dir
        if test -x /usr/bin/update-mime-database -a \
           /usr/share/mime/mime.cache -ot /usr/share/mime/packages; then
            /usr/bin/update-mime-database /usr/share/mime
        fi
        if test -x /usr/bin/gtk-update-icon-cache; then
            /usr/bin/gtk-update-icon-cache -f -t /usr/share/icons/hicolor
        fi
        if test -x /usr/bin/update-desktop-database; then
            /usr/bin/update-desktop-database
        fi
        if [ -z "$2" ]; then
            maemo-select-menu-location xarchiver.desktop tana_fi_utilities
            tmpf='/tmp/__xarchiver__.txt'
            cat >$tmpf <<EOF
Xarchiver is just a front-end for many of the command-line archival utilites
available. In order to work with certain archive types, you must install the
respective command-line tools 

It is recommended to install the following packages:

gnutar - support for .tar archives
gnuzip - support for .gz, .tar.gz .tgz archives
zip or zip3 - support for creating .zip archives
unzip - support for unpacking .zip archives
unrar - support for unpacking .rar archives
arj - support for .arj archives
lha - support for .lha and .lzh archives
p7zip - support for .7z archives
EOF
            maemo-confirm-text 'Thanks for installing Xarchiver!' $tmpf
            rm -f $tmpf
        fi
        ;;
esac

#DEBHELPER#
