S = "${WORKDIR}"
+INC_PR = "r1"
+
+SYSROOT_PREPROCESS_FUNCS += "docbook_sgml_dtd_native_mangle"
+
inherit native
-do_stage () {
+do_install () {
# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html
# for details.
- install -d -m 755 ${STAGING_DATADIR}/sgml/docbook/sgml-dtd-${DTD_VERSION}
- install docbook.cat ${STAGING_DATADIR}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog
- cp -dpr *.dtd *.mod *.dcl ${STAGING_DATADIR}/sgml/docbook/sgml-dtd-${DTD_VERSION}
-
+ install -d -m 755 ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}
+ install docbook.cat ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog
+ cp -dpr *.dtd *.mod *.dcl ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}
+
install-catalog --add ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat \
- ${STAGING_DATADIR}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog
-
+ ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog
install-catalog --add ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat \
${sysconfdir}/sgml/sgml-docbook.cat
+ # Moving them to image directory so that they get included in the .ipk file
+ # generated by new style staging.
+ install -d ${D}${sysconfdir}/sgml
+ cp ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat ${D}${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
+ cp ${sysconfdir}/sgml/catalog ${D}${sysconfdir}/sgml/
}
PACKAGES = ""
+docbook_sgml_dtd_native_mangle () {
+ # Removing the image directory path (${D}) from the .cat file.
+ sed -i -e "s|${D}||g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
+}
+NATIVE_INSTALL_WORKS = "1"