File: honour-source-date-epoch

package info (click to toggle)
asymptote 3.02%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 33,400 kB
  • sloc: cpp: 172,516; ansic: 69,728; python: 14,967; sh: 5,599; javascript: 4,866; lisp: 1,507; perl: 1,417; makefile: 1,028; yacc: 610; lex: 449; xml: 182; asm: 8
file content (35 lines) | stat: -rw-r--r-- 975 bytes parent folder | download | duplicates (2)
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
Description: Honour SOURCE_DATE_EPOCH.
 Honour the SOURCE_DATE_EPOCH environment variable to get documentation date
 from last debian changelog entry.
 This makes the build reproducible.
 See https://reproducible-builds.org/specs/source-date-epoch/.
Author: Alexis Bienvenüe <pado@passoire.fr>
Forwarded: no

---
 doc/FAQ/bfnnconv.pl |    2 ++
 doc/FAQ/m-lout.pl   |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

--- a/doc/FAQ/m-lout.pl
+++ b/doc/FAQ/m-lout.pl
@@ -23,7 +23,7 @@
 
 sub lout_init {
     open(LOUT,">$prefix.lout");
-    chop($dprint= `date '+%d %B %Y'`);
+    $dprint = time2str("%d %B %Y", $ENV{SOURCE_DATE_EPOCH} || time, "UTC");
     $dprint =~ s/^0//;
 }
 
--- a/doc/FAQ/bfnnconv.pl
+++ b/doc/FAQ/bfnnconv.pl
@@ -21,6 +21,8 @@
 # by the GPL.  However, I would appreciate it if you credited me if
 # appropriate in any documents you format using BFNN.)
 
+use Date::Format;
+
 @outputs=('ascii','info','html');
 
 while ($ARGV[0] =~ m/^\-/) {