b5e49c48e7
This way we are compatible to the Debians proposal. See [1]. [1] https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02210.html
11 lines
437 B
Bash
11 lines
437 B
Bash
# If XBPS_USE_BUILD_MTIME is enabled in conf file don't continue.
|
|
# only run this, if SOURCE_DATE_EPOCH isn't set
|
|
if [ -z "$XBPS_USE_BUILD_MTIME" ] && [ -z "${SOURCE_DATE_EPOCH}" ]; then
|
|
if command -v chroot-git &>/dev/null; then
|
|
GIT_CMD=$(command -v chroot-git)
|
|
elif command -v git &>/dev/null; then
|
|
GIT_CMD=$(command -v git)
|
|
fi
|
|
export SOURCE_DATE_EPOCH="$($GIT_CMD -C ${XBPS_SRCPKGDIR}/${basepkg} log --pretty='%ct' -n1 .)"
|
|
fi
|