diff --git a/antlr-bootstrap.changes b/antlr-bootstrap.changes index 632f04a..7623cea 100644 --- a/antlr-bootstrap.changes +++ b/antlr-bootstrap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 1 08:04:27 UTC 2024 - Fridrich Strba + +- Use SOURCE_DATE_EPOCH for reproducible builds + ------------------------------------------------------------------- Tue Oct 17 11:07:22 UTC 2023 - Fridrich Strba diff --git a/antlr-bootstrap.spec b/antlr-bootstrap.spec index c3913ea..bcbdbeb 100644 --- a/antlr-bootstrap.spec +++ b/antlr-bootstrap.spec @@ -82,8 +82,13 @@ function compileFiles() { # PARAM#1: name of jar archive (without .jar suffix) # uses $TARGET_DIR to move created jar to function mkJar() { - find -name "version.txt" -or -name "*.class" -or -name "*.properties" -or -name "*.rsc" -or -name "*manifest*" |\ - xargs jar cfm ${1}.jar manifest.* ; + jar \ +%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0} + --date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \ +%endif + --create --file=${1}.jar --manifest=$(ls manifest.*) \ + $(find -name "version.txt" -or -name "*.class" -or -name "*.properties" -or -name "*.rsc" |\ + xargs) ; mv ${1}.jar $TARGET_DIR } COMPILER_COMMAND="javac -source 8 -target 8 -cp "