summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2014-07-09 18:16:56 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-16 10:20:50 +0100
commit605e1f38f4a4257987e03e35518ed720fed56bc2 (patch)
treed5f49daf25342429d1233b8029de420f99377d3f /meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
parent38d438c4af91f67886e711a290e8adba822692c3 (diff)
downloadpoky-605e1f38f4a4257987e03e35518ed720fed56bc2.tar.gz
docbook-xml: add docbook-xml-dtd4
Refer debian, it shipped the latest DocBook 4.5 XML DTD, as well as a selected set of legacy DTDs for use with older documents, including 4.0, 4.1.2, 4.2, 4.3 and 4.4. About the config files (docbook-xml.xml and the update patch), we refered what Ubuntu 13.04 did, so the xmlto could correctly search among multible DTDs. [YOCTO #2416] (From OE-Core rev: 03bc6717482c07dde69edf96d1044d3c0016dbf6) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb')
-rw-r--r--meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb64
1 files changed, 64 insertions, 0 deletions
diff --git a/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
new file mode 100644
index 0000000000..de1bc39704
--- /dev/null
+++ b/meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb
@@ -0,0 +1,64 @@
1SUMMARY = "Document type definitions for verification of XML data files"
2DESCRIPTION = "Document type definitions for verification of XML data \
3files against the DocBook rule set, it ships with the latest DocBook 4.5 \
4XML DTD, as well as a selected set of legacy DTDs for use with older \
5documents, including 4.0, 4.1.2, 4.2, 4.3 and 4.4"
6HOMEPAGE = "http://www.docbook.org/xml/"
7
8LICENSE = "OASIS"
9LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e"
10
11# Note: the upstream sources are not distributed with a license file.
12# LICENSE-OASIS is included as a "patch" to workaround this. When
13# upgrading this recipe, please verify whether this is still needed.
14SRC_URI = "${DEBIAN_MIRROR}/main/d/docbook-xml/docbook-xml_${PV}.orig.tar.gz \
15 file://LICENSE-OASIS \
16 file://docbook-xml-update-catalog.xml.patch \
17 file://docbook-xml.xml \
18"
19
20SRC_URI[md5sum] = "487b4d44e15cffb1f4048af23f98208e"
21SRC_URI[sha256sum] = "b0f8edcf697f5318e63dd98c9a931f3fee167af0805ba441db372e0f17b2a44f"
22
23S="${WORKDIR}/docbook-xml-4.5.c31424"
24
25inherit allarch
26BBCLASSEXTEND = "native"
27
28SSTATEPOSTINSTFUNCS_append_class-native = " docbook_xml_dtd_sstate_postinst"
29SYSROOT_PREPROCESS_FUNCS_append_class-native = " docbook_xml_dtd_sysroot_preprocess"
30
31do_configre (){
32 :
33}
34
35do_compile (){
36 :
37}
38
39do_install () {
40 # Refer debian https://packages.debian.org/sid/all/docbook-xml/filelist
41 for DTDVERSION in 4.0 4.1.2 4.2 4.3 4.4 4.5; do
42 install -d -m 755 ${D}${datadir}/xml/docbook/schema/dtd/${DTDVERSION}
43 cp -v -R docbook-${DTDVERSION}/* ${D}${datadir}/xml/docbook/schema/dtd/${DTDVERSION}
44 done
45
46 install -d ${D}${sysconfdir}/xml/
47 install -m 755 ${WORKDIR}/docbook-xml.xml ${D}${sysconfdir}/xml/docbook-xml.xml
48}
49
50docbook_xml_dtd_sstate_postinst () {
51 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
52 then
53 # Ensure that the catalog file sgml-docbook.cat is properly
54 # updated when the package is installed from sstate cache.
55 sed -i -e "s|file://.*/usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xml.xml
56 fi
57}
58
59docbook_xml_dtd_sysroot_preprocess () {
60 # Update the hardcode dir in docbook-xml.xml
61 sed -i -e "s|file:///usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xml.xml
62}
63
64FILES_${PN} = "${datadir}/* ${sysconfdir}/xml/docbook-xml.xml"