if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi

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

if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
  if [ -x /usr/bin/gtk-update-icon-cache ]; then
    /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
  fi
fi

( cd opt/google/picasa/3.0/wine/lib ; rm -rf libwine.so.1 )
( cd opt/google/picasa/3.0/wine/lib ; ln -sf libwine.so.1.0 libwine.so.1 )
( cd usr/doc/picasa-3.0.5744/scripts ; rm -rf picasa-hook-urlhandler.sh.template )
( cd usr/doc/picasa-3.0.5744/scripts ; ln -sf /opt/google/picasa/3.0/desktop/picasa-hook-urlhandler.sh.template picasa-hook-urlhandler.sh.template )
( cd usr/doc/picasa-3.0.5744/scripts ; rm -rf picasa-hook-filemanager.sh.template )
( cd usr/doc/picasa-3.0.5744/scripts ; ln -sf /opt/google/picasa/3.0/desktop/picasa-hook-filemanager.sh.template picasa-hook-filemanager.sh.template )
( cd usr/doc/picasa-3.0.5744/scripts ; rm -rf picasa-hook-mimehandler.sh.template )
( cd usr/doc/picasa-3.0.5744/scripts ; ln -sf /opt/google/picasa/3.0/desktop/picasa-hook-mimehandler.sh.template picasa-hook-mimehandler.sh.template )
( cd usr/doc/picasa-3.0.5744/scripts ; rm -rf picasa-hook-email.sh.template )
( cd usr/doc/picasa-3.0.5744/scripts ; ln -sf /opt/google/picasa/3.0/desktop/picasa-hook-email.sh.template picasa-hook-email.sh.template )
( cd usr/bin ; rm -rf picasa )
( cd usr/bin ; ln -sf /opt/google/picasa/3.0/bin/picasa picasa )
( cd usr/bin ; rm -rf picasafontcfg )
( cd usr/bin ; ln -sf /opt/google/picasa/3.0/bin/picasafontcfg picasafontcfg )
( cd usr/lib/mozilla/plugins ; rm -rf npPicasa3.so )
( cd usr/lib/mozilla/plugins ; ln -sf /opt/google/picasa/3.0/lib/npPicasa3.so npPicasa3.so )
