blob: b656e1e239c24b9fe65d014b6a731824b4fb4ea3 [file] [log] [blame] [edit]
MINGW_INSTALL=clang32
MINGW_XML_CATALOG=${MINGW_INSTALL}/etc/xml
# export MSYS2_ARG_CONV_EXCL="-//OASIS"
_vers_4x=(4.{2..5})
post_install() {
if [ -e ${MINGW_XML_CATALOG}/catalog.preserve ]; then
mv ${MINGW_XML_CATALOG}/catalog.preserve ${MINGW_XML_CATALOG}/catalog
elif [ ! -e ${MINGW_INSTALL}/etc/xml/catalog ]; then
${MINGW_INSTALL}/bin/xmlcatalog --noout --create ${MINGW_XML_CATALOG}/catalog
fi
${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegatePublic" \
"-//OASIS//ENTITIES DocBook XML" \
"./docbook-xml" \
${MINGW_XML_CATALOG}/catalog
${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegatePublic" \
"-//OASIS//DTD DocBook XML" \
"./docbook-xml" \
${MINGW_XML_CATALOG}/catalog
${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegateSystem" \
"http://www.oasis-open.org/docbook/" \
"./docbook-xml" \
${MINGW_XML_CATALOG}/catalog
${MINGW_INSTALL}/bin/xmlcatalog --noout --add "delegateURI" \
"http://www.oasis-open.org/docbook/" \
"./docbook-xml" \
${MINGW_XML_CATALOG}/catalog
}
# arg 1: the new package version
# arg 2: the old package version
pre_upgrade() {
if [ $(vercmp $2 4.5) -lt 0 ]; then
${MINGW_INSTALL}/bin/xmlcatalog --del "${MINGW_XML_CATALOG}/docbook" ${MINGW_XML_CATALOG}/catalog > ${MINGW_XML_CATALOG}/catalog.preserve
echo ":: docbook5 is now in docbook5-xml"
fi
}
post_upgrade() {
if [ $(vercmp $2 4.5) -ge 0 ]; then
post_remove
fi
post_install
}
post_remove() {
${MINGW_INSTALL}/bin/xmlcatalog --noout --del ./docbook-xml ${MINGW_XML_CATALOG}/catalog
}