From 44f560b88bed74330667d6888922a709367d7c5e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 29 Dec 2021 15:11:53 +0000 Subject: [PATCH] spec: Generate printable file as pdf via docbook 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 --- .gitignore | 3 ++- INSTALL | 2 +- Makefile.in | 10 +++++++--- debian/control | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index abef7d4..3f7ca3e 100644 --- a/.gitignore +++ b/.gitignore @@ -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 2b9d22b..dafa9db 100644 --- 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): diff --git a/Makefile.in b/Makefile.in index ec58cd5..ff97e12 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 $@ diff --git a/debian/control b/debian/control index b1bd061..44d138b 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: userv Section: admin Priority: optional Maintainer: Ian Jackson -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 -- 2.30.2