#! /bin/sh -e

if dpkg --compare-versions "$2" le 1.8.10; then
   DIVERT_LIST="/usr/games/tuxtype /usr/bin/tuxpaint"
   for f in ${DIVERT_LIST} ; do
	if [ -f "${f}.real" ] ; then
           rm -f "$f" 2>&1 >/dev/null || true 
           dpkg-divert --package llxcfg-desktops-keeper --rename --quiet --remove "${f}" || true
	fi
   done
fi

dpkg-divert --package llxcfg-desktops-keeper --rename --quiet --add --divert /usr/share/applications/kde4/kpackagekit.desktop.real /usr/share/applications/kde4/kpackagekit.desktop 

echo "update-mime "
update-mime >/dev/null 2>/dev/null || true
echo "update-mime-database /usr/share/mime"
update-mime-database /usr/share/mime > /dev/null 2>/dev/null || true
echo "update-desktops-database /usr/share/applications/"
update-desktop-database /usr/share/applications/ >/dev/null 2>/dev/null || true


# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0