mirror of
https://github.com/stefanberger/libtpms
synced 2026-01-07 19:21:09 +00:00
man: make build reproducible via SOURCE_DATE_EPOCH
The manpages include the current build date, so they are not reproducible. If defined, use the SOURCE_DATE_EPOCH as defined here: https://reproducible-builds.org/docs/source-date-epoch/ Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
This commit is contained in:
parent
e96a61c1ef
commit
015a24a0d2
@ -60,10 +60,18 @@ man3_MANS_generated = \
|
||||
|
||||
man3_MANS += $(man3_MANS_generated)
|
||||
|
||||
# Ensure the build is reproducible, for details see:
|
||||
# https://reproducible-builds.org/docs/source-date-epoch/
|
||||
%.3 : %.pod
|
||||
@pod2man -r "libtpms" \
|
||||
@if test -n "$$SOURCE_DATE_EPOCH"; then \
|
||||
BUILD_DATE=$$(date +%F --utc --date="@$$SOURCE_DATE_EPOCH"); \
|
||||
else \
|
||||
BUILD_DATE=$$(date +%F); \
|
||||
fi; \
|
||||
pod2man -r "libtpms" \
|
||||
-c "" \
|
||||
-n $(basename $@) \
|
||||
--date="$$BUILD_DATE" \
|
||||
--section=3 $< > $@
|
||||
|
||||
EXTRA_DIST = $(man3_MANS) $(man3_PODS)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user