if [ -x /usr/bin/update-mime-database ]; then
  /usr/bin/update-mime-database /usr/share/mime &> /dev/null
fi

if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database &> /dev/null
fi

if [ -x /usr/bin/gtk-update-icon-cache ]; then
  /usr/bin/gtk-update-icon-cache  -f -q /usr/share/icons/hicolor &> /dev/null
fi

( cd usr/share/applications ; rm -rf kmymoney2.desktop )
( cd usr/share/applications ; ln -sf /opt/kde3/share/applications/kde/kmymoney2.desktop kmymoney2.desktop )
( cd opt/kde3/lib ; rm -rf libkmm_plugin.so.0 )
( cd opt/kde3/lib ; ln -sf libkmm_plugin.so.0.0.0 libkmm_plugin.so.0 )
( cd opt/kde3/lib ; rm -rf libkmm_mymoney.so.5 )
( cd opt/kde3/lib ; ln -sf libkmm_mymoney.so.5.0.0 libkmm_mymoney.so.5 )
( cd opt/kde3/lib ; rm -rf libkmm_mymoney.so )
( cd opt/kde3/lib ; ln -sf libkmm_mymoney.so.5.0.0 libkmm_mymoney.so )
( cd opt/kde3/lib ; rm -rf libkmm_kdchart.so )
( cd opt/kde3/lib ; ln -sf libkmm_kdchart.so.0.0.0 libkmm_kdchart.so )
( cd opt/kde3/lib ; rm -rf libkmm_plugin.so )
( cd opt/kde3/lib ; ln -sf libkmm_plugin.so.0.0.0 libkmm_plugin.so )
( cd opt/kde3/lib ; rm -rf libkmm_kdchart.so.0 )
( cd opt/kde3/lib ; ln -sf libkmm_kdchart.so.0.0.0 libkmm_kdchart.so.0 )
( cd opt/kde3/bin ; rm -rf kmymoney )
( cd opt/kde3/bin ; ln -sf ./kmymoney2 kmymoney )
( cd opt/kde3/share/doc/HTML/en/kmymoney2 ; rm -rf common )
( cd opt/kde3/share/doc/HTML/en/kmymoney2 ; ln -sf /opt/kde3/share/doc/HTML/en/common common )
