post_install() {
  if [ ! -d etc/xml ]; then
    mkdir -p etc/xml
  fi
  if [ ! -e etc/xml/catalog ]; then
    xmlcatalog --noout --create etc/xml/catalog
  fi
  xmlcatalog --noout --add 'delegateURI' \
    'http://bluefish.openoffice.nl/ns/bflang/2.0/' /usr/share/xml/bluefish \
    etc/xml/catalog
}

pre_upgrade() {
  post_remove
}

post_upgrade() {
  post_install
}

post_remove() {
  xmlcatalog --noout --del \
    /usr/share/xml/bluefish etc/xml/catalog
}
