@@ -3,7 +3,7 @@ Distribution: Azure Linux
33#
44# spec file for package objenesis
55#
6- # Copyright (c) 2019 SUSE LLC
6+ # Copyright (c) 2024 SUSE LLC
77# Copyright (c) 2000-2009, JPackage Project
88#
99# All modifications and additions to the file contributed by third parties
@@ -19,13 +19,14 @@ Distribution: Azure Linux
1919#
2020
2121Name: objenesis
22- Version: 3.1
23- Release: 3 %{?dist }
22+ Version: 3.3
23+ Release: 1 %{?dist }
2424Summary: A library for instantiating Java objects
2525License: Apache-2.0
2626Group: Development/Libraries/Java
27- URL: http://objenesis.org/
28- Source0: https://github.com/easymock/%{name }/archive/%{version }.tar.gz#/%{name}-%{version}.tar.gz
27+ URL: https://objenesis.org/
28+ Source0: https://github.com/easymock/%{name }/archive/refs/tags/%{version }.tar.gz#/%{name}-%{version}.tar.gz
29+ Patch0: objenesis-javadoc.patch
2930BuildRequires: fdupes
3031BuildRequires: java-devel >= 1.8
3132BuildRequires: javapackages-local -bootstrap
@@ -61,28 +62,23 @@ This package contains the API documentation for %{name}.
6162
6263%prep
6364%setup -q
65+ %patch -P 0 -p1
6466
6567# Enable generation of pom.properties (rhbz#1017850)
6668%pom_xpath_remove pom:addMavenDescriptor
6769
68- %pom_remove_plugin :maven-timestamp-plugin
69- %pom_xpath_remove "pom:dependency[pom:scope= 'test']" tck
70-
71- %pom_xpath_remove pom:build/pom:extensions
72-
73- for i in main tck; do
74- %pom_remove_parent ${i}
75- %pom_xpath_inject "pom:project" "< groupId> org.objenesis< /groupId>< version> %{version }< /version> " ${i}
76- done
77-
7870%build
7971mkdir -p main/build/classes
8072javac -d main/build/classes -source 8 -target 8 -encoding utf-8 \
8173 $( find main/src/main/java -name * .java | xargs)
82- jar cf %{name }-%{version }.jar -C main/build/classes .
74+ jar \
75+ %if %{? pkg_vcmp:%pkg_vcmp java-devel > = 17}%{!?pkg_vcmp:0 }
76+ --date=" $( date -u -d @${SOURCE_DATE_EPOCH:- $(date +%% s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) " \
77+ %endif
78+ --create --file=%{name }-%{version }.jar -C main/build/classes .
8379
8480touch manifest.txt
85- echo "Automatic-Module-Name: org.objenesis" >> manifest.txt
81+ echo "Automatic-Module-Name: org.objenesis" >> manifest.txt
8682echo "Bundle-Description: A library for instantiating Java objects" >> manifest.txt
8783echo "Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt" >> manifest.txt
8884echo "Bundle-Name: Objenesis" >> manifest.txt
@@ -102,15 +98,31 @@ echo "Import-Package: sun.misc;resolution:=optional,\
10298COM.newmonics.PercClassloader;resolution:= optional,\
10399sun.reflect;resolution:= optional" | sed 's/.\{71\}/&\n /g' >> manifest.txt
104100echo "Require-Capability: osgi.ee;filter:= \"(&(osgi.ee= JavaSE)(version= 1.6))\"" >> manifest.txt
105- jar ufm %{name }-%{version }.jar manifest.txt
101+ jar \
102+ %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0 }
103+ --date= "$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s )} +%%Y -%%m -%%dT %%H: %%M: %%SZ )" \
104+ %endif
105+ --update --file= %{name }-%{version }.jar --manifest= manifest.txt
106106
107107mkdir -p tck/build/classes
108108javac -d tck/build/classes -source 8 -target 8 -encoding utf-8 \
109109 -cp %{name }-%{version }.jar \
110110 $(find tck/src/main/java -name *.java | xargs)
111- jar cf %{name }-tck-%{version }.jar -C tck/build/classes .
112- jar uf %{name }-tck-%{version }.jar -C tck/src/main/resources .
113- jar ufe %{name }-tck-%{version }.jar org.objenesis.tck.Main
111+ jar \
112+ %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0 }
113+ --date= "$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s )} +%%Y -%%m -%%dT %%H: %%M: %%SZ )" \
114+ %endif
115+ --create --file= %{name }-tck-%{version }.jar -C tck/build/classes .
116+ jar \
117+ %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0 }
118+ --date= "$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s )} +%%Y -%%m -%%dT %%H: %%M: %%SZ )" \
119+ %endif
120+ --update --file= %{name }-tck-%{version }.jar -C tck/src/main/resources .
121+ jar \
122+ %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0 }
123+ --date= "$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s )} +%%Y -%%m -%%dT %%H: %%M: %%SZ )" \
124+ %endif
125+ --update --file= %{name }-tck-%{version }.jar --main-class= org.objenesis.tck.Main
114126
115127mkdir -p build/apidoc
116128javadoc -d build/apidoc -source 8 -encoding utf-8 -notimestamp \
@@ -143,20 +155,28 @@ cp -aL build/apidoc/* %{buildroot}%{_javadocdir}/%{name}
143155%{_javadocdir }/%{name }
144156
145157%changelog
146- * Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.1-3
147- - Reverting versioning change to match the upstream's schema.
148-
149- * Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.1.0-2
150- - Converting the 'Release' tag to the '[number].[distribution]' format.
151-
152- * Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.1.0-1.6
153- - Switching to always using full version.
154-
155- * Fri Nov 20 2020 Ruying Chen <v-ruyche@microsoft.com> - 3.1-1.5
156- - Initial CBL-Mariner import from openSUSE Tumbleweed (license: same as "License" tag).
158+ * Wed May 07 2025 Aninda Pradhan <v-anipradhan@microsoft.com> - 3.3-1
159+ - Initial Azure Linux import from openSUSE Tumbleweed (license: same as "License" tag).
157160- Use javapackages-local-bootstrap to avoid build cycle.
158- - Fix line break in sed commands.
159-
161+ - License Verified.
162+
163+ * Tue Sep 24 2024 Fridrich Strba <fstrba@suse.com>
164+ - Use SOURCE_DATE_EPOCH for reproducible jar mtime
165+ * Wed Feb 21 2024 Fridrich Strba <fstrba@suse.com>
166+ - Use %%patch -P N instead of deprecated %%patchN.
167+ * Tue Dec 5 2023 Andrea Manzini <andrea.manzini@suse.com>
168+ - update to upstream version 3.3
169+ * org.objenesis:objenesis-test missing in Maven Central (#85)
170+ * added instructions for running Android TCK for Windows users (#84)
171+ * Copyright and Owner is missing in license (#83)
172+ - update to upstream version 3.2
173+ * Add Dependencies Manifest Entry (#81)
174+ * Objenesis can't be compiled on Android SDK < 26 (#79)
175+ * PercClassLoader misspelled in pom.xml (#76)
176+ * Sat Mar 19 2022 Fridrich Strba <fstrba@suse.com>
177+ - Added patch:
178+ * objenesis-javadoc.patch
179+ + fix build with javadoc 17
160180* Fri Nov 29 2019 Fridrich Strba <fstrba@suse.com>
161181- Upgrade to upstream version 3.1
162182- Do not force building with java-devel < 9
0 commit comments