#!/bin/sh

set -x

case $2 in 
    DEINSTALL)
	;;
    POST-DEINSTALL)
	PREFIX=${PKG_PREFIX};

	XMLCATMGR="%%XMLCATMGR%%";
	MASTER_CATALOG_XML="%%MASTER_CATALOG_XML%%";
	DTD_DIR="%%DTD_DIR%%"
	DTD_BASE_URI="%%DTD_BASE_URI%%"
	${XMLCATMGR} -c ${MASTER_CATALOG_XML} remove nextCatalog "file://${DTD_DIR}/catalog.xml"
	${XMLCATMGR} -c ${MASTER_CATALOG_XML} remove rewriteSystem ${DTD_BASE_URI}
	${XMLCATMGR} -c ${MASTER_CATALOG_XML} remove rewriteURI ${DTD_BASE_URI}
	;;
esac
exit 0
#EOF
