/[packages]/updates/8/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
ViewVC logotype

Contents of /updates/8/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1183466 - (show annotations) (download)
Tue Dec 19 13:53:03 2017 UTC (6 years, 4 months ago) by ns80
Original Path: cauldron/java-1.8.0-openjdk/current/SPECS/java-1.8.0-openjdk.spec
File size: 76572 byte(s)
- SILENT: correct macro definition

1 # note, parametrised macros are order-senisitve (unlike not-parametrized) even with normal macros
2 # also necessary when passing it as parameter other macros. If not macro, then it is considered as switch
3 %global debug_suffix_unquoted -debug
4 # quoted one for shell operations
5 %global debug_suffix "%{debug_suffix_unquoted}"
6 %global normal_suffix ""
7
8 #if you wont only debug build, but providing java, build only normal build, but set normalbuild_parameter
9 %global debugbuild_parameter slowdebug
10 %global normalbuild_parameter release
11 %global debug_warning This package have full debug on. Install only in need, and remove asap.
12 %global debug_on with full debug on
13 %global for_debug for packages with debug on
14
15 # by default we build normal build always.
16 %global include_normal_build 1
17 %if %{include_normal_build}
18 %global build_loop1 %{normal_suffix}
19 %else
20 %global build_loop1 %{nil}
21 %endif
22
23 %global aarch64 aarch64 arm64 armv8
24 # sometimes we need to distinguish big and little endian PPC64
25 %global ppc64le ppc64le
26 %global ppc64be ppc64 ppc64p7
27 %global multilib_arches %{power64} sparc64 x86_64
28 %global jit_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64}
29
30 # By default, we build a debug build during main build on JIT architectures
31 %ifarch %{jit_arches}
32 %global include_debug_build 0
33 %else
34 %global include_debug_build 0
35 %endif
36
37 # On x86_64 and AArch64, we use the Shenandoah HotSpot
38 %ifarch x86_64 %{aarch64}
39 %global use_shenandoah_hotspot 1
40 %else
41 %global use_shenandoah_hotspot 0
42 %endif
43
44 %if %{include_debug_build}
45 %global build_loop2 %{debug_suffix}
46 %else
47 %global build_loop2 %{nil}
48 %endif
49
50 # if you disable both builds, then build fails
51 %global build_loop %{build_loop1} %{build_loop2}
52 # note, that order normal_suffix debug_suffix, in case of both enabled,
53 # is expected in one single case at the end of build
54 %global rev_build_loop %{build_loop2} %{build_loop1}
55
56 %ifarch %{jit_arches}
57 %global bootstrap_build 1
58 %else
59 %global bootstrap_build 1
60 %endif
61
62 %if %{bootstrap_build}
63 %global targets bootcycle-images docs
64 %else
65 %global targets all
66 %endif
67
68 %ifnarch %{jit_arches}
69 # Disable hardened build on non-jit arches. Work-around for RHBZ#1290936.
70 %undefine _hardened_build
71 %global ourcppflags %{nil}
72 %global ourldflags %{nil}
73 %else
74 %ifarch %{aarch64}
75 # Disable hardened build on AArch64 as it didn't bootcycle
76 %undefine _hardened_build
77 %global ourcppflags "-fstack-protector-strong"
78 %global ourldflags %{nil}
79 %else
80 # Filter out flags from the optflags macro that cause problems with the OpenJDK build
81 # We filter out -O flags so that the optimisation of HotSpot is not lowered from O3 to O2
82 # We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
83 # We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings
84 # We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++
85 %global ourflags %(echo %optflags | sed -e 's|-Wformat|-Wformat -Wno-cpp|')
86 %global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')
87 %global ourldflags %(echo %{ldflags} | sed -e 's|-Wl,--no-undefined||')
88 %endif
89 %endif
90
91 # With diabled nss is NSS deactivated, so in NSS_LIBDIR can be wrong path
92 # the initialisation must be here. LAter the pkg-connfig have bugy behaviour
93 #looks liekopenjdk RPM specific bug
94 # Always set this so the nss.cfg file is not broken
95 %global NSS_LIBDIR %(pkg-config --variable=libdir nss)
96
97 # fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
98 %global _privatelibs libmawt[.]so.*
99 %global __provides_exclude ^(%{_privatelibs})$
100 %global __requires_exclude ^(%{_privatelibs})$
101
102 # In some cases, the arch used by the JDK does
103 # not match _arch.
104 # Also, in some cases, the machine name used by SystemTap
105 # does not match that given by _build_cpu
106 %ifarch x86_64
107 %global archinstall amd64
108 %global stapinstall x86_64
109 %endif
110 %ifarch ppc
111 %global archinstall ppc
112 %global stapinstall powerpc
113 %endif
114 %ifarch %{ppc64be}
115 %global archinstall ppc64
116 %global stapinstall powerpc
117 %endif
118 %ifarch %{ppc64le}
119 %global archinstall ppc64le
120 %global stapinstall powerpc
121 %endif
122 %ifarch %{ix86}
123 %global archinstall i386
124 %global stapinstall i386
125 %endif
126 %ifarch ia64
127 %global archinstall ia64
128 %global stapinstall ia64
129 %endif
130 %ifarch s390
131 %global archinstall s390
132 %global stapinstall s390
133 %endif
134 %ifarch s390x
135 %global archinstall s390x
136 %global stapinstall s390
137 %endif
138 %ifarch %{arm}
139 %global archinstall arm
140 %global stapinstall arm
141 %endif
142 %ifarch %{aarch64}
143 %global archinstall aarch64
144 %global stapinstall arm64
145 %endif
146 # 32 bit sparc, optimized for v9
147 %ifarch sparcv9
148 %global archinstall sparc
149 %global stapinstall %{_build_cpu}
150 %endif
151 # 64 bit sparc
152 %ifarch sparc64
153 %global archinstall sparcv9
154 %global stapinstall %{_build_cpu}
155 %endif
156 %ifnarch %{jit_arches}
157 %global archinstall %{_arch}
158 %endif
159
160 %ifarch %{jit_arches}
161 %global with_systemtap 1
162 %else
163 %global with_systemtap 0
164 %endif
165
166 %ifarch %{ix86} x86_64
167 # disable in mageia, packaged separately
168 %global with_openjfx_binding 0
169 %global openjfx_path %{_jvmdir}/openjfx
170 # links src directories
171 %global jfx_jre_libs_dir %{openjfx_path}/rt/lib
172 %global jfx_jre_native_dir %{jfx_jre_libs_dir}/%{archinstall}
173 %global jfx_sdk_libs_dir %{openjfx_path}/lib
174 %global jfx_sdk_bins_dir %{openjfx_path}/bin
175 %global jfx_jre_exts_dir %{jfx_jre_libs_dir}/ext
176 # links src files
177 # maybe depend on jfx and generate the lists in build time? Yes, bad idea to inlcude cyclic depndenci, but this list is aweful
178 %global jfx_jre_libs jfxswt.jar javafx.properties
179 %global jfx_jre_native libprism_es2.so libprism_common.so libjavafx_font.so libdecora_sse.so libjavafx_font_freetype.so libprism_sw.so libjavafx_font_pango.so libglass.so libjavafx_iio.so
180 %global jfx_sdk_libs javafx-mx.jar packager.jar ant-javafx.jar
181 %global jfx_sdk_bins javafxpackager javapackager
182 %global jfx_jre_exts jfxrt.jar
183 %else
184 %global with_openjfx_binding 0
185 %endif
186
187 # Convert an absolute path to a relative path. Each symbolic link is
188 # specified relative to the directory in which it is installed so that
189 # it will resolve properly within chrooted installations.
190 %global script 'use File::Spec; print File::Spec->abs2rel($ARGV[0], $ARGV[1])'
191 %global abs2rel %{__perl} -e %{script}
192
193
194 # Standard JPackage naming and versioning defines.
195 %global origin openjdk
196 # note, following three variables are sedded from update_sources if used correctly. Hardcode them rather there.
197 %global project aarch64-port
198 %global repo jdk8u
199 %global revision aarch64-jdk8u151-b12
200 # eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%)
201 %global whole_update %(VERSION=%{revision}; echo ${VERSION%%-*})
202 # eg jdk8u60 -> 60 or aarch64-jdk8u60 -> 60
203 %global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u})
204 # eg jdk8u60-b27 -> b27
205 %global buildver %(VERSION=%{revision}; echo ${VERSION##*-})
206 # priority must be 7 digits in total. The expression is workarounding tip
207 %global priority %(TIP=1800%{updatever}; echo ${TIP/tip/999})
208
209 %global javaver 1.8.0
210
211 # parametrized macros are order-sensitive
212 %global fullversion %{name}-%{version}-%{release}
213 #images stub
214 %global j2sdkimage j2sdk-image
215 # output dir stub
216 %define buildoutputdir() %{expand:openjdk/build/jdk8.build%{?1}}
217 #we can copy the javadoc to not arched dir, or made it not noarch
218 %define uniquejavadocdir() %{expand:%{fullversion}%{?1}}
219 #main id and dir of this jdk
220 %define uniquesuffix() %{expand:%{fullversion}.%{_arch}%{?1}}
221
222 # Standard JPackage directories and symbolic links.
223 %define sdkdir() %{expand:%{uniquesuffix -- %{?1}}}
224 %define jrelnk() %{expand:jre-%{javaver}-%{origin}-%{version}-%{release}.%{_arch}%{?1}}
225
226 %define jredir() %{expand:%{sdkdir -- %{?1}}/jre}
227 %define sdkbindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin}
228 %define jrebindir() %{expand:%{_jvmdir}/%{jredir -- %{?1}}/bin}
229
230 # The macro _jvmjardir was removed from /usr/lib/rpm/macros.d/macros.jpackage
231 %define _jvmjardir %{_prefix}/lib/jvm-exports
232 %define jvmjardir() %{expand:%{_jvmjardir}/%{uniquesuffix -- %{?1}}}
233
234 %global rpm_state_dir %{_localstatedir}/lib/rpm-state/
235
236 %if %{with_systemtap}
237 # Where to install systemtap tapset (links)
238 # We would like these to be in a package specific subdir,
239 # but currently systemtap doesn't support that, so we have to
240 # use the root tapset dir for now. To distinquish between 64
241 # and 32 bit architectures we place the tapsets under the arch
242 # specific dir (note that systemtap will only pickup the tapset
243 # for the primary arch for now). Systemtap uses the machine name
244 # aka build_cpu as architecture specific directory name.
245 %global tapsetroot /usr/share/systemtap
246 %global tapsetdir %{tapsetroot}/tapset/%{stapinstall}
247 %endif
248
249 # not-duplicated scriplets for normal/debug packages
250 %global update_desktop_icons /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
251
252
253 %define post_script() %{expand:
254 update-desktop-database %{_datadir}/applications &> /dev/null || :
255 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
256 exit 0
257 }
258
259
260 %define post_headless() %{expand:
261 %ifarch %{jit_arches}
262 # MetaspaceShared::generate_vtable_methods not implemented for PPC JIT
263 %ifnarch %{power64}
264 #see https://bugzilla.redhat.com/show_bug.cgi?id=513605
265 %{jrebindir -- %{?1}}/java -Xshare:dump >/dev/null 2>/dev/null
266 %endif
267 %endif
268
269 PRIORITY=%{priority}
270 if [ "%{?1}" == %{debug_suffix} ]; then
271 let PRIORITY=PRIORITY-1
272 fi
273
274 ext=%{_extension}
275 alternatives \\
276 --install %{_bindir}/java java %{jrebindir -- %{?1}}/java $PRIORITY --family %{name}.%{_arch} \\
277 --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jredir -- %{?1}} \\
278 --slave %{_jvmjardir}/jre jre_exports %{_jvmjardir}/%{jrelnk -- %{?1}} \\
279 --slave %{_bindir}/jjs jjs %{jrebindir -- %{?1}}/jjs \\
280 --slave %{_bindir}/keytool keytool %{jrebindir -- %{?1}}/keytool \\
281 --slave %{_bindir}/orbd orbd %{jrebindir -- %{?1}}/orbd \\
282 --slave %{_bindir}/pack200 pack200 %{jrebindir -- %{?1}}/pack200 \\
283 --slave %{_bindir}/rmid rmid %{jrebindir -- %{?1}}/rmid \\
284 --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir -- %{?1}}/rmiregistry \\
285 --slave %{_bindir}/servertool servertool %{jrebindir -- %{?1}}/servertool \\
286 --slave %{_bindir}/tnameserv tnameserv %{jrebindir -- %{?1}}/tnameserv \\
287 --slave %{_bindir}/policytool policytool %{jrebindir -- %{?1}}/policytool \\
288 --slave %{_bindir}/unpack200 unpack200 %{jrebindir -- %{?1}}/unpack200 \\
289 --slave %{_mandir}/man1/java.1$ext java.1$ext \\
290 %{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1$ext \\
291 --slave %{_mandir}/man1/jjs.1$ext jjs.1$ext \\
292 %{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1$ext \\
293 --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \\
294 %{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1$ext \\
295 --slave %{_mandir}/man1/orbd.1$ext orbd.1$ext \\
296 %{_mandir}/man1/orbd-%{uniquesuffix -- %{?1}}.1$ext \\
297 --slave %{_mandir}/man1/pack200.1$ext pack200.1$ext \\
298 %{_mandir}/man1/pack200-%{uniquesuffix -- %{?1}}.1$ext \\
299 --slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \\
300 %{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1$ext \\
301 --slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \\
302 %{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1$ext \\
303 --slave %{_mandir}/man1/servertool.1$ext servertool.1$ext \\
304 %{_mandir}/man1/servertool-%{uniquesuffix -- %{?1}}.1$ext \\
305 --slave %{_mandir}/man1/tnameserv.1$ext tnameserv.1$ext \\
306 %{_mandir}/man1/tnameserv-%{uniquesuffix -- %{?1}}.1$ext \\
307 --slave %{_mandir}/man1/policytool.1$ext policytool.1$ext \\
308 %{_mandir}/man1/policytool-%{uniquesuffix -- %{?1}}.1$ext \\
309 --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \\
310 %{_mandir}/man1/unpack200-%{uniquesuffix -- %{?1}}.1$ext
311
312 for X in %{origin} %{javaver} ; do
313 alternatives \\
314 --install %{_jvmdir}/jre-"$X" \\
315 jre_"$X" %{_jvmdir}/%{jredir -- %{?1}} $PRIORITY --family %{name}.%{_arch} \\
316 --slave %{_jvmjardir}/jre-"$X" \\
317 jre_"$X"_exports %{_jvmdir}/%{jredir -- %{?1}}
318 done
319
320 update-alternatives --install %{_jvmdir}/jre-%{javaver}-%{origin} jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}} $PRIORITY --family %{name}.%{_arch} \\
321 --slave %{_jvmjardir}/jre-%{javaver} jre_%{javaver}_%{origin}_exports %{jvmjardir -- %{?1}}
322
323 update-desktop-database %{_datadir}/applications &> /dev/null || :
324 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
325
326 # see pretrans where this file is declared
327 # also see that pretrans is only for nondebug
328 if [ ! "%{?1}" == %{debug_suffix} ]; then
329 if [ -f %{_libexecdir}/copy_jdk_configs_fixFiles.sh ] ; then
330 sh %{_libexecdir}/copy_jdk_configs_fixFiles.sh %{rpm_state_dir}/%{name}.%{_arch} %{_jvmdir}/%{sdkdir -- %{?1}}
331 fi
332 fi
333
334 exit 0
335 }
336
337 %define postun_script() %{expand:
338 update-desktop-database %{_datadir}/applications &> /dev/null || :
339 if [ $1 -eq 0 ] ; then
340 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
341 %{update_desktop_icons}
342 fi
343 exit 0
344 }
345
346
347 %define postun_headless() %{expand:
348 alternatives --remove java %{jrebindir -- %{?1}}/java
349 alternatives --remove jre_%{origin} %{_jvmdir}/%{jredir -- %{?1}}
350 alternatives --remove jre_%{javaver} %{_jvmdir}/%{jredir -- %{?1}}
351 alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk -- %{?1}}
352 }
353
354 %define posttrans_script() %{expand:
355 %{update_desktop_icons}
356 }
357
358 %define post_devel() %{expand:
359
360 PRIORITY=%{priority}
361 if [ "%{?1}" == %{debug_suffix} ]; then
362 let PRIORITY=PRIORITY-1
363 fi
364
365 ext=%{_extension}
366 alternatives \\
367 --install %{_bindir}/javac javac %{sdkbindir -- %{?1}}/javac $PRIORITY --family %{name}.%{_arch} \\
368 --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdkdir -- %{?1}} \\
369 --slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdkdir -- %{?1}} \\
370 --slave %{_bindir}/appletviewer appletviewer %{sdkbindir -- %{?1}}/appletviewer \\
371 --slave %{_bindir}/extcheck extcheck %{sdkbindir -- %{?1}}/extcheck \\
372 --slave %{_bindir}/idlj idlj %{sdkbindir -- %{?1}}/idlj \\
373 --slave %{_bindir}/jar jar %{sdkbindir -- %{?1}}/jar \\
374 --slave %{_bindir}/jarsigner jarsigner %{sdkbindir -- %{?1}}/jarsigner \\
375 --slave %{_bindir}/javadoc javadoc %{sdkbindir -- %{?1}}/javadoc \\
376 --slave %{_bindir}/javah javah %{sdkbindir -- %{?1}}/javah \\
377 --slave %{_bindir}/javap javap %{sdkbindir -- %{?1}}/javap \\
378 --slave %{_bindir}/jcmd jcmd %{sdkbindir -- %{?1}}/jcmd \\
379 --slave %{_bindir}/jconsole jconsole %{sdkbindir -- %{?1}}/jconsole \\
380 --slave %{_bindir}/jdb jdb %{sdkbindir -- %{?1}}/jdb \\
381 --slave %{_bindir}/jdeps jdeps %{sdkbindir -- %{?1}}/jdeps \\
382 --slave %{_bindir}/jhat jhat %{sdkbindir -- %{?1}}/jhat \\
383 --slave %{_bindir}/jinfo jinfo %{sdkbindir -- %{?1}}/jinfo \\
384 --slave %{_bindir}/jmap jmap %{sdkbindir -- %{?1}}/jmap \\
385 --slave %{_bindir}/jps jps %{sdkbindir -- %{?1}}/jps \\
386 --slave %{_bindir}/jrunscript jrunscript %{sdkbindir -- %{?1}}/jrunscript \\
387 --slave %{_bindir}/jsadebugd jsadebugd %{sdkbindir -- %{?1}}/jsadebugd \\
388 --slave %{_bindir}/jstack jstack %{sdkbindir -- %{?1}}/jstack \\
389 --slave %{_bindir}/jstat jstat %{sdkbindir -- %{?1}}/jstat \\
390 --slave %{_bindir}/jstatd jstatd %{sdkbindir -- %{?1}}/jstatd \\
391 --slave %{_bindir}/native2ascii native2ascii %{sdkbindir -- %{?1}}/native2ascii \\
392 --slave %{_bindir}/rmic rmic %{sdkbindir -- %{?1}}/rmic \\
393 --slave %{_bindir}/schemagen schemagen %{sdkbindir -- %{?1}}/schemagen \\
394 --slave %{_bindir}/serialver serialver %{sdkbindir -- %{?1}}/serialver \\
395 --slave %{_bindir}/wsgen wsgen %{sdkbindir -- %{?1}}/wsgen \\
396 --slave %{_bindir}/wsimport wsimport %{sdkbindir -- %{?1}}/wsimport \\
397 --slave %{_bindir}/xjc xjc %{sdkbindir -- %{?1}}/xjc \\
398 --slave %{_mandir}/man1/appletviewer.1$ext appletviewer.1$ext \\
399 %{_mandir}/man1/appletviewer-%{uniquesuffix -- %{?1}}.1$ext \\
400 --slave %{_mandir}/man1/extcheck.1$ext extcheck.1$ext \\
401 %{_mandir}/man1/extcheck-%{uniquesuffix -- %{?1}}.1$ext \\
402 --slave %{_mandir}/man1/idlj.1$ext idlj.1$ext \\
403 %{_mandir}/man1/idlj-%{uniquesuffix -- %{?1}}.1$ext \\
404 --slave %{_mandir}/man1/jar.1$ext jar.1$ext \\
405 %{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1$ext \\
406 --slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \\
407 %{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1$ext \\
408 --slave %{_mandir}/man1/javac.1$ext javac.1$ext \\
409 %{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1$ext \\
410 --slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \\
411 %{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1$ext \\
412 --slave %{_mandir}/man1/javah.1$ext javah.1$ext \\
413 %{_mandir}/man1/javah-%{uniquesuffix -- %{?1}}.1$ext \\
414 --slave %{_mandir}/man1/javap.1$ext javap.1$ext \\
415 %{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1$ext \\
416 --slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \\
417 %{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1$ext \\
418 --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \\
419 %{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1$ext \\
420 --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \\
421 %{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1$ext \\
422 --slave %{_mandir}/man1/jdeps.1$ext jdeps.1$ext \\
423 %{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1$ext \\
424 --slave %{_mandir}/man1/jhat.1$ext jhat.1$ext \\
425 %{_mandir}/man1/jhat-%{uniquesuffix -- %{?1}}.1$ext \\
426 --slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \\
427 %{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1$ext \\
428 --slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \\
429 %{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1$ext \\
430 --slave %{_mandir}/man1/jps.1$ext jps.1$ext \\
431 %{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1$ext \\
432 --slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \\
433 %{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1$ext \\
434 --slave %{_mandir}/man1/jsadebugd.1$ext jsadebugd.1$ext \\
435 %{_mandir}/man1/jsadebugd-%{uniquesuffix -- %{?1}}.1$ext \\
436 --slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \\
437 %{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1$ext \\
438 --slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \\
439 %{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1$ext \\
440 --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\
441 %{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1$ext \\
442 --slave %{_mandir}/man1/native2ascii.1$ext native2ascii.1$ext \\
443 %{_mandir}/man1/native2ascii-%{uniquesuffix -- %{?1}}.1$ext \\
444 --slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \\
445 %{_mandir}/man1/rmic-%{uniquesuffix -- %{?1}}.1$ext \\
446 --slave %{_mandir}/man1/schemagen.1$ext schemagen.1$ext \\
447 %{_mandir}/man1/schemagen-%{uniquesuffix -- %{?1}}.1$ext \\
448 --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\
449 %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1$ext \\
450 --slave %{_mandir}/man1/wsgen.1$ext wsgen.1$ext \\
451 %{_mandir}/man1/wsgen-%{uniquesuffix -- %{?1}}.1$ext \\
452 --slave %{_mandir}/man1/wsimport.1$ext wsimport.1$ext \\
453 %{_mandir}/man1/wsimport-%{uniquesuffix -- %{?1}}.1$ext \\
454 --slave %{_mandir}/man1/xjc.1$ext xjc.1$ext \\
455 %{_mandir}/man1/xjc-%{uniquesuffix -- %{?1}}.1$ext
456
457 for X in %{origin} %{javaver} ; do
458 alternatives \\
459 --install %{_jvmdir}/java-"$X" \\
460 java_sdk_"$X" %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch} \\
461 --slave %{_jvmjardir}/java-"$X" \\
462 java_sdk_"$X"_exports %{_jvmjardir}/%{sdkdir -- %{?1}}
463 done
464
465 update-alternatives --install %{_jvmdir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}} $PRIORITY --family %{name}.%{_arch} \\
466 --slave %{_jvmjardir}/java-%{javaver}-%{origin} java_sdk_%{javaver}_%{origin}_exports %{_jvmjardir}/%{sdkdir -- %{?1}}
467
468 update-desktop-database %{_datadir}/applications &> /dev/null || :
469 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
470
471 exit 0
472 }
473
474 %define postun_devel() %{expand:
475 alternatives --remove javac %{sdkbindir -- %{?1}}/javac
476 alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
477 alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdkdir -- %{?1}}
478 alternatives --remove java_sdk_%{javaver}_%{origin} %{_jvmdir}/%{sdkdir -- %{?1}}
479
480 update-desktop-database %{_datadir}/applications &> /dev/null || :
481
482 if [ $1 -eq 0 ] ; then
483 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
484 %{update_desktop_icons}
485 fi
486 exit 0
487 }
488
489 %define posttrans_devel() %{expand:
490 %{update_desktop_icons}
491 }
492
493 %define post_javadoc() %{expand:
494
495 PRIORITY=%{priority}
496 if [ "%{?1}" == %{debug_suffix} ]; then
497 let PRIORITY=PRIORITY-1
498 fi
499
500 alternatives \\
501 --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api \\
502 $PRIORITY --family %{name}
503 exit 0
504 }
505
506 %define postun_javadoc() %{expand:
507 alternatives --remove javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api
508 exit 0
509 }
510
511 %define post_javadoc_zip() %{expand:
512
513 PRIORITY=%{priority}
514 if [ "%{?1}" == %{debug_suffix} ]; then
515 let PRIORITY=PRIORITY-1
516 fi
517
518 alternatives \\
519 --install %{_javadocdir}/java-zip javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip \\
520 $PRIORITY --family %{name}
521 exit 0
522 }
523
524 %define postun_javadoc_zip() %{expand:
525 alternatives --remove javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
526 exit 0
527 }
528
529 %define files_jre() %{expand:
530 %{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}.png
531 %{_datadir}/applications/*policytool%{?1}.desktop
532 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libjsoundalsa.so
533 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libsplashscreen.so
534 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libawt_xawt.so
535 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/lib/%{archinstall}/libjawt.so
536 %{_jvmdir}/%{sdkdir -- %{?1}}/jre/bin/policytool
537 }
538
539
540 %define files_jre_headless() %{expand:
541 %defattr(-,root,root,-)
542 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/ASSEMBLY_EXCEPTION
543 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/LICENSE
544 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/THIRD_PARTY_README
545 %dir %{_jvmdir}/%{sdkdir -- %{?1}}
546 %{_jvmdir}/%{jrelnk -- %{?1}}
547 %{_jvmjardir}/%{jrelnk -- %{?1}}
548 %{jvmjardir -- %{?1}}
549 %{_jvmprivdir}/*
550 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/security
551 %{_jvmdir}/%{jredir -- %{?1}}/lib/security/cacerts
552 %dir %{_jvmdir}/%{jredir -- %{?1}}
553 %dir %{_jvmdir}/%{jredir -- %{?1}}/bin
554 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib
555 %{_jvmdir}/%{jredir -- %{?1}}/bin/java
556 %{_jvmdir}/%{jredir -- %{?1}}/bin/jjs
557 %{_jvmdir}/%{jredir -- %{?1}}/bin/keytool
558 %{_jvmdir}/%{jredir -- %{?1}}/bin/orbd
559 %{_jvmdir}/%{jredir -- %{?1}}/bin/pack200
560 %{_jvmdir}/%{jredir -- %{?1}}/bin/rmid
561 %{_jvmdir}/%{jredir -- %{?1}}/bin/rmiregistry
562 %{_jvmdir}/%{jredir -- %{?1}}/bin/servertool
563 %{_jvmdir}/%{jredir -- %{?1}}/bin/tnameserv
564 %{_jvmdir}/%{jredir -- %{?1}}/bin/unpack200
565 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/US_export_policy.jar
566 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/unlimited/local_policy.jar
567 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/US_export_policy.jar
568 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/policy/limited/local_policy.jar
569 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/java.policy
570 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/java.security
571 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/blacklisted.certs
572 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/logging.properties
573 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/calendars.properties
574 %{_mandir}/man1/java-%{uniquesuffix -- %{?1}}.1*
575 %{_mandir}/man1/jjs-%{uniquesuffix -- %{?1}}.1*
576 %{_mandir}/man1/keytool-%{uniquesuffix -- %{?1}}.1*
577 %{_mandir}/man1/orbd-%{uniquesuffix -- %{?1}}.1*
578 %{_mandir}/man1/pack200-%{uniquesuffix -- %{?1}}.1*
579 %{_mandir}/man1/rmid-%{uniquesuffix -- %{?1}}.1*
580 %{_mandir}/man1/rmiregistry-%{uniquesuffix -- %{?1}}.1*
581 %{_mandir}/man1/servertool-%{uniquesuffix -- %{?1}}.1*
582 %{_mandir}/man1/tnameserv-%{uniquesuffix -- %{?1}}.1*
583 %{_mandir}/man1/unpack200-%{uniquesuffix -- %{?1}}.1*
584 %{_mandir}/man1/policytool-%{uniquesuffix -- %{?1}}.1*
585 %config(noreplace) %{_jvmdir}/%{jredir -- %{?1}}/lib/security/nss.cfg
586 %ifarch %{jit_arches}
587 %ifnarch %{power64}
588 %attr(664, root, root) %ghost %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/server/classes.jsa
589 %attr(664, root, root) %ghost %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/client/classes.jsa
590 %endif
591 %endif
592 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/server/
593 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/client/
594 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}
595 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jli
596 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jli/libjli.so
597 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/jvm.cfg
598 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libattach.so
599 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt.so
600 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libawt_headless.so
601 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libdt_socket.so
602 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libfontmanager.so
603 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libhprof.so
604 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libinstrument.so
605 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2gss.so
606 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2pcsc.so
607 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libj2pkcs11.so
608 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjaas_unix.so
609 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjava.so
610 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjava_crw_demo.so
611 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjavajpeg.so
612 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjdwp.so
613 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsdt.so
614 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsig.so
615 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libjsound.so
616 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/liblcms.so
617 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libmanagement.so
618 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libmlib_image.so
619 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnet.so
620 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnio.so
621 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libnpt.so
622 %ifarch x86_64 %{ix86} %{aarch64}
623 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsaproc.so
624 %endif
625 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsctp.so
626 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libsunec.so
627 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libunpack.so
628 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libverify.so
629 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libzip.so
630 %{_jvmdir}/%{jredir -- %{?1}}/lib/charsets.jar
631 %{_jvmdir}/%{jredir -- %{?1}}/lib/classlist
632 %{_jvmdir}/%{jredir -- %{?1}}/lib/content-types.properties
633 %{_jvmdir}/%{jredir -- %{?1}}/lib/currency.data
634 %{_jvmdir}/%{jredir -- %{?1}}/lib/flavormap.properties
635 %{_jvmdir}/%{jredir -- %{?1}}/lib/hijrah-config-umalqura.properties
636 %{_jvmdir}/%{jredir -- %{?1}}/lib/images/cursors/*
637 %{_jvmdir}/%{jredir -- %{?1}}/lib/jce.jar
638 %{_jvmdir}/%{jredir -- %{?1}}/lib/jexec
639 %{_jvmdir}/%{jredir -- %{?1}}/lib/jsse.jar
640 %{_jvmdir}/%{jredir -- %{?1}}/lib/jvm.hprof.txt
641 %{_jvmdir}/%{jredir -- %{?1}}/lib/meta-index
642 %{_jvmdir}/%{jredir -- %{?1}}/lib/net.properties
643 %{_jvmdir}/%{jredir -- %{?1}}/lib/psfont.properties.ja
644 %{_jvmdir}/%{jredir -- %{?1}}/lib/psfontj2d.properties
645 %{_jvmdir}/%{jredir -- %{?1}}/lib/resources.jar
646 %{_jvmdir}/%{jredir -- %{?1}}/lib/rt.jar
647 %{_jvmdir}/%{jredir -- %{?1}}/lib/sound.properties
648 %{_jvmdir}/%{jredir -- %{?1}}/lib/tzdb.dat
649 %{_jvmdir}/%{jredir -- %{?1}}/lib/management-agent.jar
650 %{_jvmdir}/%{jredir -- %{?1}}/lib/management/*
651 %{_jvmdir}/%{jredir -- %{?1}}/lib/cmm/*
652 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/*
653 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/images
654 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/images/cursors
655 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/management
656 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/cmm
657 %dir %{_jvmdir}/%{jredir -- %{?1}}/lib/ext
658 }
659
660 %define files_devel() %{expand:
661 %defattr(-,root,root,-)
662 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/ASSEMBLY_EXCEPTION
663 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/LICENSE
664 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/THIRD_PARTY_README
665 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
666 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/include
667 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib
668 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/appletviewer
669 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/extcheck
670 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/idlj
671 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jar
672 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jarsigner
673 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/java
674 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javac
675 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javadoc
676 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javah
677 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap
678 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/java-rmi.cgi
679 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd
680 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole
681 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb
682 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps
683 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jhat
684 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jinfo
685 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jjs
686 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jmap
687 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jps
688 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jrunscript
689 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jsadebugd
690 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstack
691 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstat
692 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd
693 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/keytool
694 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/native2ascii
695 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/orbd
696 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/pack200
697 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/policytool
698 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmic
699 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmid
700 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/rmiregistry
701 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/schemagen
702 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver
703 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/servertool
704 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/tnameserv
705 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/unpack200
706 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/wsgen
707 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/wsimport
708 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/xjc
709 %{_jvmdir}/%{sdkdir -- %{?1}}/include/*
710 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/%{archinstall}
711 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym
712 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/ir.idl
713 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jconsole.jar
714 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/orb.idl
715 %ifarch x86_64 %{ix86}
716 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/sa-jdi.jar
717 %endif
718 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/dt.jar
719 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec
720 %{_jvmdir}/%{sdkdir -- %{?1}}/lib/tools.jar
721 %{_jvmjardir}/%{sdkdir -- %{?1}}
722 %{_datadir}/applications/*jconsole%{?1}.desktop
723 %{_mandir}/man1/appletviewer-%{uniquesuffix -- %{?1}}.1*
724 %{_mandir}/man1/extcheck-%{uniquesuffix -- %{?1}}.1*
725 %{_mandir}/man1/idlj-%{uniquesuffix -- %{?1}}.1*
726 %{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1*
727 %{_mandir}/man1/jarsigner-%{uniquesuffix -- %{?1}}.1*
728 %{_mandir}/man1/javac-%{uniquesuffix -- %{?1}}.1*
729 %{_mandir}/man1/javadoc-%{uniquesuffix -- %{?1}}.1*
730 %{_mandir}/man1/javah-%{uniquesuffix -- %{?1}}.1*
731 %{_mandir}/man1/javap-%{uniquesuffix -- %{?1}}.1*
732 %{_mandir}/man1/jconsole-%{uniquesuffix -- %{?1}}.1*
733 %{_mandir}/man1/jcmd-%{uniquesuffix -- %{?1}}.1*
734 %{_mandir}/man1/jdb-%{uniquesuffix -- %{?1}}.1*
735 %{_mandir}/man1/jdeps-%{uniquesuffix -- %{?1}}.1*
736 %{_mandir}/man1/jhat-%{uniquesuffix -- %{?1}}.1*
737 %{_mandir}/man1/jinfo-%{uniquesuffix -- %{?1}}.1*
738 %{_mandir}/man1/jmap-%{uniquesuffix -- %{?1}}.1*
739 %{_mandir}/man1/jps-%{uniquesuffix -- %{?1}}.1*
740 %{_mandir}/man1/jrunscript-%{uniquesuffix -- %{?1}}.1*
741 %{_mandir}/man1/jsadebugd-%{uniquesuffix -- %{?1}}.1*
742 %{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1*
743 %{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1*
744 %{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1*
745 %{_mandir}/man1/native2ascii-%{uniquesuffix -- %{?1}}.1*
746 %{_mandir}/man1/rmic-%{uniquesuffix -- %{?1}}.1*
747 %{_mandir}/man1/schemagen-%{uniquesuffix -- %{?1}}.1*
748 %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1*
749 %{_mandir}/man1/wsgen-%{uniquesuffix -- %{?1}}.1*
750 %{_mandir}/man1/wsimport-%{uniquesuffix -- %{?1}}.1*
751 %{_mandir}/man1/xjc-%{uniquesuffix -- %{?1}}.1*
752 %if %{with_systemtap}
753 %dir %{tapsetroot}
754 %dir %{tapsetdir}
755 %{tapsetdir}/*%{version}-%{release}.%{_arch}%{?1}.stp
756 %dir %{_jvmdir}/%{sdkdir -- %{?1}}/tapset
757 %{_jvmdir}/%{sdkdir -- %{?1}}/tapset/*.stp
758 %endif
759 }
760
761 %define files_demo() %{expand:
762 %defattr(-,root,root,-)
763 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/LICENSE
764 }
765
766 %define files_src() %{expand:
767 %defattr(-,root,root,-)
768 %doc README.src
769 %{_jvmdir}/%{sdkdir -- %{?1}}/src.zip
770 }
771
772 %define files_javadoc() %{expand:
773 %defattr(-,root,root,-)
774 %doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}
775 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/LICENSE
776 }
777
778 %define files_javadoc_zip() %{expand:
779 %defattr(-,root,root,-)
780 %doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
781 %license %{buildoutputdir -- %{?1}}/images/%{j2sdkimage}/jre/LICENSE
782 }
783
784 %define files_accessibility() %{expand:
785 %{_jvmdir}/%{jredir -- %{?1}}/lib/%{archinstall}/libatk-wrapper.so
786 %{_jvmdir}/%{jredir -- %{?1}}/lib/ext/java-atk-wrapper.jar
787 %{_jvmdir}/%{jredir -- %{?1}}/lib/accessibility.properties
788 }
789
790 # not-duplicated requires/provides/obsolate for normal/debug packages
791 %define java_rpo() %{expand:
792 Requires: fontconfig
793 Requires: x11-font-type1
794
795 # Requires rest of java
796 Requires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
797 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
798
799
800 # Standard JPackage base provides.
801 Provides: jre-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
802 Provides: jre-%{origin}%{?1} = %{epoch}:%{version}-%{release}
803 Provides: jre-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
804 Provides: java-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
805 Provides: jre = %{javaver}%{?1}
806 Provides: java-%{origin}%{?1} = %{epoch}:%{version}-%{release}
807 Provides: java%{?1} = %{epoch}:%{javaver}
808 # Standard JPackage extensions provides.
809 Provides: java-fonts%{?1} = %{epoch}:%{version}
810
811 Obsoletes: java-1.7.0-openjdk%{?1}
812 }
813
814 %define java_headless_rpo() %{expand:
815 # Require /etc/pki/java/cacerts.
816 #Requires: ca-certificates
817 Requires: rootcerts-java
818 # Require jpackage-utils for ownership of /usr/lib/jvm/
819 Requires: jpackage-utils
820 # Require zoneinfo data provided by tzdata-java subpackage.
821 Requires: timezone-java >= 2015d
822 # libsctp.so.1 is being `dlopen`ed on demand
823 Requires: lksctp-tools
824 # tool to copy jdk's configs - should be Recommends only, but then only dnf/yum eforce it, not rpm transaction and so no configs are persisted when pure rpm -u is run. I t may be consiedered as regression
825 Requires: copy-jdk-configs >= 3.3
826 #OrderWithRequires: copy-jdk-configs
827 # Post requires alternatives to install tool alternatives.
828 Requires(post): update-alternatives
829 # in version 1.7 and higher for --family switch
830 Requires(post): chkconfig >= 1.7-3
831 # Postun requires alternatives to uninstall tool alternatives.
832 Requires(postun): update-alternatives
833 # in version 1.7 and higher for --family switch
834 Requires(postun): chkconfig >= 1.7-3
835
836 # Standard JPackage base provides.
837 Provides: jre-%{javaver}-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
838 Provides: jre-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
839 Provides: jre-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
840 Provides: java-%{javaver}-headless%{?1} = %{epoch}:%{version}-%{release}
841 Provides: jre-headless%{?1} = %{epoch}:%{javaver}
842 Provides: java-%{origin}-headless%{?1} = %{epoch}:%{version}-%{release}
843 Provides: java-headless%{?1} = %{epoch}:%{javaver}
844 # Standard JPackage extensions provides.
845 Provides: jndi%{?1} = %{epoch}:%{version}
846 Provides: jndi-ldap%{?1} = %{epoch}:%{version}
847 Provides: jndi-cos%{?1} = %{epoch}:%{version}
848 Provides: jndi-rmi%{?1} = %{epoch}:%{version}
849 Provides: jndi-dns%{?1} = %{epoch}:%{version}
850 Provides: jaas%{?1} = %{epoch}:%{version}
851 Provides: jsse%{?1} = %{epoch}:%{version}
852 Provides: jce%{?1} = %{epoch}:%{version}
853 Provides: jdbc-stdext%{?1} = 4.1
854 Provides: java-sasl%{?1} = %{epoch}:%{version}
855
856 Obsoletes: java-1.7.0-openjdk-headless%{?1}
857 }
858
859 %define java_devel_rpo() %{expand:
860 # Require base package.
861 Requires: %{name}%{?1} = %{epoch}:%{version}-%{release}
862 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
863 # Post requires alternatives to install tool alternatives.
864 Requires(post): update-alternatives
865 # in version 1.7 and higher for --family switch
866 Requires(post): chkconfig >= 1.7-3
867 # Postun requires alternatives to uninstall tool alternatives.
868 Requires(postun): update-alternatives
869 # in version 1.7 and higher for --family switch
870 Requires(postun): chkconfig >= 1.7-3
871
872 # Standard JPackage devel provides.
873 Provides: java-sdk-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}
874 Provides: java-sdk-%{javaver}%{?1} = %{epoch}:%{version}
875 Provides: java-sdk-%{origin}%{?1} = %{epoch}:%{version}
876 Provides: java-sdk%{?1} = %{epoch}:%{javaver}
877 Provides: java-%{javaver}-devel%{?1} = %{epoch}:%{version}
878 Provides: java-devel-%{origin}%{?1} = %{epoch}:%{version}
879 Provides: java-devel%{?1} = %{epoch}:%{javaver}
880
881 Obsoletes: java-1.7.0-openjdk-devel%{?1}
882 }
883
884
885 %define java_demo_rpo() %{expand:
886 Requires: %{name}%{?1} = %{epoch}:%{version}-%{release}
887 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
888
889 Provides: java-%{javaver}-%{origin}-demo = %{epoch}:%{version}-%{release}
890
891 Obsoletes: java-1.7.0-openjdk-demo%1
892 }
893
894 %define java_javadoc_rpo() %{expand:
895 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
896 # Post requires alternatives to install javadoc alternative.
897 Requires(post): update-alternatives
898 # in version 1.7 and higher for --family switch
899 Requires(post): chkconfig >= 1.7-3
900 # Postun requires alternatives to uninstall javadoc alternative.
901 Requires(postun): update-alternatives
902 # in version 1.7 and higher for --family switch
903 Requires(postun): chkconfig >= 1.7-3
904
905 # Standard JPackage javadoc provides.
906 Provides: java-javadoc%{?1} = %{epoch}:%{version}-%{release}
907 Provides: java-%{javaver}-javadoc%{?1} = %{epoch}:%{version}-%{release}
908 Provides: java-%{javaver}-%{origin}-javadoc = %{epoch}:%{version}-%{release}
909
910 Obsoletes: java-1.7.0-openjdk-javadoc%{?1}
911
912 }
913
914 %define java_src_rpo() %{expand:
915 Requires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
916
917 # Standard JPackage javadoc provides.
918 Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
919 Provides: java-%{javaver}-src%{?1} = %{epoch}:%{version}-%{release}
920 Provides: java-%{javaver}-%{origin}-src = %{epoch}:%{version}-%{release}
921 Obsoletes: java-1.7.0-openjdk-src%{?1}
922 }
923
924 %define java_accessibility_rpo() %{expand:
925 Requires: java-atk-wrapper
926 Requires: %{name}%{?1} = %{epoch}:%{version}-%{release}
927 #OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
928
929 Provides: java-%{javaver}-%{origin}-accessibility = %{epoch}:%{version}-%{release}
930
931 Obsoletes: java-1.7.0-openjdk-accessibility%{?1}
932 }
933
934 # Prevent brp-java-repack-jars from being run.
935 %global __jar_repack 0
936
937 Name: java-%{javaver}-%{origin}
938 Version: %{javaver}.%{updatever}
939 Release: %mkrel 1.%{buildver}.1
940 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
941 # and this change was brought into RHEL-4. java-1.5.0-ibm packages
942 # also included the epoch in their virtual provides. This created a
943 # situation where in-the-wild java-1.5.0-ibm packages provided "java =
944 # 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is
945 # interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be
946 # satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in
947 # JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
948 # provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
949 Epoch: 1
950 Summary: OpenJDK Runtime Environment
951 Group: Development/Java
952
953 License: ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and LGPL+ and LGPLv2 and MPLv1.0 and MPLv1.1 and Public Domain and W3C
954 URL: http://openjdk.java.net/
955
956 # aarch64-port now contains integration forest of both aarch64 and normal jdk
957 # Source from upstream OpenJDK8 project. To regenerate, use
958 # VERSION=%%{revision} FILE_NAME_ROOT=%%{project}-%%{repo}-${VERSION}
959 # REPO_ROOT=<path to checked-out repository> generate_source_tarball.sh
960 # where the source is obtained from http://hg.openjdk.java.net/%%{project}/%%{repo}
961 Source0: %{project}-%{repo}-%{revision}.tar.xz
962
963 # Shenandoah HotSpot
964 Source1: aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u151-b12.tar.xz
965
966 # Custom README for -src subpackage
967 Source2: README.src
968
969 # Script to generate Source4 (requires mercurial)
970 Source3: mga-add-missing-files.sh
971
972 # Additional source needed to build under Mageia
973 Source4: cdd4be91427c.tar.bz2
974
975 # Use 'generate_tarballs.sh' to generate the following tarballs
976 # They are based on code contained in the IcedTea7 project.
977
978 # Systemtap tapsets. Zipped up to keep it small.
979 Source8: systemtap-tapset-3.6.0pre02.tar.xz
980
981 # Desktop files. Adapated from IcedTea.
982 Source9: jconsole.desktop.in
983 Source10: policytool.desktop.in
984
985 # nss configuration file
986 Source11: nss.cfg.in
987
988 # Removed libraries that we link instead
989 Source12: %{name}-remove-intree-libraries.sh
990
991 # Ensure we aren't using the limited crypto policy
992 Source13: TestCryptoLevel.java
993
994 # Ensure ECDSA is working
995 Source14: TestECDSA.java
996
997 Source20: repackReproduciblePolycies.sh
998
999 # New versions of config files with aarch64 support. This is not upstream yet.
1000 Source100: config.guess
1001 Source101: config.sub
1002
1003 # RPM/distribution specific patches
1004
1005 # Accessibility patches
1006 # Ignore AWTError when assistive technologies are loaded
1007 Patch1: %{name}-accessible-toolkit.patch
1008 # Restrict access to java-atk-wrapper classes
1009 Patch3: java-atk-wrapper-security.patch
1010 # Upstreamable patches
1011 # PR2737: Allow multiple initialization of PKCS11 libraries
1012 Patch5: multiple-pkcs11-library-init.patch
1013 # PR2095, RH1163501: 2048-bit DH upper bound too small for Fedora infrastructure (sync with IcedTea 2.x)
1014 Patch504: rh1163501.patch
1015 # S4890063, PR2304, RH1214835: HPROF: default text truncated when using doe=n option
1016 Patch511: rh1214835.patch
1017 # Turn off strict overflow on IndicRearrangementProcessor{,2}.cpp following 8140543: Arrange font actions
1018 Patch512: no_strict_overflow.patch
1019 # Support for building the SunEC provider with the system NSS installation
1020 # PR1983: Support using the system installation of NSS with the SunEC provider
1021 # PR2127: SunEC provider crashes when built using system NSS
1022 # PR2815: Race condition in SunEC provider with system NSS
1023 # PR2899: Don't use WithSeed versions of NSS functions as they don't fully process the seed
1024 # PR2934: SunEC provider throwing KeyException with current NSS
1025 # PR3479, RH1486025: ECC and NSS JVM crash
1026 Patch513: pr1983-jdk.patch
1027 Patch514: pr1983-root.patch
1028 Patch515: pr2127.patch
1029 Patch516: pr2815.patch
1030 Patch517: pr2899.patch
1031 Patch518: pr2934.patch
1032 Patch519: pr3479-rh1486025.patch
1033 # S8150954, RH1176206, PR2866: Taking screenshots on x11 composite desktop produces wrong result
1034 # In progress: http://mail.openjdk.java.net/pipermail/awt-dev/2016-March/010742.html
1035 Patch508: rh1176206-jdk.patch
1036 Patch509: rh1176206-root.patch
1037 # RH1337583, PR2974: PKCS#10 certificate requests now use CRLF line endings rather than system line endings
1038 Patch523: pr2974-rh1337583.patch
1039 # PR3083, RH1346460: Regression in SSL debug output without an ECC provider
1040 Patch528: pr3083-rh1346460.patch
1041 # Patches 204 and 205 stop the build adding .gnu_debuglink sections to unstripped files
1042 Patch204: hotspot-remove-debuglink.patch
1043 Patch205: dont-add-unnecessary-debug-links.patch
1044 # Enable debug information for assembly code files
1045 Patch206: hotspot-assembler-debuginfo.patch
1046 # 8188030, PR3459, RH1484079: AWT java apps fail to start when some minimal fonts are present
1047 Patch560: 8188030-pr3459-rh1484079.patch
1048
1049 # Arch-specific upstreamable patches
1050 # PR2415: JVM -Xmx requirement is too high on s390
1051 Patch100: %{name}-s390-java-opts.patch
1052 # Type fixing for s390
1053 Patch102: %{name}-size_t.patch
1054 # Use "%z" for size_t on s390 as size_t != intptr_t
1055 Patch103: s390-size_t_format_flags.patch
1056
1057 # Patches which need backporting to 8u
1058 # S8073139, RH1191652; fix name of ppc64le architecture
1059 Patch601: %{name}-rh1191652-root.patch
1060 Patch602: %{name}-rh1191652-jdk.patch
1061 Patch603: %{name}-rh1191652-hotspot-aarch64.patch
1062 # Include all sources in src.zip
1063 Patch7: include-all-srcs.patch
1064 # 8035341: Allow using a system installed libpng
1065 Patch202: system-libpng.patch
1066 # 8042159: Allow using a system-installed lcms2
1067 Patch203: system-lcms.patch
1068 # PR2462: Backport "8074839: Resolve disabled warnings for libunpack and the unpack200 binary"
1069 # This fixes printf warnings that lead to build failure with -Werror=format-security from optflags
1070 Patch502: pr2462.patch
1071 # S8148351, PR2842: Only display resolved symlink for compiler, do not change path
1072 Patch506: pr2842-01.patch
1073 Patch507: pr2842-02.patch
1074 # S8154313: Generated javadoc scattered all over the place
1075 Patch400: 8154313.patch
1076 # S6260348, PR3066: GTK+ L&F JTextComponent not respecting desktop caret blink rate
1077 Patch526: 6260348-pr3066.patch
1078 # 8061305, PR3335, RH1423421: Javadoc crashes when method name ends with "Property"
1079 Patch538: 8061305-pr3335-rh1423421.patch
1080
1081 # Patches upstream and appearing in 8u151
1082 # 8075484, PR3473, RH1490713: SocketInputStream.socketRead0 can hang even with soTimeout set
1083 Patch561: 8075484-pr3473-rh1490713.patch
1084
1085 # Patches upstream and appearing in 8u152
1086 # 8153711, PR3313, RH1284948: [REDO] JDWP: Memory Leak: GlobalRefs never deleted when processing invokeMethod command
1087 Patch535: 8153711-pr3313-rh1284948.patch
1088 # 8162384, PR3122, RH1358661: Performance regression: bimorphic inlining may be bypassed by type speculation
1089 Patch532: 8162384-pr3122-rh1358661.patch
1090 # 8173941, PR3326: SA does not work if executable is DSO
1091 Patch547: 8173941-pr3326.patch
1092 # 8175813, PR3394, RH1448880: PPC64: "mbind: Invalid argument" when -XX:+UseNUMA is used
1093 Patch550: 8175813-pr3394-rh1448880.patch
1094 # 8175887, PR3415: C1 value numbering handling of Unsafe.get*Volatile is incorrect
1095 Patch554: 8175887-pr3415.patch
1096
1097 # Patches upstream and appearing in 8u161
1098 # 8164293, PR3412, RH1459641: HotSpot leaking memory in long-running requests
1099 Patch555: 8164293-pr3412-rh1459641.patch
1100
1101 # Patches upstream and appearing in 8u162
1102 # 8181055, PR3394, RH1448880: PPC64: "mbind: Invalid argument" still seen after 8175813
1103 Patch551: 8181055-pr3394-rh1448880.patch
1104 # 8181419, PR3413, RH1463144: Race in jdwp invoker handling may lead to crashes or invalid results
1105 Patch553: 8181419-pr3413-rh1463144.patch
1106 # 8145913, PR3466, RH1498309: PPC64: add Montgomery multiply intrinsic
1107 Patch556: 8145913-pr3466-rh1498309.patch
1108 # 8168318, PR3466, RH1498320: PPC64: Use cmpldi instead of li/cmpld
1109 Patch557: 8168318-pr3466-rh1498320.patch
1110 # 8170328, PR3466, RH1498321: PPC64: Use andis instead of lis/and
1111 Patch558: 8170328-pr3466-rh1498321.patch
1112 # 8181810, PR3466, RH1498319: PPC64: Leverage extrdi for bitfield extract
1113 Patch559: 8181810-pr3466-rh1498319.patch
1114
1115 # Patches ineligible for 8u
1116 # 8043805: Allow using a system-installed libjpeg
1117 Patch201: system-libjpeg.patch
1118 # custom securities
1119 Patch207: PR3183.patch
1120 # ustreamed aarch64 fixes
1121 Patch208: aarch64BuildFailure.patch
1122 Patch209: 8035496-hotspot.patch
1123 Patch210: suse_linuxfilestore.patch
1124
1125 # Local fixes
1126 # PR1834, RH1022017: Reduce curves reported by SSL to those in NSS
1127 Patch525: pr1834-rh1022017.patch
1128 # Turn on AssumeMP by default on RHEL systems
1129 Patch534: always_assumemp.patch
1130 # PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts)
1131 Patch539: pr2888.patch
1132
1133 # Non-OpenJDK fixes
1134
1135 BuildRequires: autoconf
1136 BuildRequires: automake
1137 BuildRequires: alsa-lib-devel
1138 BuildRequires: binutils
1139 BuildRequires: cups-devel
1140 BuildRequires: desktop-file-utils
1141 BuildRequires: elfutils
1142 BuildRequires: fontconfig
1143 BuildRequires: freetype-devel
1144 BuildRequires: giflib-devel
1145 BuildRequires: gcc-c++
1146 BuildRequires: gdb
1147 BuildRequires: gtk2-devel
1148 BuildRequires: lcms2-devel
1149 BuildRequires: libjpeg-devel
1150 BuildRequires: libpng-devel
1151 BuildRequires: libxslt-devel
1152 BuildRequires: libx11-devel
1153 BuildRequires: libxi-devel
1154 BuildRequires: libxinerama-devel
1155 BuildRequires: libxt-devel
1156 BuildRequires: libxtst-devel
1157 # Requirements for setting up the nss.cfg
1158 BuildRequires: nss-devel
1159 BuildRequires: pkgconfig
1160 BuildRequires: x11-proto-devel
1161 BuildRequires: zip
1162 BuildRequires: java-1.8.0-openjdk-devel
1163 # Zero-assembler build requirement.
1164 %ifnarch %{jit_arches}
1165 BuildRequires: libffi-devel
1166 %endif
1167 BuildRequires: timezone-java >= 2015d
1168 BuildRequires: patch >= 2.7.5
1169 # Earlier versions have a bug in tree vectorization on PPC
1170 BuildRequires: gcc >= 4.8.3-8
1171
1172 %if %{with_systemtap}
1173 BuildRequires: systemtap
1174 %endif
1175
1176 # this is built always, also during debug-only build
1177 # when it is built in debug-only, then this package is just placeholder
1178 %{java_rpo %{nil}}
1179
1180 %description
1181 The OpenJDK runtime environment.
1182
1183 %if %{include_debug_build}
1184 %package debug
1185 Summary: OpenJDK Runtime Environment %{debug_on}
1186 Group: Development/Java
1187
1188 %{java_rpo -- %{debug_suffix_unquoted}}
1189 %description debug
1190 The OpenJDK runtime environment.
1191 %{debug_warning}
1192 %endif
1193
1194 %if %{include_normal_build}
1195 %package headless
1196 Summary: OpenJDK Runtime Environment
1197 Group: Development/Java
1198
1199 %{java_headless_rpo %{nil}}
1200
1201 %description headless
1202 The OpenJDK runtime environment without audio and video support.
1203 %endif
1204
1205 %if %{include_debug_build}
1206 %package headless-debug
1207 Summary: OpenJDK Runtime Environment %{debug_on}
1208 Group: Development/Java
1209
1210 %{java_headless_rpo -- %{debug_suffix_unquoted}}
1211
1212 %description headless-debug
1213 The OpenJDK runtime environment without audio and video support.
1214 %{debug_warning}
1215 %endif
1216
1217 %if %{include_normal_build}
1218 %package devel
1219 Summary: OpenJDK Development Environment
1220 Group: Development/Java
1221
1222 %{java_devel_rpo %{nil}}
1223
1224 %description devel
1225 The OpenJDK development tools.
1226 %endif
1227
1228 %if %{include_debug_build}
1229 %package devel-debug
1230 Summary: OpenJDK Development Environment %{debug_on}
1231 Group: Development/Tools
1232
1233 %{java_devel_rpo -- %{debug_suffix_unquoted}}
1234
1235 %description devel-debug
1236 The OpenJDK development tools.
1237 %{debug_warning}
1238 %endif
1239
1240 %if %{include_normal_build}
1241 %package demo
1242 Summary: OpenJDK Demos
1243 Group: Development/Java
1244
1245 %{java_demo_rpo %{nil}}
1246
1247 %description demo
1248 The OpenJDK demos.
1249 %endif
1250
1251 %if %{include_debug_build}
1252 %package demo-debug
1253 Summary: OpenJDK Demos %{debug_on}
1254 Group: Development/Java
1255
1256 %{java_demo_rpo -- %{debug_suffix_unquoted}}
1257
1258 %description demo-debug
1259 The OpenJDK demos.
1260 %{debug_warning}
1261 %endif
1262
1263 %if %{include_normal_build}
1264 %package src
1265 Summary: OpenJDK Source Bundle
1266 Group: Development/Java
1267
1268 %{java_src_rpo %{nil}}
1269
1270 %description src
1271 The OpenJDK source bundle.
1272 %endif
1273
1274 %if %{include_debug_build}
1275 %package src-debug
1276 Summary: OpenJDK Source Bundle %{for_debug}
1277 Group: Development/Java
1278
1279 %{java_src_rpo -- %{debug_suffix_unquoted}}
1280
1281 %description src-debug
1282 The OpenJDK source bundle %{for_debug}.
1283 %endif
1284
1285 %if %{include_normal_build}
1286 %package javadoc
1287 Summary: OpenJDK API Documentation
1288 Group: Documentation
1289 Requires: jpackage-utils
1290 BuildArch: noarch
1291
1292 %{java_javadoc_rpo %{nil}}
1293
1294 %description javadoc
1295 The OpenJDK API documentation.
1296 %endif
1297
1298 %if %{include_normal_build}
1299 %package javadoc-zip
1300 Summary: OpenJDK API Documentation compressed in single archive
1301 Group: Documentation
1302 Requires: javapackages-tools
1303 BuildArch: noarch
1304
1305 %{java_javadoc_rpo %{nil}}
1306
1307 %description javadoc-zip
1308 The OpenJDK API documentation compressed in single archive.
1309 %endif
1310
1311 %if %{include_debug_build}
1312 %package javadoc-debug
1313 Summary: OpenJDK API Documentation %{for_debug}
1314 Group: Documentation
1315 Requires: jpackage-utils
1316 BuildArch: noarch
1317
1318 %{java_javadoc_rpo -- %{debug_suffix_unquoted}}
1319
1320 %description javadoc-debug
1321 The OpenJDK API documentation %{for_debug}.
1322 %endif
1323
1324 %if %{include_debug_build}
1325 %package javadoc-zip-debug
1326 Summary: OpenJDK API Documentation compressed in single archive %{for_debug}
1327 Group: Documentation
1328 Requires: javapackages-tools
1329 BuildArch: noarch
1330
1331 %{java_javadoc_rpo -- %{debug_suffix_unquoted}}
1332
1333 %description javadoc-zip-debug
1334 The OpenJDK API documentation compressed in single archive %{for_debug}.
1335 %endif
1336
1337
1338 %if %{include_normal_build}
1339 %package accessibility
1340 Summary: OpenJDK accessibility connector
1341
1342 %{java_accessibility_rpo %{nil}}
1343
1344 %description accessibility
1345 Enables accessibility support in OpenJDK by using java-atk-wrapper. This allows
1346 compatible at-spi2 based accessibility programs to work for AWT and Swing-based
1347 programs.
1348
1349 Please note, the java-atk-wrapper is still in beta, and OpenJDK itself is still
1350 being tuned to be working with accessibility features. There are known issues
1351 with accessibility on, so please do not install this package unless you really
1352 need to.
1353 %endif
1354
1355 %if %{include_debug_build}
1356 %package accessibility-debug
1357 Summary: OpenJDK accessibility connector %{for_debug}
1358
1359 %{java_accessibility_rpo -- %{debug_suffix_unquoted}}
1360
1361 %description accessibility-debug
1362 See normal java-%{version}-openjdk-accessibility description.
1363 %endif
1364
1365
1366 %if %{with_openjfx_binding}
1367 %package openjfx
1368 Summary: OpenJDK x OpenJFX connector. This package adds symliks finishing Java FX integration to %{name}
1369 Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
1370 Requires: openjfx%{?_isa}
1371 Provides: javafx = %{epoch}:%{version}-%{release}
1372 %description openjfx
1373 Set of links from OpenJDK (jre) to OpenJFX
1374
1375 %package openjfx-devel
1376 Summary: OpenJDK x OpenJFX connector for FX developers. This package adds symliks finishing Java FX integration to %{name}-devel
1377 Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
1378 Requires: openjfx-devel%{?_isa}
1379 Provides: javafx-devel = %{epoch}:%{version}-%{release}
1380 %description openjfx-devel
1381 Set of links from OpenJDK (sdk) to OpenJFX
1382
1383 %if %{include_debug_build}
1384 %package openjfx-debug
1385 Summary: OpenJDK x OpenJFX connector %{for_debug}. his package adds symliks finishing Java FX integration to %{name}-debug
1386 Requires: %{name}-debug%{?_isa} = %{epoch}:%{version}-%{release}
1387 Requires: openjfx%{?_isa}
1388 Provides: javafx-debug = %{epoch}:%{version}-%{release}
1389 %description openjfx-debug
1390 Set of links from OpenJDK-debug (jre) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1391
1392 %package openjfx-devel-debug
1393 Summary: OpenJDK x OpenJFX connector for FX developers %{for_debug}. This package adds symliks finishing Java FX integration to %{name}-devel-debug
1394 Requires: %{name}-devel-debug%{?_isa} = %{epoch}:%{version}-%{release}
1395 Requires: openjfx-devel%{?_isa}
1396 Provides: javafx-devel-debug = %{epoch}:%{version}-%{release}
1397 %description openjfx-devel-debug
1398 Set of links from OpenJDK-debug (sdk) to normal OpenJFX. OpenJFX do not support debug buuilds of itself
1399 %endif
1400 %endif
1401
1402 %prep
1403 if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
1404 echo "include_normal_build is %{include_normal_build}"
1405 else
1406 echo "include_normal_build is %{include_normal_build}, thats invalid. Use 1 for yes or 0 for no"
1407 exit 11
1408 fi
1409 if [ %{include_debug_build} -eq 0 -o %{include_debug_build} -eq 1 ] ; then
1410 echo "include_debug_build is %{include_debug_build}"
1411 else
1412 echo "include_debug_build is %{include_debug_build}, thats invalid. Use 1 for yes or 0 for no"
1413 exit 12
1414 fi
1415 if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then
1416 echo "you have disabled both include_debug_build and include_debug_build. no go."
1417 exit 13
1418 fi
1419 %setup -q -c -n %{uniquesuffix ""} -T -a 0
1420 # Add the missing files to be able to build under Mageia
1421 tar xjf %{SOURCE4} -C openjdk/jdk --strip-components=1 --overwrite
1422 # https://bugzilla.redhat.com/show_bug.cgi?id=1189084
1423 prioritylength=`expr length %{priority}`
1424 if [ $prioritylength -ne 7 ] ; then
1425 echo "priority must be 7 digits in total, violated"
1426 exit 14
1427 fi
1428 # For old patches
1429 ln -s openjdk jdk8
1430 %if %{use_shenandoah_hotspot}
1431 # On Shenandoah-supported architectures, replace HotSpot with
1432 # the Shenandoah version
1433 pushd openjdk
1434 tar -xf %{SOURCE1}
1435 rm -rf hotspot
1436 mv openjdk/hotspot .
1437 rm -rf openjdk
1438 popd
1439 %endif
1440
1441 cp %{SOURCE2} .
1442
1443 # replace outdated configure guess script
1444 #
1445 # the configure macro will do this too, but it also passes a few flags not
1446 # supported by openjdk configure script
1447 cp %{SOURCE100} openjdk/common/autoconf/build-aux/
1448 cp %{SOURCE101} openjdk/common/autoconf/build-aux/
1449
1450 # OpenJDK patches
1451
1452 # Remove libraries that are linked
1453 sh %{SOURCE12}
1454
1455 # System library fixes
1456 %patch201
1457 %patch202
1458 %patch203
1459
1460 # Debugging fixes
1461 %patch204
1462 %patch205
1463 %patch206
1464 %patch207
1465 %patch208
1466 %patch209
1467 %patch210
1468
1469 %patch1
1470 %patch3
1471 %patch5
1472 %patch7
1473
1474 # s390 build fixes
1475 %patch100
1476 %patch102
1477 %patch103
1478
1479 # ppc64le fixes
1480
1481 %patch603
1482 %patch601
1483 %patch602
1484
1485 # Zero fixes.
1486
1487 # Upstreamable fixes
1488 %patch502
1489 %patch504
1490 %patch506
1491 %patch507
1492 %patch508
1493 %patch509
1494 %patch511
1495 %patch512
1496 #patch513
1497 #patch514
1498 #patch515
1499 #patch516
1500 #patch517
1501 #patch518
1502 #patch519
1503 %patch400
1504 %patch523
1505 %patch526
1506 %patch528
1507 %patch532
1508 %patch535
1509 %patch538
1510 %patch547
1511 %patch550
1512 %patch551
1513 %patch553
1514 %patch555
1515 %patch560
1516 %patch561
1517
1518 # PPC64 updates
1519 %patch556
1520 %patch557
1521 %patch558
1522 %patch559
1523
1524 # RPM-only fixes
1525 %patch525
1526 %patch539
1527
1528 # RHEL-only patches
1529 %if 0%{?rhel}
1530 %patch534
1531 %endif
1532
1533 # 8175887 was added to the Shenandoah HotSpot ahead of time
1534 %if %{use_shenandoah_hotspot}
1535 %else
1536 %patch554
1537 %endif
1538
1539 # Extract systemtap tapsets
1540 %if %{with_systemtap}
1541 tar -x -I xz -f %{SOURCE8}
1542 %if %{include_debug_build}
1543 cp -r tapset tapset%{debug_suffix}
1544 %endif
1545
1546
1547 for suffix in %{build_loop} ; do
1548 for file in "tapset"$suffix/*.in; do
1549 OUTPUT_FILE=`echo $file | sed -e s:%{javaver}\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g`
1550 sed -e s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/server/libjvm.so:g $file > $file.1
1551 # TODO find out which architectures other than i686 have a client vm
1552 %ifarch %{ix86}
1553 sed -e s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/client/libjvm.so:g $file.1 > $OUTPUT_FILE
1554 %else
1555 sed -e '/@ABS_CLIENT_LIBJVM_SO@/d' $file.1 > $OUTPUT_FILE
1556 %endif
1557 sed -i -e s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g $OUTPUT_FILE
1558 sed -i -e s:@INSTALL_ARCH_DIR@:%{archinstall}:g $OUTPUT_FILE
1559 sed -i -e s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g $OUTPUT_FILE
1560 done
1561 done
1562 # systemtap tapsets ends
1563 %endif
1564
1565 # Prepare desktop files
1566 for suffix in %{build_loop} ; do
1567 for file in %{SOURCE9} %{SOURCE10} ; do
1568 FILE=`basename $file | sed -e s:\.in$::g`
1569 EXT="${FILE##*.}"
1570 NAME="${FILE%.*}"
1571 OUTPUT_FILE=$NAME$suffix.$EXT
1572 sed -e s:#JAVA_HOME#:%{sdkbindir -- $suffix}:g $file > $OUTPUT_FILE
1573 sed -i -e s:#JRE_HOME#:%{jrebindir -- $suffix}:g $OUTPUT_FILE
1574 sed -i -e s:#ARCH#:%{version}-%{release}.%{_arch}$suffix:g $OUTPUT_FILE
1575 done
1576 done
1577
1578 # Setup nss.cfg
1579 sed -e s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g %{SOURCE11} > nss.cfg
1580
1581 %build
1582 # How many cpu's do we have?
1583 export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
1584 export NUM_PROC=${NUM_PROC:-1}
1585 %if 0%{?_smp_ncpus_max}
1586 # Honor %%_smp_ncpus_max
1587 [ ${NUM_PROC} -gt %{?_smp_ncpus_max} ] && export NUM_PROC=%{?_smp_ncpus_max}
1588 %endif
1589
1590 # Build IcedTea and OpenJDK.
1591 %ifarch s390x sparc64 alpha %{power64} %{aarch64}
1592 export ARCH_DATA_MODEL=64
1593 %endif
1594 %ifarch alpha
1595 export CFLAGS="$CFLAGS -mieee"
1596 %endif
1597
1598 # We use ourcppflags because the OpenJDK build seems to
1599 # pass EXTRA_CFLAGS to the HotSpot C++ compiler...
1600 # Explicitly set the C++ standard as the default has changed on GCC >= 6
1601 EXTRA_CFLAGS="%ourcppflags -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse"
1602 EXTRA_CPP_FLAGS="%ourcppflags -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse"
1603 %ifarch %{power64} ppc
1604 # fix rpmlint warnings
1605 EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
1606 %endif
1607 export EXTRA_CFLAGS
1608
1609 (cd openjdk/common/autoconf
1610 bash ./autogen.sh
1611 )
1612
1613 for suffix in %{build_loop} ; do
1614 if [ "$suffix" = "%{debug_suffix}" ] ; then
1615 debugbuild=%{debugbuild_parameter}
1616 else
1617 debugbuild=%{normalbuild_parameter}
1618 fi
1619
1620 mkdir -p %{buildoutputdir -- $suffix}
1621 pushd %{buildoutputdir -- $suffix}
1622
1623 bash ../../configure \
1624 %ifnarch %{jit_arches}
1625 --with-jvm-variants=zero \
1626 %endif
1627 --disable-zip-debug-info \
1628 --with-milestone="fcs" \
1629 --with-update-version=%{updatever} \
1630 --with-build-number=%{buildver} \
1631 --with-boot-jdk=/usr/lib/jvm/java-openjdk \
1632 --with-debug-level=$debugbuild \
1633 --enable-unlimited-crypto \
1634 --with-zlib=system \
1635 --with-libjpeg=system \
1636 --with-giflib=system \
1637 --with-libpng=system \
1638 --with-lcms=bundled \
1639 --with-stdc++lib=dynamic \
1640 --with-extra-cxxflags="$EXTRA_CPP_FLAGS" \
1641 --with-extra-cflags="$EXTRA_CFLAGS" \
1642 --with-extra-ldflags="%{ourldflags}" \
1643 --with-num-cores="$NUM_PROC"
1644
1645 cat spec.gmk
1646 cat hotspot-spec.gmk
1647
1648 # The combination of FULL_DEBUG_SYMBOLS=0 and ALT_OBJCOPY=/does_not_exist
1649 # disables FDS for all build configs and reverts to pre-FDS make logic.
1650 # STRIP_POLICY=none says don't do any stripping. DEBUG_BINARIES=true says
1651 # ignore all the other logic about which debug options and just do '-g'.
1652
1653 make \
1654 DEBUG_BINARIES=true \
1655 JAVAC_FLAGS=-g \
1656 STRIP_POLICY=no_strip \
1657 POST_STRIP_CMD="" \
1658 LOG=trace \
1659 SCTP_WERROR= \
1660 %{targets}
1661
1662 make zip-docs
1663
1664 # the build (erroneously) removes read permissions from some jars
1665 # this is a regression in OpenJDK 7 (our compiler):
1666 # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
1667 find images/%{j2sdkimage} -iname '*.jar' -exec chmod ugo+r {} \;
1668 chmod ugo+r images/%{j2sdkimage}/lib/ct.sym
1669
1670 # remove redundant *diz and *debuginfo files
1671 find images/%{j2sdkimage} -iname '*.diz' -exec rm {} \;
1672 find images/%{j2sdkimage} -iname '*.debuginfo' -exec rm {} \;
1673
1674 popd >& /dev/null
1675
1676 # Install nss.cfg right away as we will be using the JRE above
1677 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1678
1679 # Install nss.cfg right away as we will be using the JRE above
1680 install -m 644 nss.cfg $JAVA_HOME/jre/lib/security/
1681
1682 # Use system-wide tzdata
1683 rm $JAVA_HOME/jre/lib/tzdb.dat
1684 ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat
1685
1686 #build cycles
1687 done
1688
1689 %check
1690
1691 # We test debug first as it will give better diagnostics on a crash
1692 for suffix in %{rev_build_loop} ; do
1693
1694 export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1695
1696 # Check unlimited policy has been used
1697 $JAVA_HOME/bin/javac -d . %{SOURCE13}
1698 $JAVA_HOME/bin/java TestCryptoLevel
1699
1700 # Check ECC is working
1701 $JAVA_HOME/bin/javac -d . %{SOURCE14}
1702 $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
1703
1704 # Check debug symbols are present and can identify code
1705 find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
1706 do
1707 if [ -f "$lib" ] ; then
1708 echo "Testing $lib for debug symbols"
1709 # All these tests rely on RPM failing the build if the exit code of any set
1710 # of piped commands is non-zero.
1711
1712 # Test for .debug_* sections in the shared object. This is the main test.
1713 # Stripped objects will not contain these.
1714 eu-readelf -S "$lib" | grep "] .debug_"
1715 test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2
1716
1717 # Test FILE symbols. These will most likely be removed by anyting that
1718 # manipulates symbol tables because it's generally useless. So a nice test
1719 # that nothing has messed with symbols.
1720 old_IFS="$IFS"
1721 IFS=$'\n'
1722 for line in $(eu-readelf -s "$lib" | grep "00000000 0 FILE LOCAL DEFAULT")
1723 do
1724 # We expect to see .cpp files, except for architectures like aarch64 and
1725 # s390 where we expect .o and .oS files
1726 echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|oS))?$"
1727 done
1728 IFS="$old_IFS"
1729
1730 # If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking.
1731 if [ "`basename $lib`" = "libjvm.so" ]; then
1732 eu-readelf -s "$lib" | \
1733 grep -E "00000000 0 FILE LOCAL DEFAULT ABS javaCalls.(cpp|o)$"
1734 fi
1735
1736 # Test that there are no .gnu_debuglink sections pointing to another
1737 # debuginfo file. There shouldn't be any debuginfo files, so the link makes
1738 # no sense either.
1739 eu-readelf -S "$lib" | grep 'gnu'
1740 if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then
1741 echo "bad .gnu_debuglink section."
1742 eu-readelf -x .gnu_debuglink "$lib"
1743 false
1744 fi
1745 fi
1746 done
1747
1748 # Make sure gdb can do a backtrace based on line numbers on libjvm.so
1749 gdb -q "$JAVA_HOME/bin/java" <<EOF | tee gdb.out
1750 handle SIGSEGV pass nostop noprint
1751 handle SIGILL pass nostop noprint
1752 set breakpoint pending on
1753 break javaCalls.cpp:1
1754 commands 1
1755 backtrace
1756 quit
1757 end
1758 run -version
1759 EOF
1760 grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
1761
1762 # Check src.zip has all sources. See RHBZ#1130490
1763 jar -tf $JAVA_HOME/src.zip | grep 'sun.misc.Unsafe'
1764
1765 # Check class files include useful debugging information
1766 $JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
1767 $JAVA_HOME/bin/javap -l java.lang.Object | grep LineNumberTable
1768 $JAVA_HOME/bin/javap -l java.lang.Object | grep LocalVariableTable
1769
1770 # Check generated class files include useful debugging information
1771 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep "Compiled from"
1772 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LineNumberTable
1773 $JAVA_HOME/bin/javap -l java.nio.ByteBuffer | grep LocalVariableTable
1774
1775 #build cycles check
1776 done
1777
1778 %install
1779 STRIP_KEEP_SYMTAB=libjvm*
1780
1781 for suffix in %{build_loop} ; do
1782
1783 pushd %{buildoutputdir -- $suffix}/images/%{j2sdkimage}
1784
1785 #install jsa directories so we can owe them
1786 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/server/
1787 mkdir -p $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/client/
1788
1789 # Install main files.
1790 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1791 cp -a bin include lib src.zip $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1792 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
1793 cp -a jre/bin jre/lib $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}
1794
1795 %if %{with_systemtap}
1796 # Install systemtap support files.
1797 install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset
1798 # note, that uniquesuffix is in BUILD dir in this case
1799 cp -a $RPM_BUILD_DIR/%{uniquesuffix ""}/tapset$suffix/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
1800 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/tapset/
1801 tapsetFiles=`ls *.stp`
1802 popd
1803 install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir}
1804 pushd $RPM_BUILD_ROOT%{tapsetdir}
1805 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir -- $suffix}/tapset %{tapsetdir})
1806 for name in $tapsetFiles ; do
1807 targetName=`echo $name | sed "s/.stp/$suffix.stp/"`
1808 ln -sf $RELATIVE/$name $targetName
1809 done
1810 popd
1811 %endif
1812
1813 # Remove empty cacerts database.
1814 rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security/cacerts
1815 # Install cacerts symlink needed by some apps which hardcode the path.
1816 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir -- $suffix}/lib/security
1817 RELATIVE=$(%{abs2rel} %{_sysconfdir}/pki/java \
1818 %{_jvmdir}/%{jredir -- $suffix}/lib/security)
1819 ln -sf $RELATIVE/cacerts .
1820 popd
1821
1822 # Install extension symlinks.
1823 install -d -m 755 $RPM_BUILD_ROOT%{jvmjardir -- $suffix}
1824 pushd $RPM_BUILD_ROOT%{jvmjardir -- $suffix}
1825 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{jredir -- $suffix}/lib %{jvmjardir -- $suffix})
1826 ln -sf $RELATIVE/jsse.jar jsse-%{version}.jar
1827 ln -sf $RELATIVE/jce.jar jce-%{version}.jar
1828 ln -sf $RELATIVE/rt.jar jndi-%{version}.jar
1829 ln -sf $RELATIVE/rt.jar jndi-ldap-%{version}.jar
1830 ln -sf $RELATIVE/rt.jar jndi-cos-%{version}.jar
1831 ln -sf $RELATIVE/rt.jar jndi-rmi-%{version}.jar
1832 ln -sf $RELATIVE/rt.jar jaas-%{version}.jar
1833 ln -sf $RELATIVE/rt.jar jdbc-stdext-%{version}.jar
1834 ln -sf jdbc-stdext-%{version}.jar jdbc-stdext-3.0.jar
1835 ln -sf $RELATIVE/rt.jar sasl-%{version}.jar
1836 for jar in *-%{version}.jar
1837 do
1838 if [ x%{version} != x%{javaver} ]
1839 then
1840 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|-%{javaver}.jar|g")
1841 fi
1842 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|.jar|g")
1843 done
1844 popd
1845
1846 # Install JCE policy symlinks.
1847 install -d -m 755 $RPM_BUILD_ROOT%{_jvmprivdir}/%{uniquesuffix -- $suffix}/jce/vanilla
1848
1849 # Install versioned symlinks.
1850 pushd $RPM_BUILD_ROOT%{_jvmdir}
1851 ln -sf %{jredir -- $suffix} %{jrelnk -- $suffix}
1852 popd
1853
1854 pushd $RPM_BUILD_ROOT%{_jvmjardir}
1855 ln -sf %{sdkdir $suffix} %{jrelnk $suffix}
1856 popd
1857
1858 # Remove javaws man page
1859 rm -f man/man1/javaws*
1860
1861 # Install man pages.
1862 install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
1863 for manpage in man/man1/*
1864 do
1865 # Convert man pages to UTF8 encoding.
1866 iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
1867 mv -f $manpage.tmp $manpage
1868 install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
1869 $manpage .1)-%{uniquesuffix -- $suffix}.1
1870 done
1871
1872 # Install demos and samples.
1873 cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1874 mkdir -p sample/rmi
1875 if [ ! -e sample/rmi/java-rmi.cgi ] ; then
1876 # hack to allow --short-circuit on install
1877 mv bin/java-rmi.cgi sample/rmi
1878 fi
1879 cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}
1880
1881 popd
1882
1883
1884 # Install Javadoc documentation.
1885 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
1886 cp -a %{buildoutputdir -- $suffix}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
1887 cp -a %{buildoutputdir -- $suffix}/bundles/jdk-%{javaver}_%{updatever}$suffix-%{buildver}-docs.zip $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip
1888
1889 # Install icons and menu entries.
1890 for s in 16 24 32 48 ; do
1891 install -D -p -m 644 \
1892 openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
1893 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}.png
1894 done
1895
1896 # Install desktop files.
1897 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
1898 for e in jconsole$suffix policytool$suffix ; do
1899 desktop-file-install --vendor=%{uniquesuffix -- $suffix} --mode=644 \
1900 --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
1901 done
1902
1903 # Install /etc/.java/.systemPrefs/ directory
1904 # See https://bugzilla.redhat.com/show_bug.cgi?id=741821
1905 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
1906
1907 # FIXME: remove SONAME entries from demo DSOs. See
1908 # https://bugzilla.redhat.com/show_bug.cgi?id=436497
1909
1910 # Find non-documentation demo files.
1911 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
1912 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
1913 -type f -o -type l | sort \
1914 | grep -v README \
1915 | sed 's|'$RPM_BUILD_ROOT'||' \
1916 >> %{name}-demo.files"$suffix"
1917 # Find documentation demo files.
1918 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/demo \
1919 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/sample \
1920 -type f -o -type l | sort \
1921 | grep README \
1922 | sed 's|'$RPM_BUILD_ROOT'||' \
1923 | sed 's|^|%doc |' \
1924 >> %{name}-demo.files"$suffix"
1925
1926 # Create links which leads to separately installed java-atk-bridge and allow configuration
1927 # links points to java-atk-wrapper - an dependence
1928 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}
1929 ln -s %{_libdir}/java-atk-wrapper/libatk-wrapper.so.0 libatk-wrapper.so
1930 popd
1931 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/ext
1932 ln -s %{_libdir}/java-atk-wrapper/java-atk-wrapper.jar java-atk-wrapper.jar
1933 popd
1934 pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/
1935 echo "#Config file to enable java-atk-wrapper" > accessibility.properties
1936 echo "" >> accessibility.properties
1937 echo "assistive_technologies=org.GNOME.Accessibility.AtkWrapper" >> accessibility.properties
1938 echo "" >> accessibility.properties
1939 popd
1940
1941 # intentionally after all else, fx links with redirections on its own
1942 %if %{with_openjfx_binding}
1943 FXSDK_FILES=%{name}-openjfx-devel.files"$suffix"
1944 FXJRE_FILES=%{name}-openjfx.files"$suffix"
1945 echo -n "" > $FXJRE_FILES
1946 echo -n "" > $FXSDK_FILES
1947 for file in %{jfx_jre_libs} ; do
1948 srcfile=%{jfx_jre_libs_dir}/$file
1949 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/$file
1950 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1951 echo $targetfile >> $FXJRE_FILES
1952 done
1953 for file in %{jfx_jre_native} ; do
1954 srcfile=%{jfx_jre_native_dir}/$file
1955 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/%{archinstall}/$file
1956 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1957 echo $targetfile >> $FXJRE_FILES
1958 done
1959 for file in %{jfx_jre_exts} ; do
1960 srcfile=%{jfx_jre_exts_dir}/$file
1961 targetfile=%{_jvmdir}/%{jredir -- $suffix}/lib/ext/$file
1962 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1963 echo $targetfile >> $FXJRE_FILES
1964 done
1965 for file in %{jfx_sdk_libs} ; do
1966 srcfile=%{jfx_sdk_libs_dir}/$file
1967 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/lib/$file
1968 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1969 echo $targetfile >> $FXSDK_FILES
1970 done
1971 for file in %{jfx_sdk_bins} ; do
1972 srcfile=%{jfx_sdk_bins_dir}/$file
1973 targetfile=%{_jvmdir}/%{sdkdir -- $suffix}/bin/$file
1974 ln -s $srcfile $RPM_BUILD_ROOT/$targetfile
1975 echo $targetfile >> $FXSDK_FILES
1976 done
1977 %endif
1978
1979 bash %{SOURCE20} $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix} %{javaver}
1980 # https://bugzilla.redhat.com/show_bug.cgi?id=1183793
1981 touch -t 201401010000 $RPM_BUILD_ROOT/%{_jvmdir}/%{jredir -- $suffix}/lib/security/java.security
1982
1983 # end, dual install
1984 done
1985
1986 %if %{include_normal_build}
1987 # intentioanlly only for non-debug
1988 %pretrans headless -p <lua>
1989 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
1990 -- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre
1991 -- if copy-jdk-configs is in transaction, it installs in pretrans to temp
1992 -- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in tranasction and so is
1993 -- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends
1994 -- whether copy-jdk-configs is installed or not. If so, then configs are copied
1995 -- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
1996 local posix = require "posix"
1997 local debug = false
1998
1999 SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua"
2000 SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua"
2001
2002 local stat1 = posix.stat(SOURCE1, "type");
2003 local stat2 = posix.stat(SOURCE2, "type");
2004
2005 if (stat1 ~= nil) then
2006 if (debug) then
2007 print(SOURCE1 .." exists - copy-jdk-configs in transaction, using this one.")
2008 end;
2009 package.path = package.path .. ";" .. SOURCE1
2010 else
2011 if (stat2 ~= nil) then
2012 if (debug) then
2013 print(SOURCE2 .." exists - copy-jdk-configs alrady installed and NOT in transation. Using.")
2014 end;
2015 package.path = package.path .. ";" .. SOURCE2
2016 else
2017 if (debug) then
2018 print(SOURCE1 .." does NOT exists")
2019 print(SOURCE2 .." does NOT exists")
2020 print("No config files will be copied")
2021 end
2022 return
2023 end
2024 end
2025 -- run contetn of included file with fake args
2026 arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"}
2027 require "copy_jdk_configs.lua"
2028
2029 %post headless
2030 %{post_headless %{nil}}
2031
2032
2033 %postun headless
2034 %{postun_headless %{nil}}
2035
2036 %post devel
2037 %{post_devel %{nil}}
2038
2039 %postun devel
2040 %{postun_devel %{nil}}
2041
2042 %post javadoc
2043 %{post_javadoc %{nil}}
2044
2045 %postun javadoc
2046 %{postun_javadoc %{nil}}
2047
2048 %post javadoc-zip
2049 %{post_javadoc_zip %{nil}}
2050
2051 %postun javadoc-zip
2052 %{postun_javadoc_zip %{nil}}
2053 %endif
2054
2055 %if %{include_normal_build}
2056 %files
2057 # main package builds always
2058 %{files_jre %{nil}}
2059 %else
2060 %files
2061 # placeholder
2062 %endif
2063
2064
2065 %if %{include_normal_build}
2066 %files headless
2067 # important note, see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
2068 # all config/norepalce files (and more) have to be declared in pretrans. See pretrans
2069 %{files_jre_headless %{nil}}
2070
2071 %files devel
2072 %{files_devel %{nil}}
2073
2074 %files demo -f %{name}-demo.files
2075 %{files_demo %{nil}}
2076
2077 %files src
2078 %{files_src %{nil}}
2079
2080 %files javadoc
2081 %{files_javadoc %{nil}}
2082
2083 %files javadoc-zip
2084 %{files_javadoc_zip %{nil}}
2085
2086 %files accessibility
2087 %{files_accessibility %{nil}}
2088
2089 %if %{with_openjfx_binding}
2090 %files openjfx -f %{name}-openjfx.files
2091
2092 %files openjfx-devel -f %{name}-openjfx-devel.files
2093 %endif
2094 %endif
2095
2096 %if %{include_debug_build}
2097 %files debug
2098 %{files_jre -- %{debug_suffix_unquoted}}
2099
2100 %files headless-debug
2101 %{files_jre_headless -- %{debug_suffix_unquoted}}
2102
2103 %files devel-debug
2104 %{files_devel -- %{debug_suffix_unquoted}}
2105
2106 %files demo-debug -f %{name}-demo.files-debug
2107 %{files_demo -- %{debug_suffix_unquoted}}
2108
2109 %files src-debug
2110 %{files_src -- %{debug_suffix_unquoted}}
2111
2112 %files javadoc-debug
2113 %{files_javadoc -- %{debug_suffix_unquoted}}
2114
2115 %files javadoc-zip-debug
2116 %{files_javadoc_zip -- %{debug_suffix_unquoted}}
2117
2118 %files accessibility-debug
2119 %{files_accessibility -- %{debug_suffix_unquoted}}
2120
2121 %if %{with_openjfx_binding}
2122 %files openjfx-debug -f %{name}-openjfx.files-debug
2123
2124 %files openjfx-devel-debug -f %{name}-openjfx-devel.files-debug
2125 %endif
2126 %endif
2127
2128

  ViewVC Help
Powered by ViewVC 1.1.30