diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
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.inc | 70 |
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). | ||
7 | SUMMARY = "Document type definitions for verification of SGML data files" | ||
8 | DESCRIPTION = "Document type definitions for verification of SGML data \ | ||
9 | files against the DocBook rule set" | ||
10 | HOMEPAGE = "http://www.docbook.org/sgml/" | ||
11 | |||
12 | DEPENDS = "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. | ||
17 | SRC_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 | ||
21 | S = "${WORKDIR}" | ||
22 | |||
23 | INC_PR = "r3" | ||
24 | |||
25 | SSTATEPOSTINSTFUNCS += "docbook_sgml_dtd_sstate_postinst" | ||
26 | SYSROOT_PREPROCESS_FUNCS += "docbook_sgml_dtd_sysroot_preprocess" | ||
27 | |||
28 | inherit native | ||
29 | |||
30 | do_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 | |||
42 | docbook_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 | |||
56 | docbook_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 | |||
61 | CLEANFUNCS += "docbook_sgml_dtd_sstate_clean" | ||
62 | |||
63 | docbook_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 | } | ||