summaryrefslogtreecommitdiff
path: root/poky/bitbake/doc/tools
diff options
context:
space:
mode:
authorDave Cobbley <david.j.cobbley@linux.intel.com>2018-08-14 20:05:37 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-23 04:26:31 +0300
commiteb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch)
treede291a73dc37168da6370e2cf16c347d1eba9df8 /poky/bitbake/doc/tools
parent9c3cf826d853102535ead04cebc2d6023eff3032 (diff)
downloadopenbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/bitbake/doc/tools')
-rwxr-xr-xpoky/bitbake/doc/tools/docbook-to-pdf51
1 files changed, 51 insertions, 0 deletions
diff --git a/poky/bitbake/doc/tools/docbook-to-pdf b/poky/bitbake/doc/tools/docbook-to-pdf
new file mode 100755
index 000000000..558ded9e0
--- /dev/null
+++ b/poky/bitbake/doc/tools/docbook-to-pdf
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+if [ -z "$1" -o -z "$2" ]; then
+ echo "usage: [-v] $0 <docbook file> <templatedir>"
+ echo
+ echo "*NOTE* you need xsltproc, fop and nwalsh docbook stylesheets"
+ echo " installed for this to work!"
+ echo
+ exit 0
+fi
+
+FO=`echo $1 | sed s/.xml/.fo/` || exit 1
+PDF=`echo $1 | sed s/.xml/.pdf/` || exit 1
+TEMPLATEDIR=$2
+
+##
+# These URI should be rewritten by your distribution's xml catalog to
+# match your localy installed XSL stylesheets.
+XSL_BASE_URI="http://docbook.sourceforge.net/release/xsl/current"
+
+# Creates a temporary XSL stylesheet based on titlepage.xsl
+xsltproc -o /tmp/titlepage.xsl \
+ --xinclude \
+ $XSL_BASE_URI/template/titlepage.xsl \
+ $TEMPLATEDIR/titlepage.templates.xml || exit 1
+
+# Creates the file needed for FOP
+xsltproc --xinclude \
+ --stringparam hyphenate false \
+ --stringparam formal.title.placement "figure after" \
+ --stringparam ulink.show 1 \
+ --stringparam body.font.master 9 \
+ --stringparam title.font.master 11 \
+ --stringparam draft.watermark.image "$TEMPLATEDIR/draft.png" \
+ --stringparam chapter.autolabel 1 \
+ --stringparam appendix.autolabel A \
+ --stringparam section.autolabel 1 \
+ --stringparam section.label.includes.component.label 1 \
+ --output $FO \
+ $TEMPLATEDIR/db-pdf.xsl \
+ $1 || exit 1
+
+# Invokes the Java version of FOP. Uses the additional configuration file common/fop-config.xml
+fop -c $TEMPLATEDIR/fop-config.xml -fo $FO -pdf $PDF || exit 1
+
+rm -f $FO
+rm -f /tmp/titlepage.xsl
+
+echo
+echo " #### Success! $PDF ready. ####"
+echo