blob: f32cd1837003bed011b0060fd0ea41146fa62554 [file] [log] [blame]
William A. Kennington IIIac69b482021-06-02 12:28:27 -07001lsb-release maintains it's own copy of help2man. Include the support
2for specifying SOURCE_DATE_EPOCH from upstream.
3
4Upstream-Status: Pending
5
6Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
7
8diff --git a/help2man b/help2man
9index 13015c2..63439db 100755
10--- a/help2man
11+++ b/help2man
12@@ -173,7 +173,14 @@ my ($help_text, $version_text) = map {
13 or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
14 } qw(help), $opt_version_key;
15
16-my $date = strftime "%B %Y", localtime;
17+my $epoch_secs = time;
18+if (exists $ENV{SOURCE_DATE_EPOCH} and $ENV{SOURCE_DATE_EPOCH} =~ /^(\d+)$/)
19+{
20+ $epoch_secs = $1;
21+ $ENV{TZ} = 'UTC0';
22+}
23+
24+my $date = strftime "%B %Y", localtime $epoch_secs;
25 (my $program = $ARGV[0]) =~ s!.*/!!;
26 my $package = $program;
27 my $version;