chiark / gitweb /
spec: Generate printable file as pdf via docbook
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 29 Dec 2021 15:11:53 +0000 (15:11 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 29 Dec 2021 18:34:56 +0000 (18:34 +0000)
Prompted by the desire to make the build reproducible, which seems
unreasonably hard with debiandoc2ps.

This approach was suggested here as a workaround for another bug:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=285885#35

At some point we may want to do a one-off source conversion to
DocBook.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
.gitignore
INSTALL
Makefile.in
debian/control

index abef7d42cbeb7bf45e61529dd0b0e3e2595a6d06..3f7ca3ea8422dc9118f299ef697361d34b844ce5 100644 (file)
@@ -32,6 +32,7 @@ userv-*.tar.gz
 build
 build-arch
 
+spec.dbk
 spec.tex
 spec.html
-spec.ps
+spec.pdf
diff --git a/INSTALL b/INSTALL
index 2b9d22bead79a59940801b1cfa2513a787e4eccc..dafa9db3892b9cb1f7deff38e6a029a6550544d9 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -65,7 +65,7 @@ System interfaces:
 To format the documentation:
 
 * debiandoc-sgml, and hence sp (aka nsgmls) and sgmlspm.
-* For PostScript output, Lout and possibly psutils.
+* For PostScript output, dblatex and XeTeX.
 
 For debugging version (./configure --enable-debug):
 
index ec58cd519200b899512d8a39c6e18212cb353a79..ff97e120ab5ff70e9735e32e8d320b117e3aeac7 100644 (file)
@@ -53,7 +53,7 @@ etcsubdir=$(etcdir)/userv
 docdir=$(share_prefix)/doc/userv
 
 TARGETS=       daemon client
-TARGETS_DOC_PS=        spec.ps overview.ps
+TARGETS_DOC_PS=        spec.pdf overview.ps
 TARGETS_DOC_RM=        $(TARGETS_DOC_PS) spec.html
 TARGETS_DOC=   $(TARGETS_DOC_PS) spec.html/index.html
 MAN1PAGES=     userv.1
@@ -195,11 +195,15 @@ dist:                     dist-prep distclean
 linecount:     $(SOURCES)
                wc -l $^
 
+%.dbk:         %.sgml
+               debiandoc2dbk -1 $<
+
 %.html/index.html:     %.sgml
                        debiandoc2html $<
 
-%.ps:          %.sgml
-               debiandoc2ps -1 -O $< >$@.new && mv $@.new $@
+%.pdf:         %.dbk
+               dblatex -b xetex $<
+               mv -f $<.pdf $@
 
 %.ps:          %.fig
                fig2dev -L ps -c -l dummy -P -z A4 $< >$@.new && mv $@.new $@
index b1bd061fa091580691d5bb6ed0e9de86f6eb9803..44d138be25d8906b69a78e51765bf6c5bf071af4 100644 (file)
@@ -2,7 +2,7 @@ Source: userv
 Section: admin
 Priority: optional
 Maintainer: Ian Jackson <ijackson@chiark.greenend.org.uk>
-Build-Depends: debiandoc-sgml, transfig, texlive, texlive-latex-extra, debhelper (>= 5)
+Build-Depends: debiandoc-sgml, transfig, dblatex, texlive-xetex, debhelper (>= 5)
 Standards-Version: 3.9.1
 
 Package: userv