summaryrefslogtreecommitdiff
path: root/debian/patches/0011-Set-CreationDate-explicitly-for-manual.tex-also.patch
blob: ebc1bdc079cd1616548b4bd836280ed914b9b7ea (plain)
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
From: Ruben Undheim <ruben.undheim@gmail.com>
Date: Sat, 14 Jul 2018 22:30:24 +0200
Subject: Set \CreationDate explicitly for manual.tex also

---
 Makefile         | 2 +-
 manual/manual.sh | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 53bab9b..78f0f58 100644
--- a/Makefile
+++ b/Makefile
@@ -465,7 +465,7 @@ update-manual: $(TARGETS) $(EXTRA_TARGETS)
 manual: $(TARGETS) $(EXTRA_TARGETS)
 	cd manual && bash appnotes.sh
 	cd manual && PDF_DATE=$(PDF_DATE) bash presentation.sh
-	cd manual && bash manual.sh
+	cd manual && PDF_DATE=$(PDF_DATE) bash manual.sh
 
 clean:
 	rm -rf share
diff --git a/manual/manual.sh b/manual/manual.sh
index c467393..4417f56 100755
--- a/manual/manual.sh
+++ b/manual/manual.sh
@@ -39,7 +39,7 @@ fi
 
 set -ex
 
-pdflatex $PDFTEX_OPT manual.tex
+pdflatex $PDFTEX_OPT '\pdfinfo{/CreationDate('${PDF_DATE}')/ModDate('${PDF_DATE}')}\input{manual.tex}'
 
 if ! $fast_mode; then
 	bibtex manual.aux
@@ -50,10 +50,12 @@ if ! $fast_mode; then
 		! cmp autoloop.old autoloop.new
 	do
 		cp autoloop.new autoloop.old
-		pdflatex $PDFTEX_OPT manual.tex
+        pdflatex $PDFTEX_OPT '\pdfinfo{/CreationDate('${PDF_DATE}')/ModDate('${PDF_DATE}')}\input{manual.tex}'
 	done
 
 	rm -f autoloop.old
 	rm -f autoloop.new
 fi
 
+grep -av '^/ID \[\(<[0-9A-F]\{32\}>\) \1]$' manual.pdf > manual.pdf.without_pdf_id
+mv -f manual.pdf.without_pdf_id manual.pdf