diff options
author | Bernhard M. Wiedemann <bwiedemann@suse.de> | 2021-05-09 15:09:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-09 15:09:15 +0200 |
commit | 0663544be8a0e0ea644655b736f9b0a47453c105 (patch) | |
tree | 4982e16d724ff7771bb3652c4e6ac4373cfc11cf /configure.seed | |
parent | ae2470fad40d1865c6fd17f686f43555cc47b92b (diff) |
Allow to override build date with SOURCE_DATE_EPOCH (#1176)
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
Diffstat (limited to 'configure.seed')
-rw-r--r-- | configure.seed | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.seed b/configure.seed index ef84661a2..ef966353d 100644 --- a/configure.seed +++ b/configure.seed @@ -76,7 +76,10 @@ if test -d ".git" || test -f ".git" ; then : else GIT_RELEASE="${PACKAGE_VERSION}" GIT_DATE=`date -u -r CHANGELOG.md` - NDPI_API_VERSION=`date +%s | cut -c7-10` + if test -z "$SOURCE_DATE_EPOCH" ; then : + SOURCE_DATE_EPOCH=`date +%s` + fi + NDPI_API_VERSION=`echo $SOURCE_DATE_EPOCH | cut -c7-10` fi NDPI_API_VERSION=`echo $NDPI_API_VERSION | sed 's/^0*//'` |