aboutsummaryrefslogtreecommitdiff
path: root/common/hooks/pre-pkg
diff options
context:
space:
mode:
authorEnno Boland <g@s01.de>2016-03-01 17:27:16 +0000
committerEnno Boland <g@s01.de>2016-03-01 17:27:49 +0000
commitb5e49c48e74e0cdb77c14e55b97626e3131f3f9d (patch)
tree66b9390e520732ee73452b8bbafcd68f0f1d2b16 /common/hooks/pre-pkg
parent69cb0beb58322f33803060c3c123c55f61fb99a6 (diff)
downloadvoid-packages-b5e49c48e74e0cdb77c14e55b97626e3131f3f9d.tar
void-packages-b5e49c48e74e0cdb77c14e55b97626e3131f3f9d.tar.gz
void-packages-b5e49c48e74e0cdb77c14e55b97626e3131f3f9d.tar.bz2
void-packages-b5e49c48e74e0cdb77c14e55b97626e3131f3f9d.tar.lz
void-packages-b5e49c48e74e0cdb77c14e55b97626e3131f3f9d.tar.xz
void-packages-b5e49c48e74e0cdb77c14e55b97626e3131f3f9d.tar.zst
void-packages-b5e49c48e74e0cdb77c14e55b97626e3131f3f9d.zip
common: replace XBPS_COMMIT_TIMESTAMP by SOURCE_DATE_EPOCH
This way we are compatible to the Debians proposal. See [1]. [1] https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02210.html
Diffstat (limited to 'common/hooks/pre-pkg')
-rw-r--r--common/hooks/pre-pkg/90-set-timestamps.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/hooks/pre-pkg/90-set-timestamps.sh b/common/hooks/pre-pkg/90-set-timestamps.sh
index 67d8bf4cbc3..2113b029944 100644
--- a/common/hooks/pre-pkg/90-set-timestamps.sh
+++ b/common/hooks/pre-pkg/90-set-timestamps.sh
@@ -2,9 +2,9 @@
# - sets the timestamps in a package to the commit date
hook() {
- # If XBPS_COMMIT_TIMESTAMP is set, set mtimes to that timestamp.
- if [ -n "$XBPS_COMMIT_TIMESTAMP" ]; then
- msg_normal "$pkgver: setting mtimes to %s\n" "$(date --date "$XBPS_COMMIT_TIMESTAMP")"
- find $PKGDESTDIR -print0 | xargs -0 touch -h --date "$XBPS_COMMIT_TIMESTAMP"
+ # If SOURCE_DATE_EPOCH is set, set mtimes to that timestamp.
+ if [ -n "$SOURCE_DATE_EPOCH" ]; then
+ msg_normal "$pkgver: setting mtimes to %s\n" "$(date --date "@$SOURCE_DATE_EPOCH")"
+ find $PKGDESTDIR -print0 | xargs -0 touch -h --date "@$SOURCE_DATE_EPOCH"
fi
}