Added support for PDF output

This commit is contained in:
Pierre Pronchery 2014-02-11 00:30:05 +01:00
parent bca292d049
commit 34983f8459

View File

@ -29,6 +29,7 @@ PREFIX="/usr/local"
[ -f "../config.sh" ] && . "../config.sh" [ -f "../config.sh" ] && . "../config.sh"
#executables #executables
DEBUG="_debug" DEBUG="_debug"
FOP="fop"
INSTALL="install -m 0644" INSTALL="install -m 0644"
MKDIR="mkdir -m 0755 -p" MKDIR="mkdir -m 0755 -p"
RM="rm -f" RM="rm -f"
@ -58,6 +59,13 @@ _docbook()
[ -f "${target%.*}.xsl" ] && XSL="${target%.*}.xsl" [ -f "${target%.*}.xsl" ] && XSL="${target%.*}.xsl"
$DEBUG $XSLTPROC -o "$target" "$XSL" "$source" $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) 1|2|3|4|5|6|7|8|9)
XSL="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" XSL="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
$DEBUG $XSLTPROC -o "$target" "$XSL" "$source" $DEBUG $XSLTPROC -o "$target" "$XSL" "$source"
@ -141,7 +149,7 @@ while [ $# -gt 0 ]; do
ext="${target##*.}" ext="${target##*.}"
ext="${ext##.}" ext="${ext##.}"
case "$ext" in case "$ext" in
html) html|pdf)
instdir="$DATADIR/doc/$ext/$PACKAGE" instdir="$DATADIR/doc/$ext/$PACKAGE"
;; ;;
1|2|3|4|5|6|7|8|9) 1|2|3|4|5|6|7|8|9)