summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb')
-rw-r--r--meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb68
1 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb b/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb
new file mode 100644
index 0000000..461b48f
--- /dev/null
+++ b/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb
@@ -0,0 +1,68 @@
1SUMMARY = "DSSSL stylesheets used to transform SGML and XML DocBook files"
2HOMEPAGE = "http://docbook.sourceforge.net"
3# Simple persmissive
4LICENSE = "DSSSL"
5LIC_FILES_CHKSUM = "file://README;beginline=41;endline=74;md5=875385159b2ee76ecf56136ae7f542d6"
6
7DEPENDS = "sgml-common-native"
8
9PR = "r4"
10
11SRC_URI = "${SOURCEFORGE_MIRROR}/docbook/docbook-dsssl-${PV}.tar.bz2"
12
13SRC_URI[md5sum] = "bc192d23266b9a664ca0aba4a7794c7c"
14SRC_URI[sha256sum] = "2f329e120bee9ef42fbdd74ddd60e05e49786c5a7953a0ff4c680ae6bdf0e2bc"
15
16S = "${WORKDIR}/docbook-dsssl-${PV}"
17
18inherit native
19
20SSTATEPOSTINSTFUNCS += "docbook_dsssl_stylesheets_sstate_postinst"
21SYSROOT_PREPROCESS_FUNCS += "docbook_dsssl_sysroot_preprocess"
22CLEANFUNCS += "docbook_dsssl_stylesheets_sstate_clean"
23
24
25do_install () {
26 # Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-dsssl.html
27 # for details.
28 install -d ${D}${bindir}
29 install -m 0755 bin/collateindex.pl ${D}${bindir}
30
31 install -d ${D}${datadir}/sgml/docbook/dsssl-stylesheets-${PV}
32 install -m 0644 catalog ${D}${datadir}/sgml/docbook/dsssl-stylesheets-${PV}
33 cp -v -R * ${D}${datadir}/sgml/docbook/dsssl-stylesheets-${PV}
34
35 install -d ${D}${sysconfdir}/sgml
36 echo "CATALOG ${datadir}/sgml/docbook/dsssl-stylesheets-${PV}/catalog" > \
37 ${D}${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
38 echo "CATALOG ${datadir}/sgml/docbook/dsssl-stylesheets-${PV}/common/catalog" >> \
39 ${D}${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
40}
41
42docbook_dsssl_stylesheets_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-dsssl \
48 --add ${sysconfdir}/sgml/sgml-docbook.bak \
49 ${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
50 ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-dsssl \
51 --add ${sysconfdir}/sgml/sgml-docbook.cat \
52 ${sysconfdir}/sgml/dsssl-docbook-stylesheets.cat
53 fi
54}
55
56docbook_dsssl_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-dsssl
59}
60
61docbook_dsssl_stylesheets_sstate_clean () {
62 # Ensure that the catalog file sgml-docbook.cat is properly
63 # updated when the package is removed from sstate cache.
64 files="${sysconfdir}/sgml/sgml-docbook.bak ${sysconfdir}/sgml/sgml-docbook.cat"
65 for f in $files; do
66 [ ! -f $f ] || sed -i '/\/sgml\/dsssl-docbook-stylesheets.cat/d' $f
67 done
68}