summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc')
-rw-r--r--meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc b/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc
new file mode 100644
index 0000000000..162051f62b
--- /dev/null
+++ b/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc
@@ -0,0 +1,53 @@
1# The DTDs of the various versions have to be installed in parallel and
2# should not replace each other. The installation step is common for
3# all versions and just differs in ${DTD_VERSION} which is set in each
4# version recipe.
5#
6# The DTDs do have some quirks (see LFS documentation).
7SUMMARY = "Document type definitions for verification of SGML data files"
8DESCRIPTION = "Document type definitions for verification of SGML data \
9files against the DocBook rule set"
10HOMEPAGE = "http://www.docbook.org/sgml/"
11
12DEPENDS = "sgml-common-native"
13
14# Note: the upstream sources are not distributed with a license file.
15# LICENSE-OASIS is included as a "patch" to workaround this. When
16# upgrading this recipe, please verify whether this is still needed.
17SRC_URI = "http://www.docbook.org/sgml/${DTD_VERSION}/docbook-${DTD_VERSION}.zip \
18 file://LICENSE-OASIS"
19
20# The .zip file extracts to the current dir
21S = "${WORKDIR}"
22
23INC_PR = "r0"
24
25SYSROOT_PREPROCESS_FUNCS += "docbook_sgml_dtd_native_mangle"
26
27inherit native
28
29do_install () {
30 # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html
31 # for details.
32 install -d -m 755 ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}
33 install docbook.cat ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog
34 cp -PpRr *.dtd *.mod *.dcl ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}
35
36 install-catalog \
37 --add ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat \
38 ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog
39
40 install-catalog \
41 --add ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat \
42 ${sysconfdir}/sgml/sgml-docbook.cat
43
44 # Copy the generated catalog to the image directory for staging.
45 install -d ${D}${sysconfdir}/sgml
46 cp ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat ${D}${sysconfdir}/sgml/
47}
48
49docbook_sgml_dtd_native_mangle () {
50 # Remove the image directory path ${D} from the .cat files.
51 sed -i -e "s|${D}||g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/sgml-docbook.cat || true
52 sed -i -e "s|${D}||g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
53}