1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Bug-Debian: https://bugs.debian.org/923169
Source: https://bugs.debian.org/923169;msg=5
Last-Update: 2019-02-24
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,11 @@
lib/query_lexer.js \
lib/query_parser.js \
+ifdef SOURCE_DATE_EPOCH
+YEAR = $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" +%Y 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" +%Y 2>/dev/null || date -u +%Y)
+else
YEAR = $(shell date +%Y)
+endif
VERSION = $(shell cat VERSION)
NODE ?= $(shell which node)
|