blob: ae4811fdeb94c92bd6087c1c0d22eb2baa888350 [file] [log] [blame]
Brad Bishop96ff1982019-08-19 13:50:42 -04001DEPENDS = "libxml2-native"
2
Brad Bishop19323692019-04-05 15:28:33 -04003# A whitespace-separated list of XML catalogs to be registered, for example
4# "${sysconfdir}/xml/docbook-xml.xml".
5XMLCATALOGS ?= ""
6
7SYSROOT_PREPROCESS_FUNCS_append = " xmlcatalog_sstate_postinst"
8
9xmlcatalog_complete() {
10 ROOTCATALOG="${STAGING_ETCDIR_NATIVE}/xml/catalog"
11 if [ ! -f $ROOTCATALOG ]; then
12 mkdir --parents $(dirname $ROOTCATALOG)
13 xmlcatalog --noout --create $ROOTCATALOG
14 fi
15 for CATALOG in ${XMLCATALOGS}; do
16 xmlcatalog --noout --add nextCatalog unused file://$CATALOG $ROOTCATALOG
17 done
18}
19
20xmlcatalog_sstate_postinst() {
21 mkdir -p ${SYSROOT_DESTDIR}${bindir}
22 dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN}-xmlcatalog
23 echo '#!/bin/sh' > $dest
24 echo '${xmlcatalog_complete}' >> $dest
25 chmod 0755 $dest
26}