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
|
From: Ryan Kavanagh <rak@debian.org>
Date: Thu, 25 Aug 2022 08:42:47 -0400
Subject: Do not embed build date in man pages
For reproducibility purposes, we don't want to implement the build-date
in man pages. Instead, pre-expand the variable Mdocdate to the package
source date.
Forwarded: not-needed
---
Makefile.gnu | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Makefile.gnu b/Makefile.gnu
index 1f97bd2..bd30513 100644
--- a/Makefile.gnu
+++ b/Makefile.gnu
@@ -56,8 +56,12 @@ MANPERM?= 644
ifeq (${MANFORMAT}, mangz)
TARGET_MAN= ${MAN}.gz
CLEANFILES+= ${TARGET_MAN}
+
+include /usr/share/dpkg/pkg-info.mk
+PKG_DATE_HUMAN=$(shell date +"%B %d, %Y" -d"@$(SOURCE_DATE_EPOCH)")
+
${TARGET_MAN}: ${MAN}
- mandoc -Tman ${MAN} | gzip > $@
+ sed -e 's_$$Mdocdate$$_$(PKG_DATE_HUMAN)_' ${MAN} | mandoc -Tman | gzip > $@
else
TARGET_MAN= ${MAN}
endif
|