summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc
downloadpoky-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
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.inc70
1 files changed, 70 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..af50987968
--- /dev/null
+++ b/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc
@@ -0,0 +1,70 @@
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 = "r3"
24
25SSTATEPOSTINSTFUNCS += "docbook_sgml_dtd_sstate_postinst"
26SYSROOT_PREPROCESS_FUNCS += "docbook_sgml_dtd_sysroot_preprocess"
27
28inherit native
29
30do_install () {
31 # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html
32 # for details.
33 install -d -m 755 ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}
34 install docbook.cat ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog
35 cp -PpRr *.dtd *.mod *.dcl ${D}${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}
36
37 install -d ${D}${sysconfdir}/sgml
38 echo "CATALOG ${datadir}/sgml/docbook/sgml-dtd-${DTD_VERSION}/catalog" > \
39 ${D}${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
40}
41
42docbook_sgml_dtd_sstate_postinst () {
43 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
44 then
45 # Ensure that the catalog file sgml-docbook.cat is properly
46 # updated when the package is installed from sstate cache.
47 ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-sgml-dtd-${DTD_VERSION} \
48 --add ${sysconfdir}/sgml/sgml-docbook.bak \
49 ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
50 ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-sgml-dtd-${DTD_VERSION} \
51 --add ${sysconfdir}/sgml/sgml-docbook.cat \
52 ${sysconfdir}/sgml/sgml-docbook-dtd-${DTD_VERSION}.cat
53 fi
54}
55
56docbook_sgml_dtd_sysroot_preprocess () {
57 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
58 install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-sgml-dtd-${DTD_VERSION}
59}
60
61CLEANFUNCS += "docbook_sgml_dtd_sstate_clean"
62
63docbook_sgml_dtd_sstate_clean () {
64 # Ensure that the catalog file sgml-docbook.cat is properly
65 # updated when the package is removed from sstate cache.
66 files="${sysconfdir}/sgml/sgml-docbook.bak ${sysconfdir}/sgml/sgml-docbook.cat"
67 for f in $files; do
68 [ ! -f $f ] || sed -i '/\/sgml\/sgml-docbook-dtd-${DTD_VERSION}.cat/d' $f
69 done
70}