Accepting request 1203017 from Java:packages

Use SOURCE_DATE_EPOCH for reproducible jar mtime

OBS-URL: https://build.opensuse.org/request/show/1203017
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/scala-ant?expand=0&rev=3
This commit is contained in:
Ana Guerrero 2024-09-25 19:53:17 +00:00 committed by Git OBS Bridge
commit f054163dae
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Sep 24 13:37:40 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Use SOURCE_DATE_EPOCH for reproducible jar mtime
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Feb 21 20:51:04 UTC 2024 - Fridrich Strba <fstrba@suse.com> Wed Feb 21 20:51:04 UTC 2024 - Fridrich Strba <fstrba@suse.com>

View File

@ -47,7 +47,11 @@ mkdir -p target/classes
scalac -release 8 -d target/classes -cp $(build-classpath ant scala) \ scalac -release 8 -d target/classes -cp $(build-classpath ant scala) \
$(find src/main -name \*.scala | xargs) $(find src/main -name \*.scala | xargs)
jar -cf target/%{name}-%{version}.jar -C target/classes . -C src/main/resources . 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=target/%{name}-%{version}.jar -C target/classes . -C src/main/resources .
%install %install
install -d -m 0755 %{buildroot}%{_javadir}/scala install -d -m 0755 %{buildroot}%{_javadir}/scala