/[packages]/cauldron/java-1.7.0-openjdk/current/SPECS/java-1.7.0-openjdk.spec
ViewVC logotype

Contents of /cauldron/java-1.7.0-openjdk/current/SPECS/java-1.7.0-openjdk.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 389211 - (show annotations) (download)
Thu Jan 17 21:18:38 2013 UTC (11 years, 5 months ago) by dmorgan
File size: 42853 byte(s)
- introduced tmp-patches source tarball
- added kerberos fix (see rhbz#871771)
- added OpenOffice crusher fix (see oracle's 8004344)

1 # If gcjbootstrap is 1 OpenJDK is bootstrapped against
2 # java-1.5.0-gcj-devel. If gcjbootstrap is 0 OpenJDK is built against
3 # java-1.6.0-openjdk-devel.
4 %global gcjbootstrap 0
5 %global bootstrap 1
6
7 %define _disable_ld_no_undefined 1
8
9 # If debug is 1, OpenJDK is built with all debug info present.
10 %global debug 0
11
12 # If runtests is 0 test suites will not be run.
13 %global runtests 0
14
15 %global icedtea_version 2.3.3
16 %global hg_tag icedtea-{icedtea_version}
17
18 %global accessmajorver 1.23
19 %global accessminorver 0
20 %global accessver %{accessmajorver}.%{accessminorver}
21 %global accessurl http://ftp.gnome.org/pub/GNOME/sources/java-access-bridge/
22
23 %global mauvedate 2008-10-22
24
25 %global multilib_arches ppc64 sparc64 x86_64
26
27 %global jit_arches %{ix86} x86_64 sparcv9 sparc64
28
29 %ifarch x86_64
30 %global archbuild amd64
31 %global archinstall amd64
32 %endif
33 %ifarch ppc
34 %global archbuild ppc
35 %global archinstall ppc
36 %endif
37 %ifarch ppc64
38 %global archbuild ppc64
39 %global archinstall ppc64
40 %endif
41 %ifarch %ix86
42 %global archbuild i586
43 %global archinstall i386
44 %endif
45 %ifarch ia64
46 %global archbuild ia64
47 %global archinstall ia64
48 %endif
49 %ifarch s390
50 %global archbuild s390
51 %global archinstall s390
52 %global archdef S390
53 %endif
54 %ifarch s390x
55 %global archbuild s390x
56 %global archinstall s390x
57 %global archdef S390
58 %endif
59 %ifarch %{arm}
60 %global archbuild arm
61 %global archinstall arm
62 %global archdef ARM
63 %endif
64 # 32 bit sparc, optimized for v9
65 %ifarch sparcv9
66 %global archbuild sparc
67 %global archinstall sparc
68 %endif
69 # 64 bit sparc
70 %ifarch sparc64
71 %global archbuild sparcv9
72 %global archinstall sparcv9
73 %endif
74 %ifnarch %{jit_arches}
75 %global archbuild %{_arch}
76 %global archinstall %{_arch}
77 %endif
78
79 %if %{debug}
80 %global debugbuild debug_build
81 %else
82 %global debugbuild %{nil}
83 %endif
84
85 %global buildoutputdir openjdk/build/linux-%{archbuild}
86
87 %global with_pulseaudio 1
88
89 %ifarch %{jit_arches}
90 %global with_systemtap 1
91 %else
92 %global with_systemtap %{nil}
93 %endif
94
95 # Convert an absolute path to a relative path. Each symbolic link is
96 # specified relative to the directory in which it is installed so that
97 # it will resolve properly within chrooted installations.
98 %global script 'use File::Spec; print File::Spec->abs2rel($ARGV[0], $ARGV[1])'
99 %global abs2rel %{__perl} -e %{script}
100
101 # Hard-code libdir on 64-bit architectures to make the 64-bit JDK
102 # simply be another alternative.
103 %ifarch %{multilib_arches}
104 %global syslibdir %{_prefix}/lib64
105 %global _libdir %{_prefix}/lib
106 %global archname %{name}.%{_arch}
107 %else
108 %global syslibdir %{_libdir}
109 %global archname %{name}
110 %endif
111
112 # Standard JPackage naming and versioning defines.
113 %global origin openjdk
114 %global buildver 6
115 # Keep priority on 6digits in case buildver>9
116 %global priority 17000%{buildver}
117 %global javaver 1.7.0
118
119 # Standard JPackage directories and symbolic links.
120 # Make 64-bit JDKs just another alternative on 64-bit architectures.
121 %ifarch %{multilib_arches}
122 %global sdklnk java-%{javaver}-%{origin}.%{_arch}
123 %global jrelnk jre-%{javaver}-%{origin}.%{_arch}
124 %global sdkdir %{name}-%{version}.%{_arch}
125 %else
126 %global sdklnk java-%{javaver}-%{origin}
127 %global jrelnk jre-%{javaver}-%{origin}
128 %global sdkdir %{name}-%{version}
129 %endif
130 %global jredir %{sdkdir}/jre
131 %global sdkbindir %{_jvmdir}/%{sdklnk}/bin
132 %global jrebindir %{_jvmdir}/%{jrelnk}/bin
133 %ifarch %{multilib_arches}
134 %global jvmjardir %{_jvmjardir}/%{name}-%{version}.%{_arch}
135 %else
136 %global jvmjardir %{_jvmjardir}/%{name}-%{version}
137 %endif
138
139 %ifarch %{jit_arches}
140 # Where to install systemtap tapset (links)
141 # We would like these to be in a package specific subdir,
142 # but currently systemtap doesn't support that, so we have to
143 # use the root tapset dir for now. To distinquish between 64
144 # and 32 bit architectures we place the tapsets under the arch
145 # specific dir (note that systemtap will only pickup the tapset
146 # for the primary arch for now). Systemtap uses the machine name
147 # aka build_cpu as architecture specific directory name.
148 %global tapsetdir /usr/share/systemtap/tapset/%{_build_cpu}
149 %endif
150
151 # Prevent brp-java-repack-jars from being run.
152 %global __jar_repack 0
153
154 Name: java-%{javaver}-%{origin}
155 Version: %{javaver}.%{buildver}
156 Release: %mkrel %{icedtea_version}.3
157 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
158 # and this change was brought into RHEL-4. java-1.5.0-ibm packages
159 # also included the epoch in their virtual provides. This created a
160 # situation where in-the-wild java-1.5.0-ibm packages provided "java =
161 # 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is
162 # interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be
163 # satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in
164 # JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
165 # provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
166 Epoch: 1
167 Summary: OpenJDK Runtime Environment
168 Group: Development/Java
169
170 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
171 URL: http://openjdk.java.net/
172
173 #head
174 #REPO=http://icedtea.classpath.org/hg/icedtea7-forest
175 #current release
176 #REPO=http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3
177 # hg clone $REPO/ openjdk -r %{hg_tag}
178 # hg clone $REPO/corba/ openjdk/corba -r %{hg_tag}
179 # hg clone $REPO/hotspot/ openjdk/hotspot -r %{hg_tag}
180 # hg clone $REPO/jaxp/ openjdk/jaxp -r %{hg_tag}
181 # hg clone $REPO/jaxws/ openjdk/jaxws -r %{hg_tag}
182 # hg clone $REPO/jdk/ openjdk/jdk -r %{hg_tag}
183 # hg clone $REPO/langtools/ openjdk/langtools -r %{hg_tag}
184 # find openjdk -name ".hg" -exec rm -rf '{}' \;
185 # DEPRECATED - find openjdk -name ".hgtags" -exec rm -rf '{}' \; - used for check of corect forest
186 # tar czf openjdk-icedtea-%{icedtea_version}.tar.gz openjdk
187 Source0: openjdk-icedtea-%{icedtea_version}.tar.gz
188
189 # Gnome access bridge
190 # Download-able from accessurl, md5 hash supported
191 Source1: %{accessurl}%{accessmajorver}/java-access-bridge-%{accessver}.tar.bz2
192
193 # README file
194 # This source is under maintainer's/java-team's control
195 Source2: README.src
196
197 # Mauve test suite
198 # FIXME: Is this applicable for 7?
199 # IMHO this should be removed, QA should run this tests in theirs most accurate version asynchronously/periodicaly
200 # Source3 download is no longer possible. GNUclasspath maintainers are no longer supporting releases
201 # To receive this tarball please follow http://sources.redhat.com/mauve/cvs.html (checkout cvs and tar.gz it)
202 Source3: mauve-%{mauvedate}.tar.gz
203 # This file is list of all tests which can be run.
204 # It is outdated now. The complete list can be generated by `find ` in mauve/gnu/testlet, but omg (package) tests should be removed
205 Source4: mauve_tests
206
207 # javac wrapper (used during bootstrap to strip what ecj doesn't support)
208 # This source is under manual control of maintainer/java-team
209 Source5: javac-wrapper
210
211 # Sources 6-12 are taken from hg clone http://icedtea.classpath.org/hg/icedtea7
212 # Unless said differently, there is directory with required sources which should be enough to pack/rename
213
214 # Auto-generated files (used only in bootstrap)
215 # To reproduce:
216 # build OpenJDK7 tarball above with any JDK
217 # mv generated.build generated
218 # tar czf generated-files.tar.gz generated
219 Source6: generated-files.tar.gz
220
221 # Class rewrite to rewrite rhino hierarchy
222 Source7: class-rewriter.tar.gz
223
224 # Systemtap tapsets. Zipped up to keep it small.
225 Source8: systemtap-tapset.tar.gz
226
227 # .desktop files. Zipped up to keep it small.
228 Source9: desktop-files.tar.gz
229
230 # nss configuration file
231 Source10: nss.cfg
232
233 # FIXME: Taken from IcedTea snapshot 877ad5f00f69, but needs to be moved out
234 # hg clone -r 877ad5f00f69 http://icedtea.classpath.org/hg/icedtea7
235 Source11: pulseaudio.tar.gz
236
237 # Removed libraries that we link instead
238 Source12: remove-intree-libraries.sh
239
240 #This archive contains all temporal patches, which are or will be soon upstreamed,
241 #but were needed asap in distribution. Those parches are then applied in loop
242 Source13: tmp-patches-java-1.7.0-openjdk-f17.tar.gz
243
244 # RPM/distribution specific patches
245
246 # Allow TCK to pass with access bridge wired in
247 Patch1: java-1.7.0-openjdk-java-access-bridge-tck.patch
248
249 # Adjust idlj compilation switches to match what system idlj supports
250 Patch2: java-1.7.0-openjdk-java-access-bridge-idlj.patch
251
252 # Disable access to access-bridge packages by untrusted apps
253 Patch3: java-1.7.0-openjdk-java-access-bridge-security.patch
254
255 # Ignore AWTError when assistive technologies are loaded
256 Patch4: java-1.7.0-openjdk-accessible-toolkit.patch
257
258 # Build docs even in debug
259 Patch5: java-1.7.0-openjdk-debugdocs.patch
260
261 # Add debuginfo where missing
262 Patch6: %{name}-debuginfo.patch
263
264 #
265 # OpenJDK specific patches
266 #
267
268 Patch100: rhino.patch
269
270 # Type fixing for s390
271 Patch101: %{name}-bitmap.patch
272 Patch102: %{name}-size_t.patch
273
274 # Patches for Arm
275 Patch103: %{name}-arm-fixes.patch
276
277 # Patch for PPC/PPC64
278 Patch104: %{name}-ppc-zero-jdk.patch
279 Patch105: %{name}-ppc-zero-hotspot.patch
280
281 Patch106: %{name}-freetype-check-fix.patch
282 #
283 # Bootstrap patches (code with this is never shipped)
284 #
285
286 # Explicitly set javac, so that the bootstrap version is used
287 Patch200: bootstrap-ant-javac.patch
288
289 # Adjusted generated sources path to use prebuilt ones
290 Patch201: bootstrap-corba-defs.patch
291
292 # Do not use idlj to generate sources, as we use prebuilt ones
293 Patch202: bootstrap-corba-idlj.patch
294
295 # Disable decending into sources dir for generation
296 Patch203: bootstrap-corba-no-gen.patch
297
298 # Explicitly compile ORB.java
299 Patch204: bootstrap-corba-orb.patch
300
301 # Don't build demos in bootstrap
302 Patch205: bootstrap-demos.patch
303
304 # Change hex constants to be numbers instead of 0x... so that ecj can compile them right
305 Patch206: bootstrap-ecj-fphexconstants.patch
306
307 # Adjust opt flags to remove what ecj doesn't support
308 Patch207: bootstrap-ecj-opts.patch
309
310 # use pre-generated font config files
311 Patch208: bootstrap-fontconfig.patch
312
313 # Don't write auto-generation message in bootstrap
314 Patch209: bootstrap-generated-comments.patch
315
316 # Adjust bootclasspath to match what ecj has
317 Patch210: bootstrap-xbootclasspath.patch
318
319 # Wire in icedtea rt.jar (FIXME: name needs update, kept same for now to match icedtea name)
320 Patch211: bootstrap-icedteart.patch
321
322 # Wire in custom compiles rt classes
323 Patch212: bootstrap-jar.patch
324
325 # Compile inner opengl class explicitly
326 Patch213: bootstrap-javah.patch
327
328 # Disable ct.sym creation for bootstrap
329 Patch214: bootstrap-symbols.patch
330
331 # Disable icon generation for bootstrap
332 Patch215: bootstrap-tobin.patch
333
334 # Don't run test_gamma
335 Patch216: bootstrap-test_gamma.patch
336
337 # Disable requirement of module_lib path which bootstrap java_home doesn't have
338 Patch217: bootstrap-tools.jar.patch
339
340 # Allow -J opts to jar only if jar knows of them
341 Patch218: bootstrap-jopt.patch
342
343 # Explicitly add jaxp classes to classpath
344 Patch219: bootstrap-jaxp-dependency.patch
345
346 # Don't fork when generating stubs
347 Patch220: bootstrap-genstubs-nofork.patch
348
349 # Remove dependency on ProcessBuilder which is package private to Oracle implementation
350 Patch221: bootstrap-break-processbuilder-dependency.patch
351
352 # Allow to build with 1.5
353 Patch222: bootstrap-revert-6973616.patch
354
355 # Avoid trying to load system zone info provider and failing
356 Patch223: bootstrap-revert-6941137.patch
357
358 # Replace usage of string switch with if/elseif/else
359 Patch224: bootstrap-ecj-stringswitch.patch
360
361 # Allow langtools to use older jdk
362 Patch225: bootstrap-langtools-force-old-jdk.patch
363
364 # Access JDK sources and classes from langtools build
365 Patch226: bootstrap-corba-dependencies.patch
366
367 # Access langtools classes for Javadoc
368 Patch227: bootstrap-jaxws-langtools-dependency.patch
369
370 # Access JDK sources for com.sun.net.httpserver
371 Patch228: bootstrap-jaxws-jdk-dependency.patch
372
373 # Access JDK and generated sources to build servicability agent
374 Patch229: bootstrap-hotspot-jdk-dependency.patch
375
376 # Remove use of multi-catch and replace with regular multi-level catch
377 Patch230: bootstrap-ecj-multicatch.patch
378
379 # Remove use of try-with-resources and replace with manual close
380 Patch231: bootstrap-ecj-trywithresources.patch
381
382 # Disable auto-boxing and manally cast
383 Patch232: bootstrap-ecj-autoboxing.patch
384
385 # Use custom xslt processor
386 Patch233: bootstrap-xsltproc.patch
387
388 # Use constants from interface rather than impl
389 Patch234: bootstrap-pr40188.patch
390
391 # Remove use of diamond operator and replace with manual
392 Patch235: bootstrap-ecj-diamond.patch
393
394 # Adjust javah switches to only use what bootstrap version supports
395 Patch236: bootstrap-javah-xbootclasspath.patch
396
397 #
398 # Optional component packages
399 #
400
401 # Make the ALSA based mixer the default when building with the pulseaudio based
402 # mixer
403 Patch300: pulse-soundproperties.patch
404
405 # SystemTap support
406 # Workaround for RH613824
407 Patch302: systemtap.patch
408
409 #Mageia patches
410 Patch400: java-1.7.0-openjdk-fix-link.patch
411
412 BuildRequires: autoconf
413 BuildRequires: automake
414 BuildRequires: alsa-lib-devel
415 BuildRequires: cups-devel
416 BuildRequires: desktop-file-utils
417 BuildRequires: giflib-devel
418 BuildRequires: lcms2-devel
419 BuildRequires: libx11-devel
420 BuildRequires: libxi-devel
421 BuildRequires: libxp-devel
422 BuildRequires: libxt-devel
423 BuildRequires: libxtst-devel
424 BuildRequires: libjpeg-devel
425 BuildRequires: libpng-devel
426 BuildRequires: wget
427 BuildRequires: libxslt-devel
428 BuildRequires: x11-proto-devel
429 BuildRequires: mercurial
430 BuildRequires: ant
431 BuildRequires: ant-nodeps
432 BuildRequires: libxinerama-devel
433 BuildRequires: libxrender-devel
434 BuildRequires: rhino
435 %if %{bootstrap}
436 %if %{gcjbootstrap}
437 BuildRequires: java-1.5.0-gcj-devel
438 BuildRequires: libstdc++-static-devel
439 %else
440 BuildRequires: java-1.7.0-openjdk-devel
441 %endif # gcjbootstrap
442 %else
443 BuildRequires: java-1.7.0-openjdk-devel
444 %endif #bootstrap
445 # Mauve build requirements.
446 BuildRequires: x11-server-xvfb
447 BuildRequires: x11-font-type1
448 BuildRequires: x11-font-misc
449 BuildRequires: freetype2-devel >= 2.3.0
450 BuildRequires: fontconfig
451 BuildRequires: ecj
452 # Java Access Bridge for GNOME build requirements.
453 BuildRequires: at-spi-devel
454 BuildRequires: gawk
455 BuildRequires: libbonobo-activation-devel
456 BuildRequires: pkgconfig >= 0.9.0
457 BuildRequires: pkgconfig(zlib)
458 BuildRequires: xsltproc
459 # PulseAudio build requirements.
460 %if %{with_pulseaudio}
461 BuildRequires: pulseaudio-devel >= 0.9.11
462 BuildRequires: pulseaudio >= 0.9.11
463 %endif
464 # Zero-assembler build requirement.
465 %ifnarch %{jit_arches}
466 BuildRequires: libffi-devel
467 %endif
468 Buildrequires: zip
469 Buildrequires: xprop
470
471 #ExclusiveArch: x86_64 i686
472
473 # cacerts build requirement.
474 BuildRequires: openssl
475 # execstack build requirement.
476 # no prelink on ARM yet
477 %ifnarch %{arm}
478 BuildRequires: prelink
479 %endif
480 %ifarch %{jit_arches}
481 #systemtap build requirement.
482 BuildRequires: systemtap
483 %endif
484
485 Requires: rhino
486 Requires: lcms2
487 #Requires: libjpeg = 6b
488 # Require /etc/pki/java/cacerts.
489 Requires: rootcerts-java
490 # Require jpackage-utils for ant.
491 Requires: jpackage-utils >= 1.7.3-1jpp.2
492 # Require zoneinfo data provided by tzdata-java subpackage.
493 Requires: tzdata-java
494 # Post requires alternatives to install tool alternatives.
495 Requires(post): %{_sbindir}/alternatives
496 # Postun requires alternatives to uninstall tool alternatives.
497 Requires(postun): %{_sbindir}/alternatives
498
499 # Standard JPackage base provides.
500 Provides: jre-%{javaver}-%{origin} = %{epoch}:%{version}-%{release}
501 Provides: jre-%{origin} = %{epoch}:%{version}-%{release}
502 Provides: jre-%{javaver} = %{epoch}:%{version}-%{release}
503 Provides: java-%{javaver} = %{epoch}:%{version}-%{release}
504 Provides: jre = %{javaver}
505 Provides: java-%{origin} = %{epoch}:%{version}-%{release}
506 Provides: java = %{epoch}:%{javaver}
507
508 # Obsolete older 1.6 packages as it cannot use the new bytecode
509 Obsoletes: java-1.6.0-openjdk
510 Obsoletes: java-1.6.0-openjdk-demo
511 Obsoletes: java-1.6.0-openjdk-devel
512 Obsoletes: java-1.6.0-openjdk-javadoc
513 Obsoletes: java-1.6.0-openjdk-src
514
515 # Standard JPackage extensions provides.
516 Provides: jndi = %{epoch}:%{version}
517 Provides: jndi-ldap = %{epoch}:%{version}
518 Provides: jndi-cos = %{epoch}:%{version}
519 Provides: jndi-rmi = %{epoch}:%{version}
520 Provides: jndi-dns = %{epoch}:%{version}
521 Provides: jaas = %{epoch}:%{version}
522 Provides: jsse = %{epoch}:%{version}
523 Provides: jce = %{epoch}:%{version}
524 Provides: jdbc-stdext = 3.0
525 Provides: java-sasl = %{epoch}:%{version}
526 Provides: java-fonts = %{epoch}:%{version}
527
528 %description
529 The OpenJDK runtime environment.
530
531 %package devel
532 Summary: OpenJDK Development Environment
533 Group: Development/Java
534
535 # Require base package.
536 Requires: %{name} = %{epoch}:%{version}-%{release}
537 # Post requires alternatives to install tool alternatives.
538 Requires(post): %{_sbindir}/alternatives
539 # Postun requires alternatives to uninstall tool alternatives.
540 Requires(postun): %{_sbindir}/alternatives
541
542 # Standard JPackage devel provides.
543 Provides: java-sdk-%{javaver}-%{origin} = %{epoch}:%{version}
544 Provides: java-sdk-%{javaver} = %{epoch}:%{version}
545 Provides: java-sdk-%{origin} = %{epoch}:%{version}
546 Provides: java-sdk = %{epoch}:%{javaver}
547 Provides: java-%{javaver}-devel = %{epoch}:%{version}
548 Provides: java-devel-%{origin} = %{epoch}:%{version}
549 Provides: java-devel = %{epoch}:%{javaver}
550
551
552 %description devel
553 The OpenJDK development tools.
554
555 %package demo
556 Summary: OpenJDK Demos
557 Group: Development/Java
558
559 Requires: %{name} = %{epoch}:%{version}-%{release}
560
561 %description demo
562 The OpenJDK demos.
563
564 %package src
565 Summary: OpenJDK Source Bundle
566 Group: Development/Java
567
568 Requires: %{name} = %{epoch}:%{version}-%{release}
569
570 %description src
571 The OpenJDK source bundle.
572
573 %package javadoc
574 Summary: OpenJDK API Documentation
575 Group: Development/Java
576 Requires: jpackage-utils
577 BuildArch: noarch
578
579 # Post requires alternatives to install javadoc alternative.
580 Requires(post): update-alternatives
581 # Postun requires alternatives to uninstall javadoc alternative.
582 Requires(postun): update-alternatives
583
584 # Standard JPackage javadoc provides.
585 Provides: java-javadoc = %{epoch}:%{version}-%{release}
586 Provides: java-%{javaver}-javadoc = %{epoch}:%{version}-%{release}
587
588 %description javadoc
589 The OpenJDK API documentation.
590
591 %prep
592 %setup -q -c -n %{name}
593 %setup -q -n %{name} -T -D -a 3
594 %setup -q -n %{name} -T -D -a 1
595 %setup -q -n %{name} -T -D -a 13
596 cp %{SOURCE2} .
597 cp %{SOURCE4} .
598
599 # OpenJDK patches
600 %patch100
601
602 # pulseaudio support
603 %if %{with_pulseaudio}
604 %patch300
605 %endif
606
607 # Add systemtap patches if enabled
608 %if %{with_systemtap}
609 %patch302
610 %endif
611
612 # Remove libraries that are linked
613 sh %{SOURCE12}
614
615 # Copy jaxp, jaf and jaxws drops
616 mkdir drops/
617
618 # Extract the generated files
619 tar xzf %{SOURCE6}
620
621 # Extract the rewriter (to rewrite rhino classes)
622 tar xzf %{SOURCE7}
623
624 # Extract systemtap tapsets
625 %if %{with_systemtap}
626
627 tar xzf %{SOURCE8}
628
629 for file in tapset/*.in; do
630
631 OUTPUT_FILE=`echo $file | sed -e s:\.in$::g`
632 sed -e s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir}/jre/lib/amd64/server/libjvm.so:g $file > $OUTPUT_FILE
633 sed -i -e '/@ABS_CLIENT_LIBJVM_SO@/d' $OUTPUT_FILE
634 sed -i -e s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir}:g $OUTPUT_FILE
635 sed -i -e s:@INSTALL_ARCH_DIR@:%{archinstall}:g $OUTPUT_FILE
636
637 done
638
639 %endif
640
641 # Pulseaudio
642 %if %{with_pulseaudio}
643 tar xzf %{SOURCE11}
644 %endif
645
646 # Extract desktop files
647 tar xzf %{SOURCE9}
648
649 #apply all patches from tmp-patches
650 TMPPATCHES=`ls tmp-patches/` ;
651 for TP in $TMPPATCHES ; do
652 echo "using patch $TP" ;
653 patch -p1 < tmp-patches/$TP ;
654 r=$? ;
655 if [ "$r" != "0" ] ; then
656 exit 5;
657 fi;
658 done ;
659
660 # If bootstrapping, apply additional patches
661 %if %{gcjbootstrap}
662
663 cp -a openjdk openjdk-boot
664
665 # Add bootstrap patches
666 %patch200
667 %patch201
668 %patch202
669 %patch203
670 %patch204
671 %patch205
672 %patch206
673 %patch207
674 %patch208
675 %patch209
676 %patch210
677 %patch211
678 %patch212
679 %patch213
680 %patch214
681 %patch215
682 %patch216
683 %patch217
684 %patch218
685 %patch219
686 %patch220
687 %patch221
688 %patch222
689 %patch223
690 %patch224
691 %patch225
692 %patch226
693 %patch227
694 %patch228
695 %patch229
696 %patch230
697 %patch231
698 %patch232
699 %patch233
700 %patch234
701 %patch235
702 %patch236
703 %patch400 -p0
704 %endif
705
706 %build
707 # How many cpu's do we have?
708 export NUM_PROC=`/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :`
709 export NUM_PROC=${NUM_PROC:-1}
710
711 # Build IcedTea and OpenJDK.
712 %ifarch s390x sparc64 alpha ppc64
713 export ARCH_DATA_MODEL=64
714 %endif
715 %ifarch alpha
716 export CFLAGS="$CFLAGS -mieee"
717 %endif
718
719 patch -l -p0 < %{PATCH3}
720 patch -l -p0 < %{PATCH4}
721
722 %if %{debug}
723 patch -l -p0 < %{PATCH5}
724 patch -l -p0 < %{PATCH6}
725 %endif
726
727 # Type fixes for s390
728 %ifarch s390 s390x
729 patch -l -p0 < %{PATCH101}
730 #patch -l -p0 < %{PATCH102} # size_t patch disabled for now as it has conflicts
731 %endif
732
733 # Arm fixes
734 %ifarch %{arm}
735 patch -l -p0 < %{PATCH103}
736 %endif
737
738 patch -l -p0 < %{PATCH106}
739
740 %ifarch ppc ppc64
741 # PPC fixes
742 patch -l -p0 < %{PATCH104}
743 patch -l -p0 < %{PATCH105}
744 %endif
745
746 # Add a "-icedtea" tag to the version
747 sed -i "s#BUILD_VARIANT_RELEASE)#BUILD_VARIANT_RELEASE)-icedtea#" openjdk/jdk/make/common/shared/Defs.gmk
748
749 # Build the re-written rhino jar
750 mkdir -p rhino/{old,new}
751
752 # Compile the rewriter
753 (cd rewriter
754 javac com/redhat/rewriter/ClassRewriter.java
755 )
756
757 # Extract rhino.jar contents and rewrite
758 (cd rhino/old
759 jar xf /usr/share/java/rhino.jar
760 )
761
762 java -cp rewriter com.redhat.rewriter.ClassRewriter \
763 $PWD/rhino/old \
764 $PWD/rhino/new \
765 org.mozilla \
766 sun.org.mozilla
767
768 (cd rhino/old
769 for file in `find -type f -not -name '*.class'` ; do
770 new_file=../new/`echo $file | sed -e 's#org#sun/org#'`
771 mkdir -pv `dirname $new_file`
772 cp -v $file $new_file
773 sed -ie 's#org\.mozilla#sun.org.mozilla#g' $new_file
774 done
775 )
776
777 (cd rhino/new
778 jar cfm ../rhino.jar META-INF/MANIFEST.MF sun
779 )
780
781 %if %{gcjbootstrap}
782
783 mkdir -p bootstrap/boot
784
785 # Copy over JAVA_HOME from /usr/lib/jvm/java-gcj/
786 cp -aL %{_jvmdir}/java-gcj/* bootstrap/boot/ || : # broken symlinks can be non-fatal but may cause this to fail
787
788 # Replace javac with a wrapper that does some magic
789 cp -af %{SOURCE5} bootstrap/boot/bin/javac
790 chmod u+x bootstrap/boot/bin/javac # SOURCE5 may not be +x
791 sed -i -e s:@RT_JAR@:$PWD/bootstrap/boot/jre/lib/rt.jar:g bootstrap/boot/bin/javac
792
793 # Link the native2ascii binary
794 ln -sf /usr/bin/gnative2ascii bootstrap/boot/bin/native2ascii
795
796 # We don't need a disassebler, fake it
797 echo "#!/bin/sh
798 exit 0" > bootstrap/boot/bin/javap
799 chmod u+rx bootstrap/boot/bin/javap # We need to run this during build
800
801 # Modules directory
802 mkdir -p bootstrap/boot/lib/modules
803
804 # jdk1.6.0 link
805 rm -f bootstrap/jdk1.6.0
806 ln -sf boot bootstrap/jdk1.6.0
807
808 # Update rt.jar with newer classes
809 # Extra classes to compile for reasons like
810 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42003
811 echo "openjdk-boot/jdk/src/share/classes/java/util/regex/Matcher.java
812 openjdk-boot/jdk/src/share/classes/javax/management/remote/JMXServiceURL.java
813 openjdk-boot/jdk/src/share/classes/javax/management/modelmbean/ModelMBeanInfo.java
814 openjdk-boot/jdk/src/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java
815 openjdk-boot/langtools/src/share/classes/javax/tools/JavaFileManager.java" > rt-source-files
816
817 mkdir -p rt
818 bootstrap/jdk1.6.0/bin/javac -g -encoding utf-8 -source 6 -target 6 -d rt \
819 -classpath %{_jvmdir}/java-gcj/jre/lib/rt.jar \
820 -sourcepath 'generated:openjdk-boot/jdk/src/share/classes:openjdk-boot/jdk/src/solaris/classes:openjdk-boot/langtools/src/share/classes:openjdk-boot/corba/src/share/classes' \
821 -bootclasspath "\'\'" @rt-source-files
822
823 pushd rt
824 zip -qur ../bootstrap/jdk1.6.0/jre/lib/rt.jar *
825 popd
826
827 # clean up
828 rm -f rt-source-files
829 rm -rf rt
830
831 # Build it
832 pushd openjdk-boot
833 cp -a ../generated generated.build
834 chmod u+rwx generated.build
835
836 export ALT_DROPS_DIR=$PWD/../drops
837 export ALT_JDK_IMPORT_PATH="$PWD/../bootstrap/jdk1.6.0"
838 export ALT_BOOTDIR="$PWD/../bootstrap/jdk1.6.0"
839 export BOOTDIR="$PWD/../bootstrap/jdk1.6.0"
840
841 # Set generic profile
842 source jdk/make/jdk_generic_profile.sh
843
844 make \
845 ANT="/usr/bin/ant" \
846 ALT_BOOTDIR="$PWD/../bootstrap/jdk1.6.0" \
847 BOOTDIR="$PWD/../bootstrap/jdk1.6.0" \
848 ICEDTEA_RT="$PWD/../bootstrap/jdk1.6.0/jre/lib/rt.jar" \
849 HOTSPOT_BUILD_JOBS="$NUM_PROC" \
850 NO_DOCS="true" \
851 RHINO_JAR="$PWD/../rhino/rhino.jar" \
852 GENSRCDIR="$PWD/generated.build" \
853 DISABLE_NIMBUS="true" \
854 XSLT="/usr/bin/xsltproc" \
855 FT2_CFLAGS="-I/usr/include/freetype2 " \
856 FT2_LIBS="-lfreetype " \
857 USE_SYSTEM_JPEG="true" \
858 JPEG_LIBS="-ljpeg" \
859 JPEG_CFLAGS="" \
860 USE_SYSTEM_ZLIB="true" \
861 ZLIB_LIBS="-lz" \
862 DEBUG_CLASSFILES="true" \
863 DEBUG_BINARIES="true" \
864 %ifnarch %{jit_arches}
865 LIBFFI_CFLAGS="`pkg-config --cflags libffi` " \
866 LIBFFI_LIBS="-lffi " \
867 ZERO_BUILD="true" \
868 ZERO_LIBARCH="%{archbuild}" \
869 ZERO_ARCHDEF="%{archdef}" \
870 ZERO_ENDIANNESS="little" \
871 %endif
872 %{nil}
873
874 export JDK_TO_BUILD_WITH=$PWD/build/linux-%{archbuild}/j2sdk-image
875
876 popd
877
878 %else
879
880 export JDK_TO_BUILD_WITH=/usr/lib/jvm/java-openjdk
881
882 %endif
883
884 pushd openjdk >& /dev/null
885
886 export ALT_DROPS_DIR=$PWD/../drops
887 export ALT_BOOTDIR="$JDK_TO_BUILD_WITH"
888
889 # Save old umask as jdk_generic_profile overwrites it
890 oldumask=`umask`
891
892 # Set generic profile
893 source jdk/make/jdk_generic_profile.sh
894
895 # Restore old umask
896 umask $oldumask
897
898 make \
899 ANT="/usr/bin/ant" \
900 DISTRO_NAME="Mageia" \
901 DISTRO_PACKAGE_VERSION="mageia-%{release}-%{_arch}" \
902 JDK_UPDATE_VERSION=`printf "%02d" %{buildver}` \
903 MILESTONE="fcs" \
904 HOTSPOT_BUILD_JOBS="$NUM_PROC" \
905 STATIC_CXX="false" \
906 RHINO_JAR="$PWD/../rhino/rhino.jar" \
907 GENSRCDIR="$PWD/generated.build" \
908 FT2_CFLAGS="-I/usr/include/freetype2 " \
909 FT2_LIBS="-lfreetype " \
910 DEBUG_CLASSFILES="true" \
911 DEBUG_BINARIES="true" \
912 STRIP_POLICY="no_strip" \
913 ALT_BOOTDIR="$JDK_TO_BUILD_WITH" \
914 %ifnarch %{jit_arches}
915 LIBFFI_CFLAGS="`pkg-config --cflags libffi` " \
916 LIBFFI_LIBS="-lffi " \
917 ZERO_BUILD="true" \
918 ZERO_LIBARCH="%{archbuild}" \
919 ZERO_ARCHDEF="%{archdef}" \
920 ZERO_ENDIANNESS="little" \
921 %endif
922 %{debugbuild}
923
924 popd >& /dev/null
925
926 %ifarch %{jit_arches}
927 chmod 644 $(pwd)/%{buildoutputdir}/j2sdk-image/lib/sa-jdi.jar
928 %endif
929
930 export JAVA_HOME=$(pwd)/%{buildoutputdir}/j2sdk-image
931
932 # Build pulseaudio and install it to JDK build location
933 %if %{with_pulseaudio}
934 pushd pulseaudio
935 make JAVA_HOME=$JAVA_HOME -f Makefile.pulseaudio
936 cp -pPRf build/native/libpulse-java.so $JAVA_HOME/jre/lib/%{archinstall}/
937 cp -pPRf build/pulse-java.jar $JAVA_HOME/jre/lib/ext/
938 popd
939 %endif
940
941 # Build Java Access Bridge for GNOME.
942 pushd java-access-bridge-%{accessver}
943 patch -l -p1 < %{PATCH1}
944 patch -l -p1 < %{PATCH2}
945 OLD_PATH=$PATH
946 export PATH=$JAVA_HOME/bin:$OLD_PATH
947 ./configure
948 make
949 export PATH=$OLD_PATH
950 cp -a bridge/accessibility.properties $JAVA_HOME/jre/lib
951 chmod 644 gnome-java-bridge.jar
952 cp -a gnome-java-bridge.jar $JAVA_HOME/jre/lib/ext
953 popd
954
955 # Copy tz.properties
956 echo "sun.zoneinfo.dir=/usr/share/javazi" >> $JAVA_HOME/jre/lib/tz.properties
957
958 %if %{runtests}
959 # Run jtreg test suite.
960 {
961 echo ====================JTREG TESTING========================
962 export DISPLAY=:20
963 Xvfb :20 -screen 0 1x1x24 -ac&
964 echo $! > Xvfb.pid
965 make jtregcheck -k
966 kill -9 `cat Xvfb.pid`
967 unset DISPLAY
968 rm -f Xvfb.pid
969 echo ====================JTREG TESTING END====================
970 } || :
971
972 # Run Mauve test suite.
973 {
974 pushd mauve-%{mauvedate}
975 ./configure
976 make
977 echo ====================MAUVE TESTING========================
978 export DISPLAY=:20
979 Xvfb :20 -screen 0 1x1x24 -ac&
980 echo $! > Xvfb.pid
981 $JAVA_HOME/bin/java Harness -vm $JAVA_HOME/bin/java \
982 -file %{SOURCE4} -timeout 30000 2>&1 | tee mauve_output
983 kill -9 `cat Xvfb.pid`
984 unset DISPLAY
985 rm -f Xvfb.pid
986 echo ====================MAUVE TESTING END====================
987 popd
988 } || :
989 %endif
990
991 %install
992 rm -rf $RPM_BUILD_ROOT
993 STRIP_KEEP_SYMTAB=libjvm*
994
995 pushd %{buildoutputdir}/j2sdk-image
996
997 # Install main files.
998 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}
999 cp -a bin include lib src.zip $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}
1000 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}
1001 cp -a jre/bin jre/lib $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}
1002
1003 %ifarch %{jit_arches}
1004 # Install systemtap support files.
1005 install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/tapset
1006 cp -a $RPM_BUILD_DIR/%{name}/tapset/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/tapset/
1007 install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir}
1008 pushd $RPM_BUILD_ROOT%{tapsetdir}
1009 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir}/tapset %{tapsetdir})
1010 ln -sf $RELATIVE/*.stp .
1011 popd
1012 %endif
1013
1014 # Install cacerts symlink.
1015 rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/security/cacerts
1016 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/security
1017 RELATIVE=$(%{abs2rel} %{_sysconfdir}/pki/java \
1018 %{_jvmdir}/%{jredir}/lib/security)
1019 ln -sf $RELATIVE/cacerts .
1020 popd
1021
1022 # Install extension symlinks.
1023 install -d -m 755 $RPM_BUILD_ROOT%{jvmjardir}
1024 pushd $RPM_BUILD_ROOT%{jvmjardir}
1025 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{jredir}/lib %{jvmjardir})
1026 ln -sf $RELATIVE/jsse.jar jsse-%{version}.jar
1027 ln -sf $RELATIVE/jce.jar jce-%{version}.jar
1028 ln -sf $RELATIVE/rt.jar jndi-%{version}.jar
1029 ln -sf $RELATIVE/rt.jar jndi-ldap-%{version}.jar
1030 ln -sf $RELATIVE/rt.jar jndi-cos-%{version}.jar
1031 ln -sf $RELATIVE/rt.jar jndi-rmi-%{version}.jar
1032 ln -sf $RELATIVE/rt.jar jaas-%{version}.jar
1033 ln -sf $RELATIVE/rt.jar jdbc-stdext-%{version}.jar
1034 ln -sf jdbc-stdext-%{version}.jar jdbc-stdext-3.0.jar
1035 ln -sf $RELATIVE/rt.jar sasl-%{version}.jar
1036 for jar in *-%{version}.jar
1037 do
1038 if [ x%{version} != x%{javaver} ]
1039 then
1040 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|-%{javaver}.jar|g")
1041 fi
1042 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|.jar|g")
1043 done
1044 popd
1045
1046 # Install JCE policy symlinks.
1047 install -d -m 755 $RPM_BUILD_ROOT%{_jvmprivdir}/%{archname}/jce/vanilla
1048
1049 # Install versionless symlinks.
1050 pushd $RPM_BUILD_ROOT%{_jvmdir}
1051 ln -sf %{jredir} %{jrelnk}
1052 ln -sf %{sdkdir} %{sdklnk}
1053 popd
1054
1055 pushd $RPM_BUILD_ROOT%{_jvmjardir}
1056 ln -sf %{sdkdir} %{jrelnk}
1057 ln -sf %{sdkdir} %{sdklnk}
1058 popd
1059
1060 # Remove javaws man page
1061 rm -f man/man1/javaws*
1062
1063 # Install man pages.
1064 install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
1065 for manpage in man/man1/*
1066 do
1067 # Convert man pages to UTF8 encoding.
1068 iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
1069 mv -f $manpage.tmp $manpage
1070 install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
1071 $manpage .1)-%{name}.1
1072 done
1073
1074 # Install demos and samples.
1075 cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}
1076 mkdir -p sample/rmi
1077 mv bin/java-rmi.cgi sample/rmi
1078 cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}
1079
1080 popd
1081
1082
1083 # Install nss.cfg
1084 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/security/
1085
1086 # Install Javadoc documentation.
1087 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
1088 cp -a %{buildoutputdir}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{name}
1089
1090 # Install icons and menu entries.
1091 for s in 16 24 32 48 ; do
1092 install -D -p -m 644 \
1093 openjdk/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
1094 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}.png
1095 done
1096
1097 # Install desktop files.
1098 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
1099 for e in jconsole policytool ; do
1100 desktop-file-install --vendor=%{name} --mode=644 \
1101 --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
1102 done
1103
1104 # Find JRE directories.
1105 find $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} -type d \
1106 | grep -v jre/lib/security \
1107 | sed 's|'$RPM_BUILD_ROOT'|%dir |' \
1108 > %{name}.files
1109 # Find JRE files.
1110 find $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} -type f -o -type l \
1111 | grep -v jre/lib/security \
1112 | sed 's|'$RPM_BUILD_ROOT'||' \
1113 >> %{name}.files
1114 # Find demo directories.
1115 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \
1116 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample -type d \
1117 | sed 's|'$RPM_BUILD_ROOT'|%dir |' \
1118 > %{name}-demo.files
1119
1120 # FIXME: remove SONAME entries from demo DSOs. See
1121 # https://bugzilla.redhat.com/show_bug.cgi?id=436497
1122
1123 # Find non-documentation demo files.
1124 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \
1125 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample \
1126 -type f -o -type l | sort \
1127 | grep -v README \
1128 | sed 's|'$RPM_BUILD_ROOT'||' \
1129 >> %{name}-demo.files
1130 # Find documentation demo files.
1131 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \
1132 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample \
1133 -type f -o -type l | sort \
1134 | grep README \
1135 | sed 's|'$RPM_BUILD_ROOT'||' \
1136 | sed 's|^|%doc |' \
1137 >> %{name}-demo.files
1138
1139 # FIXME: identical binaries are copied, not linked. This needs to be
1140 # fixed upstream.
1141 %post
1142 ext=.xz
1143 alternatives \
1144 --install %{_bindir}/java java %{jrebindir}/java %{priority} \
1145 --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jrelnk} \
1146 --slave %{_jvmjardir}/jre jre_exports %{_jvmjardir}/%{jrelnk} \
1147 --slave %{_bindir}/keytool keytool %{jrebindir}/keytool \
1148 --slave %{_bindir}/orbd orbd %{jrebindir}/orbd \
1149 --slave %{_bindir}/pack200 pack200 %{jrebindir}/pack200 \
1150 --slave %{_bindir}/rmid rmid %{jrebindir}/rmid \
1151 --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir}/rmiregistry \
1152 --slave %{_bindir}/servertool servertool %{jrebindir}/servertool \
1153 --slave %{_bindir}/tnameserv tnameserv %{jrebindir}/tnameserv \
1154 --slave %{_bindir}/unpack200 unpack200 %{jrebindir}/unpack200 \
1155 --slave %{_mandir}/man1/java.1$ext java.1$ext \
1156 %{_mandir}/man1/java-%{name}.1$ext \
1157 --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \
1158 %{_mandir}/man1/keytool-%{name}.1$ext \
1159 --slave %{_mandir}/man1/orbd.1$ext orbd.1$ext \
1160 %{_mandir}/man1/orbd-%{name}.1$ext \
1161 --slave %{_mandir}/man1/pack200.1$ext pack200.1$ext \
1162 %{_mandir}/man1/pack200-%{name}.1$ext \
1163 --slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \
1164 %{_mandir}/man1/rmid-%{name}.1$ext \
1165 --slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \
1166 %{_mandir}/man1/rmiregistry-%{name}.1$ext \
1167 --slave %{_mandir}/man1/servertool.1$ext servertool.1$ext \
1168 %{_mandir}/man1/servertool-%{name}.1$ext \
1169 --slave %{_mandir}/man1/tnameserv.1$ext tnameserv.1$ext \
1170 %{_mandir}/man1/tnameserv-%{name}.1$ext \
1171 --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \
1172 %{_mandir}/man1/unpack200-%{name}.1$ext
1173
1174 alternatives \
1175 --install %{_jvmdir}/jre-%{origin} \
1176 jre_%{origin} %{_jvmdir}/%{jrelnk} %{priority} \
1177 --slave %{_jvmjardir}/jre-%{origin} \
1178 jre_%{origin}_exports %{_jvmjardir}/%{jrelnk}
1179
1180 alternatives \
1181 --install %{_jvmdir}/jre-%{javaver} \
1182 jre_%{javaver} %{_jvmdir}/%{jrelnk} %{priority} \
1183 --slave %{_jvmjardir}/jre-%{javaver} \
1184 jre_%{javaver}_exports %{_jvmjardir}/%{jrelnk}
1185
1186 exit 0
1187
1188 %postun
1189 if [ $1 -eq 0 ]
1190 then
1191 alternatives --remove java %{jrebindir}/java
1192 alternatives --remove jre_%{origin} %{_jvmdir}/%{jrelnk}
1193 alternatives --remove jre_%{javaver} %{_jvmdir}/%{jrelnk}
1194 fi
1195
1196 exit 0
1197
1198 %post devel
1199 ext=.xz
1200 alternatives \
1201 --install %{_bindir}/javac javac %{sdkbindir}/javac %{priority} \
1202 --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdklnk} \
1203 --slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdklnk} \
1204 --slave %{_bindir}/appletviewer appletviewer %{sdkbindir}/appletviewer \
1205 --slave %{_bindir}/apt apt %{sdkbindir}/apt \
1206 --slave %{_bindir}/extcheck extcheck %{sdkbindir}/extcheck \
1207 --slave %{_bindir}/jar jar %{sdkbindir}/jar \
1208 --slave %{_bindir}/jarsigner jarsigner %{sdkbindir}/jarsigner \
1209 --slave %{_bindir}/javadoc javadoc %{sdkbindir}/javadoc \
1210 --slave %{_bindir}/javah javah %{sdkbindir}/javah \
1211 --slave %{_bindir}/javap javap %{sdkbindir}/javap \
1212 --slave %{_bindir}/jconsole jconsole %{sdkbindir}/jconsole \
1213 --slave %{_bindir}/jdb jdb %{sdkbindir}/jdb \
1214 --slave %{_bindir}/jhat jhat %{sdkbindir}/jhat \
1215 --slave %{_bindir}/jinfo jinfo %{sdkbindir}/jinfo \
1216 --slave %{_bindir}/jmap jmap %{sdkbindir}/jmap \
1217 --slave %{_bindir}/jps jps %{sdkbindir}/jps \
1218 --slave %{_bindir}/jrunscript jrunscript %{sdkbindir}/jrunscript \
1219 --slave %{_bindir}/jsadebugd jsadebugd %{sdkbindir}/jsadebugd \
1220 --slave %{_bindir}/jstack jstack %{sdkbindir}/jstack \
1221 --slave %{_bindir}/jstat jstat %{sdkbindir}/jstat \
1222 --slave %{_bindir}/jstatd jstatd %{sdkbindir}/jstatd \
1223 --slave %{_bindir}/native2ascii native2ascii %{sdkbindir}/native2ascii \
1224 --slave %{_bindir}/policytool policytool %{sdkbindir}/policytool \
1225 --slave %{_bindir}/rmic rmic %{sdkbindir}/rmic \
1226 --slave %{_bindir}/schemagen schemagen %{sdkbindir}/schemagen \
1227 --slave %{_bindir}/serialver serialver %{sdkbindir}/serialver \
1228 --slave %{_bindir}/wsgen wsgen %{sdkbindir}/wsgen \
1229 --slave %{_bindir}/wsimport wsimport %{sdkbindir}/wsimport \
1230 --slave %{_bindir}/xjc xjc %{sdkbindir}/xjc \
1231 --slave %{_mandir}/man1/appletviewer.1$ext appletviewer.1$ext \
1232 %{_mandir}/man1/appletviewer-%{name}.1$ext \
1233 --slave %{_mandir}/man1/apt.1$ext apt.1$ext \
1234 %{_mandir}/man1/apt-%{name}.1$ext \
1235 --slave %{_mandir}/man1/extcheck.1$ext extcheck.1$ext \
1236 %{_mandir}/man1/extcheck-%{name}.1$ext \
1237 --slave %{_mandir}/man1/jar.1$ext jar.1$ext \
1238 %{_mandir}/man1/jar-%{name}.1$ext \
1239 --slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \
1240 %{_mandir}/man1/jarsigner-%{name}.1$ext \
1241 --slave %{_mandir}/man1/javac.1$ext javac.1$ext \
1242 %{_mandir}/man1/javac-%{name}.1$ext \
1243 --slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \
1244 %{_mandir}/man1/javadoc-%{name}.1$ext \
1245 --slave %{_mandir}/man1/javah.1$ext javah.1$ext \
1246 %{_mandir}/man1/javah-%{name}.1$ext \
1247 --slave %{_mandir}/man1/javap.1$ext javap.1$ext \
1248 %{_mandir}/man1/javap-%{name}.1$ext \
1249 --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \
1250 %{_mandir}/man1/jconsole-%{name}.1$ext \
1251 --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \
1252 %{_mandir}/man1/jdb-%{name}.1$ext \
1253 --slave %{_mandir}/man1/jhat.1$ext jhat.1$ext \
1254 %{_mandir}/man1/jhat-%{name}.1$ext \
1255 --slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \
1256 %{_mandir}/man1/jinfo-%{name}.1$ext \
1257 --slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \
1258 %{_mandir}/man1/jmap-%{name}.1$ext \
1259 --slave %{_mandir}/man1/jps.1$ext jps.1$ext \
1260 %{_mandir}/man1/jps-%{name}.1$ext \
1261 --slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \
1262 %{_mandir}/man1/jrunscript-%{name}.1$ext \
1263 --slave %{_mandir}/man1/jsadebugd.1$ext jsadebugd.1$ext \
1264 %{_mandir}/man1/jsadebugd-%{name}.1$ext \
1265 --slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \
1266 %{_mandir}/man1/jstack-%{name}.1$ext \
1267 --slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \
1268 %{_mandir}/man1/jstat-%{name}.1$ext \
1269 --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \
1270 %{_mandir}/man1/jstatd-%{name}.1$ext \
1271 --slave %{_mandir}/man1/native2ascii.1$ext native2ascii.1$ext \
1272 %{_mandir}/man1/native2ascii-%{name}.1$ext \
1273 --slave %{_mandir}/man1/policytool.1$ext policytool.1$ext \
1274 %{_mandir}/man1/policytool-%{name}.1$ext \
1275 --slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \
1276 %{_mandir}/man1/rmic-%{name}.1$ext \
1277 --slave %{_mandir}/man1/schemagen.1$ext schemagen.1$ext \
1278 %{_mandir}/man1/schemagen-%{name}.1$ext \
1279 --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \
1280 %{_mandir}/man1/serialver-%{name}.1$ext \
1281 --slave %{_mandir}/man1/wsgen.1$ext wsgen.1$ext \
1282 %{_mandir}/man1/wsgen-%{name}.1$ext \
1283 --slave %{_mandir}/man1/wsimport.1$ext wsimport.1$ext \
1284 %{_mandir}/man1/wsimport-%{name}.1$ext \
1285 --slave %{_mandir}/man1/xjc.1$ext xjc.1$ext \
1286 %{_mandir}/man1/xjc-%{name}.1$ext
1287
1288 alternatives \
1289 --install %{_jvmdir}/java-%{origin} \
1290 java_sdk_%{origin} %{_jvmdir}/%{sdklnk} %{priority} \
1291 --slave %{_jvmjardir}/java-%{origin} \
1292 java_sdk_%{origin}_exports %{_jvmjardir}/%{sdklnk}
1293
1294 alternatives \
1295 --install %{_jvmdir}/java-%{javaver} \
1296 java_sdk_%{javaver} %{_jvmdir}/%{sdklnk} %{priority} \
1297 --slave %{_jvmjardir}/java-%{javaver} \
1298 java_sdk_%{javaver}_exports %{_jvmjardir}/%{sdklnk}
1299
1300 exit 0
1301
1302 %postun devel
1303 if [ $1 -eq 0 ]
1304 then
1305 alternatives --remove javac %{sdkbindir}/javac
1306 alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdklnk}
1307 alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdklnk}
1308 fi
1309
1310 exit 0
1311
1312 %post javadoc
1313 alternatives \
1314 --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{name}/api \
1315 %{priority}
1316
1317 exit 0
1318
1319 %postun javadoc
1320 if [ $1 -eq 0 ]
1321 then
1322 alternatives --remove javadocdir %{_javadocdir}/%{name}/api
1323 fi
1324
1325 exit 0
1326
1327
1328 %files -f %{name}.files
1329 %doc %{buildoutputdir}/j2sdk-image/jre/ASSEMBLY_EXCEPTION
1330 %doc %{buildoutputdir}/j2sdk-image/jre/LICENSE
1331 %doc %{buildoutputdir}/j2sdk-image/jre/THIRD_PARTY_README
1332
1333 %dir %{_jvmdir}/%{sdkdir}
1334 %{_jvmdir}/%{jrelnk}
1335 %{_jvmjardir}/%{jrelnk}
1336 %{_jvmprivdir}/*
1337 %{jvmjardir}
1338 %dir %{_jvmdir}/%{jredir}/lib/security
1339 %{_jvmdir}/%{jredir}/lib/security/cacerts
1340 %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.policy
1341 %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.security
1342 %{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}.png
1343 %{_mandir}/man1/java-%{name}.1*
1344 %{_mandir}/man1/keytool-%{name}.1*
1345 %{_mandir}/man1/orbd-%{name}.1*
1346 %{_mandir}/man1/pack200-%{name}.1*
1347 %{_mandir}/man1/rmid-%{name}.1*
1348 %{_mandir}/man1/rmiregistry-%{name}.1*
1349 %{_mandir}/man1/servertool-%{name}.1*
1350 %{_mandir}/man1/tnameserv-%{name}.1*
1351 %{_mandir}/man1/unpack200-%{name}.1*
1352 %{_jvmdir}/%{jredir}/lib/security/nss.cfg
1353
1354 %files devel
1355 %doc %{buildoutputdir}/j2sdk-image/ASSEMBLY_EXCEPTION
1356 %doc %{buildoutputdir}/j2sdk-image/LICENSE
1357 %doc %{buildoutputdir}/j2sdk-image/THIRD_PARTY_README
1358 %dir %{_jvmdir}/%{sdkdir}/bin
1359 %dir %{_jvmdir}/%{sdkdir}/include
1360 %dir %{_jvmdir}/%{sdkdir}/lib
1361 %ifarch %{jit_arches}
1362 %dir %{_jvmdir}/%{sdkdir}/tapset
1363 %endif
1364 %{_jvmdir}/%{sdkdir}/bin/*
1365 %{_jvmdir}/%{sdkdir}/include/*
1366 %{_jvmdir}/%{sdkdir}/lib/*
1367 %ifarch %{jit_arches}
1368 %{_jvmdir}/%{sdkdir}/tapset/*.stp
1369 %endif
1370 %{_jvmdir}/%{sdklnk}
1371 %{_jvmjardir}/%{sdklnk}
1372 %{_datadir}/applications/*jconsole.desktop
1373 %{_datadir}/applications/*policytool.desktop
1374 %{_mandir}/man1/appletviewer-%{name}.1*
1375 %{_mandir}/man1/apt-%{name}.1*
1376 %{_mandir}/man1/extcheck-%{name}.1*
1377 %{_mandir}/man1/idlj-%{name}.1*
1378 %{_mandir}/man1/jar-%{name}.1*
1379 %{_mandir}/man1/jarsigner-%{name}.1*
1380 %{_mandir}/man1/javac-%{name}.1*
1381 %{_mandir}/man1/javadoc-%{name}.1*
1382 %{_mandir}/man1/javah-%{name}.1*
1383 %{_mandir}/man1/javap-%{name}.1*
1384 %{_mandir}/man1/jconsole-%{name}.1*
1385 %{_mandir}/man1/jcmd-%{name}.1*
1386 %{_mandir}/man1/jdb-%{name}.1*
1387 %{_mandir}/man1/jhat-%{name}.1*
1388 %{_mandir}/man1/jinfo-%{name}.1*
1389 %{_mandir}/man1/jmap-%{name}.1*
1390 %{_mandir}/man1/jps-%{name}.1*
1391 %{_mandir}/man1/jrunscript-%{name}.1*
1392 %{_mandir}/man1/jsadebugd-%{name}.1*
1393 %{_mandir}/man1/jstack-%{name}.1*
1394 %{_mandir}/man1/jstat-%{name}.1*
1395 %{_mandir}/man1/jstatd-%{name}.1*
1396 %{_mandir}/man1/native2ascii-%{name}.1*
1397 %{_mandir}/man1/policytool-%{name}.1*
1398 %{_mandir}/man1/rmic-%{name}.1*
1399 %{_mandir}/man1/schemagen-%{name}.1*
1400 %{_mandir}/man1/serialver-%{name}.1*
1401 %{_mandir}/man1/wsgen-%{name}.1*
1402 %{_mandir}/man1/wsimport-%{name}.1*
1403 %{_mandir}/man1/xjc-%{name}.1*
1404 %ifarch %{jit_arches}
1405 %{tapsetdir}/*.stp
1406 %endif
1407
1408 %files demo -f %{name}-demo.files
1409 %doc %{buildoutputdir}/j2sdk-image/jre/LICENSE
1410
1411 %files src
1412 %doc README.src
1413 %{_jvmdir}/%{sdkdir}/src.zip
1414 %if %{runtests}
1415 # FIXME: put these in a separate testresults subpackage.
1416 %doc mauve_tests
1417 %doc mauve-%{mauvedate}/mauve_output
1418 %doc test/jtreg-summary.log
1419 %endif
1420
1421 %files javadoc
1422 %doc %{_javadocdir}/%{name}
1423 %doc %{buildoutputdir}/j2sdk-image/jre/LICENSE
1424

  ViewVC Help
Powered by ViewVC 1.1.30