Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Document type definitions for verification of XML data files" |
| 2 | DESCRIPTION = "Document type definitions for verification of XML data \ |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 3 | files against the DocBook rule set." |
| 4 | HOMEPAGE = "https://docbook.org" |
| 5 | |
| 6 | # The upstream sources are not distributed with a license file. |
| 7 | # LICENSE-OASIS is included as a "patch" to workaround this. When |
| 8 | # upgrading this recipe, please verify whether this is still needed. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 9 | |
| 10 | LICENSE = "OASIS" |
| 11 | LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e" |
| 12 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 13 | # To support apps with xml schema backward compatibility, we must |
| 14 | # install a set of schemas. Install the latest based on PV and then |
| 15 | # name any specific versions as required. TODO: Figure out a mechanism |
| 16 | # to filter exactly which versions are necessary, if that's even |
| 17 | # possible. |
| 18 | # |
| 19 | # DocBook.org lists available release packages at https://docbook.org/xml/. |
| 20 | # |
| 21 | # The release packages relate docbook source at |
| 22 | # https://github.com/docbook/docbook but building them requires the |
| 23 | # Gradle build system. In future, it might be safer to use the source |
| 24 | # tree which would also enable proper SBOM generation through the |
| 25 | # bitbake build system. |
| 26 | # |
| 27 | |
| 28 | SRC_URI = "https://docbook.org/xml/4.1.2/docbkx412.zip;name=payload412;subdir=docbook-4.1.2 \ |
| 29 | https://docbook.org/xml/4.2/docbook-xml-4.2.zip;name=payload42;subdir=docbook-4.2 \ |
| 30 | https://docbook.org/xml/4.3/docbook-xml-4.3.zip;name=payload43;subdir=docbook-4.3 \ |
| 31 | https://docbook.org/xml/4.4/docbook-xml-4.4.zip;name=payload44;subdir=docbook-4.4 \ |
| 32 | https://docbook.org/xml/${PV}/docbook-xml-${PV}.zip;name=payloadPV;subdir=docbook-${PV} \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | file://docbook-xml-update-catalog.xml.patch \ |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 34 | file://LICENSE-OASIS" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 35 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 36 | SRC_URI[payload412.sha256sum] = "30f0644064e0ea71751438251940b1431f46acada814a062870f486c772e7772" |
| 37 | SRC_URI[payload42.sha256sum] = "acc4601e4f97a196076b7e64b368d9248b07c7abf26b34a02cca40eeebe60fa2" |
| 38 | SRC_URI[payload43.sha256sum] = "23068a94ea6fd484b004c5a73ec36a66aa47ea8f0d6b62cc1695931f5c143464" |
| 39 | SRC_URI[payload44.sha256sum] = "02f159eb88c4254d95e831c51c144b1863b216d909b5ff45743a1ce6f5273090" |
| 40 | SRC_URI[payloadPV.sha256sum] = "4e4e037a2b83c98c6c94818390d4bdd3f6e10f6ec62dd79188594e26190dc7b4" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 42 | UPSTREAM_CHECK_REGEX = "docbook-xml-(?P<pver>4(\.\d+)).zip" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 43 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 44 | S = "${WORKDIR}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 45 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 46 | do_configure (){ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | : |
| 48 | } |
| 49 | |
| 50 | do_compile (){ |
| 51 | : |
| 52 | } |
| 53 | |
| 54 | do_install () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 55 | install -d ${D}${sysconfdir}/xml/ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 56 | xmlcatalog --create --noout ${D}${sysconfdir}/xml/docbook-xml.xml |
| 57 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 58 | for DTDVERSION in 4.1.2 4.2 4.3 4.4 4.5; do |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 59 | DEST=${datadir}/xml/docbook/schema/dtd/$DTDVERSION |
| 60 | install -d -m 755 ${D}$DEST |
| 61 | cp -v -R docbook-$DTDVERSION/* ${D}$DEST |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 62 | xmlcatalog --verbose --noout --add nextCatalog unused \ |
| 63 | file://$DEST/catalog.xml ${D}${sysconfdir}/xml/docbook-xml.xml |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 64 | done |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 65 | } |
| 66 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 67 | # Magic environment variable is required for downstream recipe processing |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 68 | XMLCATALOGS = "${sysconfdir}/xml/docbook-xml.xml" |
| 69 | inherit xmlcatalog |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 70 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 71 | FILES:${PN} = "${datadir}/* ${sysconfdir}/xml/docbook-xml.xml" |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 72 | |
| 73 | inherit allarch |
| 74 | BBCLASSEXTEND = "native" |