post_install() {
  if [ ! -e etc/xml/catalog ]; then
    usr/bin/xmlcatalog --noout --create etc/xml/catalog
  fi
  usr/bin/xmlcatalog --noout --add "public" \
    "-//OASIS//DTD DocBook MathML Module V1.1CR1//EN" \
    "file:///usr/share/xml/docbook/mathml/1.1CR1/dbmathml.dtd" \
    "etc/xml/catalog"

  usr/bin/xmlcatalog --noout --add "system" \
    "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" \
    "file:///usr/share/xml/docbook/mathml/1.1CR1/dbmathml.dtd" \
    "etc/xml/catalog"
}

post_remove() {
  usr/bin/xmlcatalog --noout --del "-//OASIS//DTD DocBook MathML Module V1.1CR1//EN" etc/xml/catalog
  usr/bin/xmlcatalog --noout --del "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd" etc/xml/catalog
}
