File: debianization-documentation.patch

package info (click to toggle)
4ti2 1.6.9%2Bds-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 31,372 kB
  • sloc: cpp: 21,027; ansic: 3,894; makefile: 952; sh: 241; lisp: 97; sed: 16
file content (107 lines) | stat: -rw-r--r-- 2,854 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
Description: debianization: documentation
 Address Debian Policy requirements for documentation;
 in particular silently regenerate the documentation
 in native PDF format.
 This is a Debian centric patch.
Origin: debian
Forwarded: not-needed
Author: Jerome Benoit <calculus@rezozer.net>
Last-Update: 2018-05-04

--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,7 +1,35 @@
+export TEXINPUTS = $(abs_top_srcdir)/doc:$(abs_top_srcdir):
+export BIBINPUTS = $(abs_top_srcdir)/doc
+export BSTINPUTS = $(abs_top_srcdir)/doc
+
+DEB_PKG_DATE_LTXD = $(shell LC_ALL=C date -u -d "@$(SOURCE_DATE_EPOCH)" +"%B %d, %Y")
+
+BIBTEX = bibtex
+PDFLATEX = pdflatex
+
 docdir = $(pkgdatadir)/doc
 
 doc_DATA = 4ti2_manual.pdf
 
+PDFLATEX_FLAGS = \
+	-no-shell-escape \
+	-interaction=batchmode
+
+BIBTEX_FLAGS = \
+	-terse
+
+version.tex:
+	$(SED) \
+			-e 's/@[V]ERSION@/$(VERSION)/;s/@DEB_PKG_DATE_LTXD@/$(DEB_PKG_DATE_LTXD)/' \
+		$(srcdir)/version.tex.in > $(srcdir)/version.tex
+
+4ti2_manual.pdf: 4ti2_manual.tex version.tex
+	$(PDFLATEX) $(PDFLATEX_FLAGS) -jobname $(basename $(<F))-debian $<
+	$(BIBTEX) $(BIBTEX_FLAGS) $(basename $(<F))-debian
+	$(PDFLATEX) $(PDFLATEX_FLAGS) -jobname $(basename $(<F))-debian $<
+	$(PDFLATEX) $(PDFLATEX_FLAGS) -jobname $(basename $(<F))-debian $<
+	mv $(basename $(<F))-debian.pdf $@
+
 ## Manual sources.
 HELPFILES = output-help.txt gensymm-help.txt genmodel-help.txt ppi-help.txt \
 	hilbert-help.txt graver-help.txt zsolve-help.txt
@@ -51,9 +79,7 @@
 
 .PHONY: update-help update-manual 
 
-update-manual: update-help
-	$(SED) 's/@[V]ERSION@/$(VERSION)/;' $(srcdir)/version.tex.in > $(srcdir)/version.tex
-	-(cd $(srcdir) && pdflatex 4ti2_manual; pdflatex 4ti2_manual)
+update-manual: update-help 4ti2_manual.pdf
 
 PROGRAMS_WITH_HELP =				\
 	../src/util/gensymm			\
--- a/doc/4ti2_manual.tex
+++ b/doc/4ti2_manual.tex
@@ -113,7 +113,8 @@
 \author{A software package\\ for algebraic,
 geometric and combinatorial problems on linear spaces}
 %\date{May 19, 2015}
-\date{\today}
+%\date{\today}
+\date{\FourTiTwoDebianPackageDate}
 
 \maketitle
 
@@ -134,26 +135,26 @@
 \chapter{README: Instructions on configuring and building 4ti2}
 
 {\small
-\verbatiminput{../README}
+\verbatiminput{README}
 }
 
 \chapter{NEWS: Changes to 4ti2 since version 1.2}
 
 {\small
-\verbatiminput{../NEWS}
+\verbatiminput{NEWS}
 }
 
 \clearpage
 \addcontentsline{toc}{chapter}{AUTHORS: The 4ti2 team}
 \chapter*{AUTHORS: The 4ti2 team}
 
-\verbatiminput{../AUTHORS}
+\verbatiminput{AUTHORS}
 
 \clearpage
 \addcontentsline{toc}{chapter}{THANKS}
 \chapter*{THANKS}
 
-\verbatiminput{../THANKS}
+\verbatiminput{THANKS}
 
 \clearpage
 \addcontentsline{toc}{chapter}{Bibliography}
--- a/doc/version.tex.in
+++ b/doc/version.tex.in
@@ -1 +1,2 @@
+\newcommand\FourTiTwoDebianPackageDate{@DEB_PKG_DATE_LTXD@}
 \newcommand\FourTiTwoVersion{@VERSION@}