Accepting request 1203014 from Java:packages
Use SOURCE_DATE_EPOCH for reproducible jar mtime OBS-URL: https://build.opensuse.org/request/show/1203014 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rhino?expand=0&rev=40
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 24 14:11:16 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Use SOURCE_DATE_EPOCH for reproducible jar mtime
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 16 13:46:09 UTC 2024 - Gus Kenion <gus.kenion@suse.com>
|
||||
|
||||
|
18
rhino.spec
18
rhino.spec
@@ -33,7 +33,7 @@ Source10: %{name}-build.xml
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: javapackages-local >= 6
|
||||
Requires: javapackages-tools
|
||||
BuildArch: noarch
|
||||
|
||||
@@ -72,10 +72,6 @@ API documentation for %{name}.
|
||||
%prep
|
||||
%setup -q -n %{name}-Rhino%{scm_version}_Release
|
||||
cp %{SOURCE10} build.xml
|
||||
cp %{SOURCE1} pom.xml
|
||||
cp %{SOURCE2} pom-engine.xml
|
||||
cp %{SOURCE3} pom-runtime.xml
|
||||
%pom_remove_parent pom.xml pom-engine.xml pom-runtime.xml
|
||||
|
||||
%build
|
||||
%{ant} jar javadoc
|
||||
@@ -85,7 +81,11 @@ pushd examples
|
||||
export CLASSPATH=../target/%{name}-%{version}.jar
|
||||
SOURCEPATH=../src
|
||||
%javac -sourcepath ${SOURCEPATH} -source 8 -target 8 *.java
|
||||
%jar cvf ../target/%{name}-examples-%{version}.jar *.class
|
||||
%jar --create --verbose \
|
||||
%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
|
||||
--file=../target/%{name}-examples-%{version}.jar *.class
|
||||
|
||||
popd
|
||||
|
||||
@@ -104,11 +104,11 @@ install -pm 0644 target/%{name}-runtime-%{version}.jar %{buildroot}%{_javadir}/%
|
||||
|
||||
# pom
|
||||
install -dm 0755 %{buildroot}%{_mavenpomdir}
|
||||
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
||||
%{mvn_install_pom} %{SOURCE1} %{buildroot}%{_mavenpomdir}/%{name}.pom
|
||||
%add_maven_depmap %{name}.pom %{name}.jar -a "rhino:js"
|
||||
install -pm 0644 pom-engine.xml %{buildroot}%{_mavenpomdir}/%{name}-engine.pom
|
||||
%{mvn_install_pom} %{SOURCE2} %{buildroot}%{_mavenpomdir}/%{name}-engine.pom
|
||||
%add_maven_depmap %{name}-engine.pom %{name}-engine.jar -f engine
|
||||
install -pm 0644 pom-runtime.xml %{buildroot}%{_mavenpomdir}/%{name}-runtime.pom
|
||||
%{mvn_install_pom} %{SOURCE3} %{buildroot}%{_mavenpomdir}/%{name}-runtime.pom
|
||||
%add_maven_depmap %{name}-runtime.pom %{name}-runtime.jar -f runtime
|
||||
|
||||
# javadoc
|
||||
|
Reference in New Issue
Block a user