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
|
Description: Deterministically build crypt.pdf for multi-arch
Author: Michael Stapelberg <stapelberg@debian.org>
Forwarded: https://github.com/libtom/libtomcrypt/pull/33
Bug-Debian: http://bugs.debian.org/734109
Last-Updated: 2014-01-04
---
Index: libtomcrypt/makefile
===================================================================
--- libtomcrypt.orig/makefile 2014-01-04 16:26:09.001353782 +0100
+++ libtomcrypt/makefile 2014-01-04 16:26:57.328828492 +0100
@@ -355,14 +355,24 @@
#delete it if we are rebuilding it.
docs: crypt.tex
rm -f doc/crypt.pdf $(LEFTOVERS)
+ cp crypt.tex crypt.bak
+ touch --reference=crypt.tex crypt.bak
+ (echo "\\def\\fixedpdfdate{"; date +'D:%Y%m%d%H%M%S%:z' -d @$$(stat --format=%Y crypt.tex) | sed "s/:\([0-9][0-9]\)$$/'\1'}/g") > crypt-deterministic.tex
+ echo "\\pdfinfo{" >> crypt-deterministic.tex
+ echo "/CreationDate (\fixedpdfdate)" >> crypt-deterministic.tex
+ echo "/ModDate (\fixedpdfdate) }" >> crypt-deterministic.tex
+ cat crypt.tex >> crypt-deterministic.tex
+ mv crypt-deterministic.tex crypt.tex
+ touch --reference=crypt.bak crypt.tex
echo "hello" > crypt.ind
latex crypt
latex crypt
makeindex crypt.idx
perl fixupind.pl
- latex crypt
- dvipdf crypt
+ pdflatex crypt
+ sed -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' crypt.pdf
mv -ivf crypt.pdf doc/crypt.pdf
+ mv crypt.bak crypt.tex
rm -f $(LEFTOVERS)
docdvi: crypt.tex
|