From 34983f84598f3b1f0ca2f1de237821693537647a Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 11 Feb 2014 00:30:05 +0100 Subject: [PATCH] Added support for PDF output --- doc/scripts/docbook.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/scripts/docbook.sh b/doc/scripts/docbook.sh index 941da7c..9e8ad1a 100755 --- a/doc/scripts/docbook.sh +++ b/doc/scripts/docbook.sh @@ -29,6 +29,7 @@ PREFIX="/usr/local" [ -f "../config.sh" ] && . "../config.sh" #executables DEBUG="_debug" +FOP="fop" INSTALL="install -m 0644" MKDIR="mkdir -m 0755 -p" RM="rm -f" @@ -58,6 +59,13 @@ _docbook() [ -f "${target%.*}.xsl" ] && XSL="${target%.*}.xsl" $DEBUG $XSLTPROC -o "$target" "$XSL" "$source" ;; + pdf) + XSL="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl" + [ -f "${target%.*}.xsl" ] && XSL="${target%.*}.xsl" + $DEBUG $XSLTPROC -o "${target%.*}.fo" "$XSL" "$source" && + $DEBUG $FOP -fo "${target%.*}.fo" -pdf "$target" + $RM -- "${target%.*}.fo" + ;; 1|2|3|4|5|6|7|8|9) XSL="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" $DEBUG $XSLTPROC -o "$target" "$XSL" "$source" @@ -141,7 +149,7 @@ while [ $# -gt 0 ]; do ext="${target##*.}" ext="${ext##.}" case "$ext" in - html) + html|pdf) instdir="$DATADIR/doc/$ext/$PACKAGE" ;; 1|2|3|4|5|6|7|8|9)