diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 591b010e..7de46fb7 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -683,6 +683,9 @@ create_srcpackage() { if [[ "$file" = "$(get_filename "$file")" ]] || (( SOURCEONLY == 2 )); then local absfile absfile=$(get_filepath "$file") || missing_source_file "$file" + if (( REPRODUCIBLE )); then + touch -d @$SOURCE_DATE_EPOCH "$absfile" + fi msg2 "$(gettext "Adding %s...")" "${absfile##*/}" ln -s "$absfile" "$srclinks/$pkgbase" fi @@ -724,6 +727,12 @@ create_srcpackage() { local fullver=$(get_full_version) local pkg_file="$SRCPKGDEST/${pkgbase}-${fullver}${SRCEXT}" + if (( REPRODUCIBLE )); then + # We have activated reproducible builds, so unify source times before + # building + find "${srclinks}/${pkgbase}" -exec touch -h -d @$SOURCE_DATE_EPOCH {} + + fi + # tar it up msg2 "$(gettext "Compressing source package...")" cd_safe "${srclinks}"