blob: 2f13dba52c44ccc0d70662cb5f8ed52ccccfd11e [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "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.
Patrick Williamsc0f7c042017-02-23 20:41:17 -060014SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/d/docbook-xml/docbook-xml_${PV}.orig.tar.gz \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015 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
Patrick Williamsc0f7c042017-02-23 20:41:17 -060023UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/docbook-xml/"
24
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025S="${WORKDIR}/docbook-xml-4.5.c31424"
26
27inherit allarch
28BBCLASSEXTEND = "native"
29
30SSTATEPOSTINSTFUNCS_append_class-native = " docbook_xml_dtd_sstate_postinst"
31SYSROOT_PREPROCESS_FUNCS_append_class-native = " docbook_xml_dtd_sysroot_preprocess"
32
33do_configre (){
34 :
35}
36
37do_compile (){
38 :
39}
40
41do_install () {
42 # Refer debian https://packages.debian.org/sid/all/docbook-xml/filelist
43 for DTDVERSION in 4.0 4.1.2 4.2 4.3 4.4 4.5; do
44 install -d -m 755 ${D}${datadir}/xml/docbook/schema/dtd/${DTDVERSION}
45 cp -v -R docbook-${DTDVERSION}/* ${D}${datadir}/xml/docbook/schema/dtd/${DTDVERSION}
46 done
47
48 install -d ${D}${sysconfdir}/xml/
49 install -m 755 ${WORKDIR}/docbook-xml.xml ${D}${sysconfdir}/xml/docbook-xml.xml
50}
51
52docbook_xml_dtd_sstate_postinst () {
53 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
54 then
55 # Ensure that the catalog file sgml-docbook.cat is properly
56 # updated when the package is installed from sstate cache.
57 sed -i -e "s|file://.*/usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xml.xml
58 fi
59}
60
61docbook_xml_dtd_sysroot_preprocess () {
62 # Update the hardcode dir in docbook-xml.xml
63 sed -i -e "s|file:///usr/share/xml|file://${datadir}/xml|g" ${SYSROOT_DESTDIR}${sysconfdir}/xml/docbook-xml.xml
64}
65
66FILES_${PN} = "${datadir}/* ${sysconfdir}/xml/docbook-xml.xml"