Package: audiotools / 3.1.1-1.1

reproducible-build.patch Patch series | download
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
Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Last-Update: 2016-08-03

--- audiotools-3.1.1.orig/docs/manpagexml.py
+++ audiotools-3.1.1/docs/manpagexml.py
@@ -17,6 +17,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
+import os
 import re
 import time
 from sys import version_info
@@ -181,12 +182,14 @@ class Manpage:
                    examples=examples)
 
     def to_man(self, stream):
+        curdate = time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH',
+                                                 time.time())))
         write_u(stream,
                 (u".TH \"%(utility)s\" %(section)d " +
                  u"\"%(date)s\" \"\" \"%(title)s\"\n") %
                 {"utility": self.utility.upper(),
                  "section": self.section,
-                 "date": time.strftime("%B %Y", time.localtime()),
+                 "date": time.strftime("%F", curdate),
                  "title": self.title})
         write_u(stream, u".SH NAME\n")
         write_u(stream, u"%(utility)s \\- %(name)s\n" %