diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 14:36:22 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2014-06-26 15:32:53 +0200 |
commit | f4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch) | |
tree | 487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb | |
download | poky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz |
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb')
-rw-r--r-- | meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb b/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb new file mode 100644 index 0000000000..597536570d --- /dev/null +++ b/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb | |||
@@ -0,0 +1,71 @@ | |||
1 | SUMMARY = "Base utilities for working with SGML and XML" | ||
2 | DESCRIPTION = "The sgml-common package gathers very basic \ | ||
3 | stuff necessary to work with SGML and XML, such as xml.dcl, \ | ||
4 | a SGML declaration of XML; iso-entities, a list of the basic \ | ||
5 | SGML ISO entities; and install-catalog, a script used to \ | ||
6 | add entries to (or remove entries from) centralized catalogs \ | ||
7 | whose entries are pointers to SGML open catalogs, \ | ||
8 | as defined by OASIS." | ||
9 | HOMEPAGE = "http://sources.redhat.com/docbook-tools/" | ||
10 | LICENSE = "GPLv2+" | ||
11 | # See the comments in license.patch when upgrading this recipe. | ||
12 | # This is inteded to be a temporary workaround. | ||
13 | LIC_FILES_CHKSUM = "file://LICENSE-GPLv2;md5=ab8a50abe86dfc859e148baae043c89b" | ||
14 | SECTION = "base" | ||
15 | |||
16 | PR = "r1" | ||
17 | |||
18 | require sgml-common_${PV}.bb | ||
19 | inherit native | ||
20 | |||
21 | S = "${WORKDIR}/sgml-common-${PV}" | ||
22 | |||
23 | SYSROOT_PREPROCESS_FUNCS += "sgml_common_native_mangle" | ||
24 | SSTATEPOSTINSTFUNCS += "sgml_common_sstate_postinst" | ||
25 | CLEANFUNCS += "sgml_common_sstate_clean" | ||
26 | |||
27 | |||
28 | do_install_append() { | ||
29 | # install-catalog script contains hard-coded references to | ||
30 | # {sysconfdir}. Change it to ${D}${sysconfdir}. | ||
31 | sed -i -e "s|${sysconfdir}/sgml|${D}${sysconfdir}/sgml|g" ${D}${bindir}/install-catalog | ||
32 | |||
33 | ${D}${bindir}/install-catalog \ | ||
34 | --add ${D}${sysconfdir}/sgml/sgml-ent.cat \ | ||
35 | ${D}${datadir}/sgml/sgml-iso-entities-8879.1986/catalog | ||
36 | |||
37 | # The sgml-docbook.cat will be regenerated by sstate_postinst | ||
38 | rm -f ${D}${sysconfdir}/sgml/sgml-docbook.cat | ||
39 | } | ||
40 | |||
41 | sgml_common_native_mangle () { | ||
42 | # Revert back to ${sysconfdir} path in install-catalog | ||
43 | sed -i -e "s|${D}${sysconfdir}/sgml|${sysconfdir}/sgml|g" ${SYSROOT_DESTDIR}${STAGING_BINDIR}/install-catalog | ||
44 | # Change path from ${D}${datadir}/sgml/sgml-iso-entities-8879.1986/catalog to ${datadir}/sgml/sgml-iso-entities-8879.1986/catalog in sgml-ent.cat | ||
45 | sed -i -e "s|${D}${datadir}/sgml/sgml-iso-entities-8879.1986/catalog|${datadir}/sgml/sgml-iso-entities-8879.1986/catalog|g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/sgml-ent.cat | ||
46 | # Remove ${D} path from catalog file created by install-catalog script | ||
47 | sed -i -e "s|${D}||g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/catalog | ||
48 | } | ||
49 | |||
50 | sgml_common_sstate_postinst() { | ||
51 | if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] | ||
52 | then | ||
53 | ${bindir}/install-catalog --add ${sysconfdir}/sgml/sgml-docbook.cat ${sysconfdir}/sgml/sgml-ent.cat | ||
54 | if [ -e ${sysconfdir}/sgml/sgml-docbook.bak ]; then | ||
55 | for catalog in `awk '{print $2}' ${sysconfdir}/sgml/sgml-docbook.bak`; do | ||
56 | if [ ! `grep $catalog ${sysconfdir}/sgml/sgml-docbook.cat 1> /dev/null 2>&1` ]; then | ||
57 | ${bindir}/install-catalog \ | ||
58 | --add ${sysconfdir}/sgml/sgml-docbook.cat $catalog | ||
59 | fi | ||
60 | done | ||
61 | fi | ||
62 | fi | ||
63 | } | ||
64 | |||
65 | sgml_common_sstate_clean () { | ||
66 | # Ensure that the catalog file sgml-docbook.cat is properly | ||
67 | # updated when the package is removed from sstate cache. | ||
68 | if [ -f ${sysconfdir}/sgml/sgml-docbook.cat ]; then | ||
69 | sed -i '/\/sgml\/sgml-ent.cat/d' ${sysconfdir}/sgml/sgml-docbook.cat | ||
70 | fi | ||
71 | } | ||