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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 463625 - (show annotations) (download)
Sun Aug 4 21:32:45 2013 UTC (7 years ago) by dmorgan
File size: 29391 byte(s)
imported package java-1.8.0-openjdk
1 # If debug is 1, OpenJDK is built with all debug info present.
2 %global debug 0
3
4 %global jdk8_version b89x
5 %global hg_tag jdk8-%{jdk8_version}
6
7 %global aarch64 aarch64 arm64 armv8
8 %global multilib_arches %{power64} sparc64 x86_64 %{aarch64}
9 %global jit_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64}
10
11
12 %ifarch x86_64
13 %global archbuild amd64
14 %global archinstall amd64
15 %endif
16 %ifarch ppc
17 %global archbuild ppc
18 %global archinstall ppc
19 %global archdef PPC
20 %endif
21 %ifarch %{power64}
22 %global archbuild ppc64
23 %global archinstall ppc64
24 %global archdef PPC
25 %endif
26 %ifarch %{ix86}
27 %global archbuild i586
28 %global archinstall i386
29 %endif
30 %ifarch ia64
31 %global archbuild ia64
32 %global archinstall ia64
33 %endif
34 %ifarch s390
35 %global archbuild s390
36 %global archinstall s390
37 %global archdef S390
38 %endif
39 %ifarch s390x
40 %global archbuild s390x
41 %global archinstall s390x
42 %global archdef S390
43 %endif
44 %ifarch %{arm}
45 %global archbuild arm
46 %global archinstall arm
47 %global archdef ARM
48 %endif
49 %ifarch %{aarch64}
50 %global archbuild aarch64
51 %global archinstall aarch64
52 %global archdef AARCH64
53 %endif
54 # 32 bit sparc, optimized for v9
55 %ifarch sparcv9
56 %global archbuild sparc
57 %global archinstall sparc
58 %endif
59 # 64 bit sparc
60 %ifarch sparc64
61 %global archbuild sparcv9
62 %global archinstall sparcv9
63 %endif
64 %ifnarch %{jit_arches}
65 %global archbuild %{_arch}
66 %global archinstall %{_arch}
67 %endif
68
69 %if %{debug}
70 %global debugbuild slowdebug
71 %else
72 %global debugbuild release
73 %endif
74
75 %global buildoutputdir jdk8/build/jdk8.build
76
77 %ifarch %{jit_arches}
78 %global with_systemtap 1
79 %else
80 %global with_systemtap 0
81 %endif
82
83 # Convert an absolute path to a relative path. Each symbolic link is
84 # specified relative to the directory in which it is installed so that
85 # it will resolve properly within chrooted installations.
86 %global script 'use File::Spec; print File::Spec->abs2rel($ARGV[0], $ARGV[1])'
87 %global abs2rel %{__perl} -e %{script}
88
89 # Hard-code libdir on 64-bit architectures to make the 64-bit JDK
90 # simply be another alternative.
91 %ifarch %{multilib_arches}
92 %global syslibdir %{_prefix}/lib64
93 %global _libdir %{_prefix}/lib
94 %global archname %{name}.%{_arch}
95 %else
96 %global syslibdir %{_libdir}
97 %global archname %{name}
98 %endif
99
100 # Standard JPackage naming and versioning defines.
101 %global origin openjdk
102 %global buildver 0
103 # priority must be 6 digits in total
104 %global priority 00000%{buildver}
105 %global javaver 1.8.0
106
107 # Standard JPackage directories and symbolic links.
108 # Make 64-bit JDKs just another alternative on 64-bit architectures.
109 %ifarch %{multilib_arches}
110 %global sdklnk java-%{javaver}-%{origin}.%{_arch}
111 %global jrelnk jre-%{javaver}-%{origin}.%{_arch}
112 %global sdkdir %{name}-%{version}.%{_arch}
113 %else
114 %global sdklnk java-%{javaver}-%{origin}
115 %global jrelnk jre-%{javaver}-%{origin}
116 %global sdkdir %{name}-%{version}
117 %endif
118 %global jredir %{sdkdir}/jre
119 %global sdkbindir %{_jvmdir}/%{sdklnk}/bin
120 %global jrebindir %{_jvmdir}/%{jrelnk}/bin
121 %ifarch %{multilib_arches}
122 %global jvmjardir %{_jvmjardir}/%{name}-%{version}.%{_arch}
123 %else
124 %global jvmjardir %{_jvmjardir}/%{name}-%{version}
125 %endif
126
127 %ifarch %{jit_arches}
128 # Where to install systemtap tapset (links)
129 # We would like these to be in a package specific subdir,
130 # but currently systemtap doesn't support that, so we have to
131 # use the root tapset dir for now. To distinquish between 64
132 # and 32 bit architectures we place the tapsets under the arch
133 # specific dir (note that systemtap will only pickup the tapset
134 # for the primary arch for now). Systemtap uses the machine name
135 # aka build_cpu as architecture specific directory name.
136 %global tapsetroot /usr/share/systemtap
137 %global tapsetdir %{tapsetroot}/tapset/%{_build_cpu}
138 %endif
139
140 # Prevent brp-java-repack-jars from being run.
141 %global __jar_repack 0
142
143 Name: java-%{javaver}-%{origin}
144 Version: %{javaver}.%{buildver}
145 Release: %mkrel 0.11.%{jdk8_version}.1
146 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
147 # and this change was brought into RHEL-4. java-1.5.0-ibm packages
148 # also included the epoch in their virtual provides. This created a
149 # situation where in-the-wild java-1.5.0-ibm packages provided "java =
150 # 1:1.5.0". In RPM terms, "1.6.0 < 1:1.5.0" since 1.6.0 is
151 # interpreted as 0:1.6.0. So the "java >= 1.6.0" requirement would be
152 # satisfied by the 1:1.5.0 packages. Thus we need to set the epoch in
153 # JDK package >= 1.6.0 to 1, and packages referring to JDK virtual
154 # provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0".
155 Epoch: 1
156 Summary: OpenJDK Runtime Environment
157 Group: Development/Java
158
159 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
160 URL: http://openjdk.java.net/
161
162 # Source from upstrem OpenJDK8 project. Use
163 # './generate_source_tarball.sh %{hg_tag}' to generate. The script clones
164 # repositories of jdk8 and aarch64-port and removes code not allowed in Fedora.
165 Source0: jdk8-%{jdk8_version}.tar.xz
166 Source1: aarch64-port-%{jdk8_version}.tar.xz
167
168 # Custom README for -src subpackage
169 Source2: README.src
170
171 # Use 'generate_tarballs.sh' to generate the following tarballs
172 # They are based on code contained in the IcedTea7 project.
173
174 # Systemtap tapsets. Zipped up to keep it small.
175 Source8: systemtap-tapset.tar.gz
176 # .desktop files. Zipped up to keep it small.
177 Source9: desktop-files.tar.gz
178
179 # nss configuration file
180 Source10: nss.cfg
181
182 # Removed libraries that we link instead
183 Source12: remove-intree-libraries.sh
184
185 # Ensure we aren't using the limited crypto policy
186 Source13: TestCryptoLevel.java
187
188 Source100: config.guess
189 Source101: config.sub
190
191 # RPM/distribution specific patches
192
193 # Ignore AWTError when assistive technologies are loaded
194 Patch1: %{name}-accessible-toolkit.patch
195
196 #
197 # OpenJDK specific patches
198 #
199
200 # Recognize s390/s390x
201 Patch100: %{name}-s390.patch
202 # Type fixing for s390
203 Patch101: %{name}-bitmap.patch
204 Patch102: %{name}-size_t.patch
205
206 # Patch for PPC/PPC64
207 Patch103: %{name}-ppc-zero-hotspot.patch
208
209 Patch201: system-libjpeg.patch
210 Patch2011: system-libjpegAARCH64.patch
211 Patch202: system-libpng.patch
212 Patch203: system-lcms.patch
213 Patch2031: system-lcmsAARCH64.patch
214
215 BuildRequires: autoconf
216 BuildRequires: automake
217 BuildRequires: alsa-lib-devel
218 BuildRequires: cups-devel
219 BuildRequires: desktop-file-utils
220 BuildRequires: fontconfig
221 BuildRequires: freetype-devel
222 BuildRequires: giflib-devel
223 BuildRequires: gcc-c++
224 BuildRequires: gtk2-devel
225 BuildRequires: lcms2-devel
226 BuildRequires: libjpeg-devel
227 BuildRequires: libpng-devel
228 #BuildRequires: libxslt
229 BuildRequires: libx11-devel
230 BuildRequires: libxi-devel
231 BuildRequires: libxinerama-devel
232 BuildRequires: libxt-devel
233 BuildRequires: libxtst-devel
234 BuildRequires: pkgconfig
235 BuildRequires: wget
236 BuildRequires: zip
237 # OpenJDK X officially requires OpenJDK (X-1) to build
238 BuildRequires: java-1.7.0-openjdk-devel
239 # Zero-assembler build requirement.
240 %ifnarch %{jit_arches}
241 BuildRequires: libffi-devel
242 %endif
243
244 # cacerts build requirement.
245 BuildRequires: openssl
246 # execstack build requirement.
247 # no prelink on ARM yet
248 %ifnarch %{arm} %{aarch64}
249 BuildRequires: prelink
250 %endif
251 %ifarch %{jit_arches}
252 #systemtap build requirement.
253 BuildRequires: systemtap
254 %endif
255
256 # Require /etc/pki/java/cacerts.
257 Requires: ca-certificates
258 # Require jpackage-utils for ownership of /usr/lib/jvm/
259 Requires: jpackage-utils
260 # Require zoneinfo data provided by tzdata-java subpackage.
261 Requires: tzdata-java
262 # Post requires alternatives to install tool alternatives.
263 Requires(post): %{_sbindir}/alternatives
264 # Postun requires alternatives to uninstall tool alternatives.
265 Requires(postun): %{_sbindir}/alternatives
266
267 # Standard JPackage base provides.
268 Provides: jre8-%{javaver}-%{origin} = %{epoch}:%{version}-%{release}
269 Provides: jre8-%{origin} = %{epoch}:%{version}-%{release}
270 Provides: jre8-%{javaver} = %{epoch}:%{version}-%{release}
271 Provides: java8-%{javaver} = %{epoch}:%{version}-%{release}
272 Provides: jre8 = %{javaver}
273 Provides: java8-%{origin} = %{epoch}:%{version}-%{release}
274 Provides: java8 = %{epoch}:%{javaver}
275 # Standard JPackage extensions provides.
276 Provides: jndi8 = %{epoch}:%{version}
277 Provides: jndi8-ldap = %{epoch}:%{version}
278 Provides: jndi8-cos = %{epoch}:%{version}
279 Provides: jndi8-rmi = %{epoch}:%{version}
280 Provides: jndi8-dns = %{epoch}:%{version}
281 Provides: jaas8 = %{epoch}:%{version}
282 Provides: jsse8 = %{epoch}:%{version}
283 Provides: jce8 = %{epoch}:%{version}
284 Provides: jdbc8-stdext = 4.1
285 Provides: java8-sasl = %{epoch}:%{version}
286 Provides: java8-fonts = %{epoch}:%{version}
287
288 %description
289 The OpenJDK runtime environment.
290
291 %package devel
292 Summary: OpenJDK Development Environment
293 Group: Development/Java
294
295 # Require base package.
296 Requires: %{name} = %{epoch}:%{version}-%{release}
297 # Post requires alternatives to install tool alternatives.
298 Requires(post): %{_sbindir}/alternatives
299 # Postun requires alternatives to uninstall tool alternatives.
300 Requires(postun): %{_sbindir}/alternatives
301
302 # Standard JPackage devel provides.
303 Provides: java8-sdk-%{javaver}-%{origin} = %{epoch}:%{version}
304 Provides: java8-sdk-%{javaver} = %{epoch}:%{version}
305 Provides: java8-sdk-%{origin} = %{epoch}:%{version}
306 Provides: java8-sdk = %{epoch}:%{javaver}
307 Provides: java8-%{javaver}-devel = %{epoch}:%{version}
308 Provides: java8-devel-%{origin} = %{epoch}:%{version}
309 Provides: java8-devel = %{epoch}:%{javaver}
310
311
312 %description devel
313 The OpenJDK development tools.
314
315 %package demo
316 Summary: OpenJDK Demos
317 Group: Development/Java
318
319 Requires: %{name} = %{epoch}:%{version}-%{release}
320
321 %description demo
322 The OpenJDK demos.
323
324 %package src
325 Summary: OpenJDK Source Bundle
326 Group: Development/Java
327 Requires: %{name} = %{epoch}:%{version}-%{release}
328
329 %description src
330 The OpenJDK source bundle.
331
332 %package javadoc
333 Summary: OpenJDK API Documentation
334 Group: Documentation
335 Requires: jpackage-utils
336 BuildArch: noarch
337
338 # Post requires alternatives to install javadoc alternative.
339 Requires(post): %{_sbindir}/alternatives
340 # Postun requires alternatives to uninstall javadoc alternative.
341 Requires(postun): %{_sbindir}/alternatives
342
343 # Standard JPackage javadoc provides.
344 Provides: java8-javadoc = %{epoch}:%{version}-%{release}
345 Provides: java8-%{javaver}-javadoc = %{epoch}:%{version}-%{release}
346
347 %description javadoc
348 The OpenJDK API documentation.
349
350 %prep
351 %ifarch %{aarch64}
352 %global source_num 1
353 %else
354 %global source_num 0
355 %endif
356
357 %setup -q -c -n %{name} -T -a %{source_num}
358 cp %{SOURCE2} .
359
360 #repalce outdated configure guess script
361 cp %{SOURCE100} jdk8/common/autoconf/build-aux/
362 cp %{SOURCE101} jdk8/common/autoconf/build-aux/
363
364 # OpenJDK patches
365
366 # Remove libraries that are linked
367 # disabled until 8 has all system library fixes upstream
368
369 sh %{SOURCE12}
370
371 %ifarch %{aarch64}
372 %patch2011
373 %else
374 %patch201
375 %endif
376
377 %patch202
378
379 %ifarch %{aarch64}
380 %patch2031
381 %else
382 %patch203
383 %endif
384
385
386 %patch1
387
388 # Type fixes for s390
389 %ifarch s390 s390x
390 %patch100
391 %patch101
392 %patch102
393 %endif
394
395 %ifarch ppc %{power64}
396 # PPC fixes
397 %patch103
398 %endif
399
400 # Extract systemtap tapsets
401 %if %{with_systemtap}
402
403 tar xzf %{SOURCE8}
404
405 for file in tapset/*.in; do
406
407 OUTPUT_FILE=`echo $file | sed -e s:\.in$::g`
408 sed -e s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir}/jre/lib/amd64/server/libjvm.so:g $file > $OUTPUT_FILE
409 sed -i -e '/@ABS_CLIENT_LIBJVM_SO@/d' $OUTPUT_FILE
410 sed -i -e s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir}:g $OUTPUT_FILE
411 sed -i -e s:@INSTALL_ARCH_DIR@:%{archinstall}:g $OUTPUT_FILE
412
413 done
414
415 %endif
416
417 # Extract desktop files
418 tar xzf %{SOURCE9}
419
420 %build
421 # How many cpu's do we have?
422 export NUM_PROC=`/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :`
423 export NUM_PROC=${NUM_PROC:-1}
424
425 # Build IcedTea and OpenJDK.
426 %ifarch s390x sparc64 alpha %{power64}
427 export ARCH_DATA_MODEL=64
428 %endif
429 %ifarch alpha
430 export CFLAGS="$CFLAGS -mieee"
431 %endif
432
433 (cd jdk8/common/autoconf
434 bash ./autogen.sh
435 )
436
437 mkdir -p %{buildoutputdir}
438
439 pushd %{buildoutputdir}
440
441 bash ../../configure \
442 %ifnarch %{jit_arches}
443 --with-jvm-variants=zero \
444 %endif
445 --with-build-number=%{buildver} \
446 --with-boot-jdk=/usr/lib/jvm/java-openjdk \
447 --with-debug-level=%{debugbuild} \
448 --enable-unlimited-crypto \
449 --with-zlib=system \
450 --with-giflib=system \
451 --with-libpng=system \
452 --with-lcms=system \
453 --with-stdc++lib=dynamic \
454 --with-num-cores="$NUM_PROC"
455
456 make SCTP_WERROR= DEBUG_BINARIES=true DISABLE_INTREE_EC=true LOG=trace all
457
458 # the build (erroneously) removes read permissions from some jars
459 # this is a regression in OpenJDK 7 (our compiler):
460 # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437
461 find images/j2sdk-image -iname '*.jar' -exec chmod ugo+r {} \;
462 chmod ugo+r images/j2sdk-image/lib/ct.sym
463
464 popd >& /dev/null
465
466 export JAVA_HOME=$(pwd)/%{buildoutputdir}/images/j2sdk-image
467
468 # Copy tz.properties
469 echo "sun.zoneinfo.dir=/usr/share/javazi" >> $JAVA_HOME/jre/lib/tz.properties
470
471 # Check unlimited policy has been used
472 $JAVA_HOME/bin/javac -d . %{SOURCE13}
473 $JAVA_HOME/bin/java TestCryptoLevel
474
475 %install
476 rm -rf $RPM_BUILD_ROOT
477 STRIP_KEEP_SYMTAB=libjvm*
478
479 # Install symlink to default soundfont
480 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/audio
481 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/audio
482 ln -s %{_datadir}/soundfonts/default.sf2
483 popd
484
485 pushd %{buildoutputdir}/images/j2sdk-image
486
487 # Install main files.
488 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}
489 cp -a bin include lib src.zip $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}
490 install -d -m 755 $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}
491 cp -a jre/bin jre/lib $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}
492
493 %ifarch %{jit_arches}
494 # Install systemtap support files.
495 install -dm 755 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/tapset
496 cp -a $RPM_BUILD_DIR/%{name}/tapset/*.stp $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/tapset/
497 install -d -m 755 $RPM_BUILD_ROOT%{tapsetdir}
498 pushd $RPM_BUILD_ROOT%{tapsetdir}
499 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{sdkdir}/tapset %{tapsetdir})
500 ln -sf $RELATIVE/*.stp .
501 popd
502 %endif
503
504 # Install cacerts symlink.
505 rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/security/cacerts
506 pushd $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/security
507 RELATIVE=$(%{abs2rel} %{_sysconfdir}/pki/java \
508 %{_jvmdir}/%{jredir}/lib/security)
509 ln -sf $RELATIVE/cacerts .
510 popd
511
512 # Install extension symlinks.
513 install -d -m 755 $RPM_BUILD_ROOT%{jvmjardir}
514 pushd $RPM_BUILD_ROOT%{jvmjardir}
515 RELATIVE=$(%{abs2rel} %{_jvmdir}/%{jredir}/lib %{jvmjardir})
516 ln -sf $RELATIVE/jsse.jar jsse-%{version}.jar
517 ln -sf $RELATIVE/jce.jar jce-%{version}.jar
518 ln -sf $RELATIVE/rt.jar jndi-%{version}.jar
519 ln -sf $RELATIVE/rt.jar jndi-ldap-%{version}.jar
520 ln -sf $RELATIVE/rt.jar jndi-cos-%{version}.jar
521 ln -sf $RELATIVE/rt.jar jndi-rmi-%{version}.jar
522 ln -sf $RELATIVE/rt.jar jaas-%{version}.jar
523 ln -sf $RELATIVE/rt.jar jdbc-stdext-%{version}.jar
524 ln -sf jdbc-stdext-%{version}.jar jdbc-stdext-3.0.jar
525 ln -sf $RELATIVE/rt.jar sasl-%{version}.jar
526 for jar in *-%{version}.jar
527 do
528 if [ x%{version} != x%{javaver} ]
529 then
530 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|-%{javaver}.jar|g")
531 fi
532 ln -sf $jar $(echo $jar | sed "s|-%{version}.jar|.jar|g")
533 done
534 popd
535
536 # Install JCE policy symlinks.
537 install -d -m 755 $RPM_BUILD_ROOT%{_jvmprivdir}/%{archname}/jce/vanilla
538
539 # Install versionless symlinks.
540 pushd $RPM_BUILD_ROOT%{_jvmdir}
541 ln -sf %{jredir} %{jrelnk}
542 ln -sf %{sdkdir} %{sdklnk}
543 popd
544
545 pushd $RPM_BUILD_ROOT%{_jvmjardir}
546 ln -sf %{sdkdir} %{jrelnk}
547 ln -sf %{sdkdir} %{sdklnk}
548 popd
549
550 # Remove javaws man page
551 rm -f man/man1/javaws*
552
553 # Install man pages.
554 install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1
555 for manpage in man/man1/*
556 do
557 # Convert man pages to UTF8 encoding.
558 iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp
559 mv -f $manpage.tmp $manpage
560 install -m 644 -p $manpage $RPM_BUILD_ROOT%{_mandir}/man1/$(basename \
561 $manpage .1)-%{name}.1
562 done
563
564 # Install demos and samples.
565 cp -a demo $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}
566 mkdir -p sample/rmi
567 mv bin/java-rmi.cgi sample/rmi
568 cp -a sample $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}
569
570 popd
571
572
573 # Install nss.cfg
574 install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_jvmdir}/%{jredir}/lib/security/
575
576
577 # Install Javadoc documentation.
578 install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
579 cp -a %{buildoutputdir}/docs $RPM_BUILD_ROOT%{_javadocdir}/%{name}
580
581 # Install icons and menu entries.
582 for s in 16 24 32 48 ; do
583 install -D -p -m 644 \
584 jdk8/jdk/src/solaris/classes/sun/awt/X11/java-icon${s}.png \
585 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${s}x${s}/apps/java-%{javaver}.png
586 done
587
588 # Install desktop files.
589 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
590 for e in jconsole policytool ; do
591 desktop-file-install --vendor=%{name} --mode=644 \
592 --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
593 done
594
595 # Find JRE directories.
596 find $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} -type d \
597 | grep -v jre/lib/security \
598 | sed 's|'$RPM_BUILD_ROOT'|%dir |' \
599 > %{name}.files
600 # Find JRE files.
601 find $RPM_BUILD_ROOT%{_jvmdir}/%{jredir} -type f -o -type l \
602 | grep -v jre/lib/security \
603 | sed 's|'$RPM_BUILD_ROOT'||' \
604 >> %{name}.files
605 # Find demo directories.
606 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \
607 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample -type d \
608 | sed 's|'$RPM_BUILD_ROOT'|%dir |' \
609 > %{name}-demo.files
610
611 # FIXME: remove SONAME entries from demo DSOs. See
612 # https://bugzilla.redhat.com/show_bug.cgi?id=436497
613
614 # Find non-documentation demo files.
615 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \
616 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample \
617 -type f -o -type l | sort \
618 | grep -v README \
619 | sed 's|'$RPM_BUILD_ROOT'||' \
620 >> %{name}-demo.files
621 # Find documentation demo files.
622 find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \
623 $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/sample \
624 -type f -o -type l | sort \
625 | grep README \
626 | sed 's|'$RPM_BUILD_ROOT'||' \
627 | sed 's|^|%doc |' \
628 >> %{name}-demo.files
629
630 # FIXME: identical binaries are copied, not linked. This needs to be
631 # fixed upstream.
632 %post
633 ext=.gz
634 alternatives \
635 --install %{_bindir}/java java %{jrebindir}/java %{priority} \
636 --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jrelnk} \
637 --slave %{_jvmjardir}/jre jre_exports %{_jvmjardir}/%{jrelnk} \
638 --slave %{_bindir}/keytool keytool %{jrebindir}/keytool \
639 --slave %{_bindir}/orbd orbd %{jrebindir}/orbd \
640 --slave %{_bindir}/pack200 pack200 %{jrebindir}/pack200 \
641 --slave %{_bindir}/rmid rmid %{jrebindir}/rmid \
642 --slave %{_bindir}/rmiregistry rmiregistry %{jrebindir}/rmiregistry \
643 --slave %{_bindir}/servertool servertool %{jrebindir}/servertool \
644 --slave %{_bindir}/tnameserv tnameserv %{jrebindir}/tnameserv \
645 --slave %{_bindir}/unpack200 unpack200 %{jrebindir}/unpack200 \
646 --slave %{_mandir}/man1/java.1$ext java.1$ext \
647 %{_mandir}/man1/java-%{name}.1$ext \
648 --slave %{_mandir}/man1/keytool.1$ext keytool.1$ext \
649 %{_mandir}/man1/keytool-%{name}.1$ext \
650 --slave %{_mandir}/man1/orbd.1$ext orbd.1$ext \
651 %{_mandir}/man1/orbd-%{name}.1$ext \
652 --slave %{_mandir}/man1/pack200.1$ext pack200.1$ext \
653 %{_mandir}/man1/pack200-%{name}.1$ext \
654 --slave %{_mandir}/man1/rmid.1$ext rmid.1$ext \
655 %{_mandir}/man1/rmid-%{name}.1$ext \
656 --slave %{_mandir}/man1/rmiregistry.1$ext rmiregistry.1$ext \
657 %{_mandir}/man1/rmiregistry-%{name}.1$ext \
658 --slave %{_mandir}/man1/servertool.1$ext servertool.1$ext \
659 %{_mandir}/man1/servertool-%{name}.1$ext \
660 --slave %{_mandir}/man1/tnameserv.1$ext tnameserv.1$ext \
661 %{_mandir}/man1/tnameserv-%{name}.1$ext \
662 --slave %{_mandir}/man1/unpack200.1$ext unpack200.1$ext \
663 %{_mandir}/man1/unpack200-%{name}.1$ext
664
665 alternatives \
666 --install %{_jvmdir}/jre-%{origin} \
667 jre_%{origin} %{_jvmdir}/%{jrelnk} %{priority} \
668 --slave %{_jvmjardir}/jre-%{origin} \
669 jre_%{origin}_exports %{_jvmjardir}/%{jrelnk}
670
671 alternatives \
672 --install %{_jvmdir}/jre-%{javaver} \
673 jre_%{javaver} %{_jvmdir}/%{jrelnk} %{priority} \
674 --slave %{_jvmjardir}/jre-%{javaver} \
675 jre_%{javaver}_exports %{_jvmjardir}/%{jrelnk}
676
677 update-desktop-database %{_datadir}/applications &> /dev/null || :
678
679 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
680
681 exit 0
682
683 %postun
684 if [ $1 -eq 0 ]
685 then
686 alternatives --remove java %{jrebindir}/java
687 alternatives --remove jre_%{origin} %{_jvmdir}/%{jrelnk}
688 alternatives --remove jre_%{javaver} %{_jvmdir}/%{jrelnk}
689 fi
690
691 update-desktop-database %{_datadir}/applications &> /dev/null || :
692
693 if [ $1 -eq 0 ] ; then
694 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
695 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
696 fi
697
698 exit 0
699
700 %posttrans
701 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
702
703 %post devel
704 ext=.gz
705 alternatives \
706 --install %{_bindir}/javac javac %{sdkbindir}/javac %{priority} \
707 --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdklnk} \
708 --slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdklnk} \
709 --slave %{_bindir}/appletviewer appletviewer %{sdkbindir}/appletviewer \
710 --slave %{_bindir}/extcheck extcheck %{sdkbindir}/extcheck \
711 --slave %{_bindir}/idlj idlj %{sdkbindir}/idlj \
712 --slave %{_bindir}/jar jar %{sdkbindir}/jar \
713 --slave %{_bindir}/jarsigner jarsigner %{sdkbindir}/jarsigner \
714 --slave %{_bindir}/javadoc javadoc %{sdkbindir}/javadoc \
715 --slave %{_bindir}/javah javah %{sdkbindir}/javah \
716 --slave %{_bindir}/javap javap %{sdkbindir}/javap \
717 --slave %{_bindir}/jcmd jcmd %{sdkbindir}/jcmd \
718 --slave %{_bindir}/jconsole jconsole %{sdkbindir}/jconsole \
719 --slave %{_bindir}/jdb jdb %{sdkbindir}/jdb \
720 --slave %{_bindir}/jhat jhat %{sdkbindir}/jhat \
721 --slave %{_bindir}/jinfo jinfo %{sdkbindir}/jinfo \
722 --slave %{_bindir}/jmap jmap %{sdkbindir}/jmap \
723 --slave %{_bindir}/jps jps %{sdkbindir}/jps \
724 --slave %{_bindir}/jrunscript jrunscript %{sdkbindir}/jrunscript \
725 --slave %{_bindir}/jsadebugd jsadebugd %{sdkbindir}/jsadebugd \
726 --slave %{_bindir}/jstack jstack %{sdkbindir}/jstack \
727 --slave %{_bindir}/jstat jstat %{sdkbindir}/jstat \
728 --slave %{_bindir}/jstatd jstatd %{sdkbindir}/jstatd \
729 --slave %{_bindir}/native2ascii native2ascii %{sdkbindir}/native2ascii \
730 --slave %{_bindir}/policytool policytool %{sdkbindir}/policytool \
731 --slave %{_bindir}/rmic rmic %{sdkbindir}/rmic \
732 --slave %{_bindir}/schemagen schemagen %{sdkbindir}/schemagen \
733 --slave %{_bindir}/serialver serialver %{sdkbindir}/serialver \
734 --slave %{_bindir}/wsgen wsgen %{sdkbindir}/wsgen \
735 --slave %{_bindir}/wsimport wsimport %{sdkbindir}/wsimport \
736 --slave %{_bindir}/xjc xjc %{sdkbindir}/xjc \
737 --slave %{_mandir}/man1/appletviewer.1$ext appletviewer.1$ext \
738 %{_mandir}/man1/appletviewer-%{name}.1$ext \
739 --slave %{_mandir}/man1/extcheck.1$ext extcheck.1$ext \
740 %{_mandir}/man1/extcheck-%{name}.1$ext \
741 --slave %{_mandir}/man1/idlj.1$ext idlj.1$ext \
742 %{_mandir}/man1/idlj-%{name}.1$ext \
743 --slave %{_mandir}/man1/jar.1$ext jar.1$ext \
744 %{_mandir}/man1/jar-%{name}.1$ext \
745 --slave %{_mandir}/man1/jarsigner.1$ext jarsigner.1$ext \
746 %{_mandir}/man1/jarsigner-%{name}.1$ext \
747 --slave %{_mandir}/man1/javac.1$ext javac.1$ext \
748 %{_mandir}/man1/javac-%{name}.1$ext \
749 --slave %{_mandir}/man1/javadoc.1$ext javadoc.1$ext \
750 %{_mandir}/man1/javadoc-%{name}.1$ext \
751 --slave %{_mandir}/man1/javah.1$ext javah.1$ext \
752 %{_mandir}/man1/javah-%{name}.1$ext \
753 --slave %{_mandir}/man1/javap.1$ext javap.1$ext \
754 %{_mandir}/man1/javap-%{name}.1$ext \
755 --slave %{_mandir}/man1/jcmd.1$ext jcmd.1$ext \
756 %{_mandir}/man1/jcmd-%{name}.1$ext \
757 --slave %{_mandir}/man1/jconsole.1$ext jconsole.1$ext \
758 %{_mandir}/man1/jconsole-%{name}.1$ext \
759 --slave %{_mandir}/man1/jdb.1$ext jdb.1$ext \
760 %{_mandir}/man1/jdb-%{name}.1$ext \
761 --slave %{_mandir}/man1/jhat.1$ext jhat.1$ext \
762 %{_mandir}/man1/jhat-%{name}.1$ext \
763 --slave %{_mandir}/man1/jinfo.1$ext jinfo.1$ext \
764 %{_mandir}/man1/jinfo-%{name}.1$ext \
765 --slave %{_mandir}/man1/jmap.1$ext jmap.1$ext \
766 %{_mandir}/man1/jmap-%{name}.1$ext \
767 --slave %{_mandir}/man1/jps.1$ext jps.1$ext \
768 %{_mandir}/man1/jps-%{name}.1$ext \
769 --slave %{_mandir}/man1/jrunscript.1$ext jrunscript.1$ext \
770 %{_mandir}/man1/jrunscript-%{name}.1$ext \
771 --slave %{_mandir}/man1/jsadebugd.1$ext jsadebugd.1$ext \
772 %{_mandir}/man1/jsadebugd-%{name}.1$ext \
773 --slave %{_mandir}/man1/jstack.1$ext jstack.1$ext \
774 %{_mandir}/man1/jstack-%{name}.1$ext \
775 --slave %{_mandir}/man1/jstat.1$ext jstat.1$ext \
776 %{_mandir}/man1/jstat-%{name}.1$ext \
777 --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \
778 %{_mandir}/man1/jstatd-%{name}.1$ext \
779 --slave %{_mandir}/man1/native2ascii.1$ext native2ascii.1$ext \
780 %{_mandir}/man1/native2ascii-%{name}.1$ext \
781 --slave %{_mandir}/man1/policytool.1$ext policytool.1$ext \
782 %{_mandir}/man1/policytool-%{name}.1$ext \
783 --slave %{_mandir}/man1/rmic.1$ext rmic.1$ext \
784 %{_mandir}/man1/rmic-%{name}.1$ext \
785 --slave %{_mandir}/man1/schemagen.1$ext schemagen.1$ext \
786 %{_mandir}/man1/schemagen-%{name}.1$ext \
787 --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \
788 %{_mandir}/man1/serialver-%{name}.1$ext \
789 --slave %{_mandir}/man1/wsgen.1$ext wsgen.1$ext \
790 %{_mandir}/man1/wsgen-%{name}.1$ext \
791 --slave %{_mandir}/man1/wsimport.1$ext wsimport.1$ext \
792 %{_mandir}/man1/wsimport-%{name}.1$ext \
793 --slave %{_mandir}/man1/xjc.1$ext xjc.1$ext \
794 %{_mandir}/man1/xjc-%{name}.1$ext
795
796 alternatives \
797 --install %{_jvmdir}/java-%{origin} \
798 java_sdk_%{origin} %{_jvmdir}/%{sdklnk} %{priority} \
799 --slave %{_jvmjardir}/java-%{origin} \
800 java_sdk_%{origin}_exports %{_jvmjardir}/%{sdklnk}
801
802 alternatives \
803 --install %{_jvmdir}/java-%{javaver} \
804 java_sdk_%{javaver} %{_jvmdir}/%{sdklnk} %{priority} \
805 --slave %{_jvmjardir}/java-%{javaver} \
806 java_sdk_%{javaver}_exports %{_jvmjardir}/%{sdklnk}
807
808 exit 0
809
810 %postun devel
811 if [ $1 -eq 0 ]
812 then
813 alternatives --remove javac %{sdkbindir}/javac
814 alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdklnk}
815 alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdklnk}
816 fi
817
818 exit 0
819
820 %post javadoc
821 alternatives \
822 --install %{_javadocdir}/java javadocdir %{_javadocdir}/%{name}/api \
823 %{priority}
824
825 exit 0
826
827 %postun javadoc
828 if [ $1 -eq 0 ]
829 then
830 alternatives --remove javadocdir %{_javadocdir}/%{name}/api
831 fi
832
833 exit 0
834
835
836 %files -f %{name}.files
837 %defattr(-,root,root,-)
838 %doc %{buildoutputdir}/images/j2sdk-image/jre/ASSEMBLY_EXCEPTION
839 %doc %{buildoutputdir}/images/j2sdk-image/jre/LICENSE
840 %doc %{buildoutputdir}/images/j2sdk-image/jre/THIRD_PARTY_README
841
842 %dir %{_jvmdir}/%{sdkdir}
843 %{_jvmdir}/%{jrelnk}
844 %{_jvmjardir}/%{jrelnk}
845 %{_jvmprivdir}/*
846 %{jvmjardir}
847 %dir %{_jvmdir}/%{jredir}/lib/security
848 %{_jvmdir}/%{jredir}/lib/security/cacerts
849 %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.policy
850 %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.security
851 %{_datadir}/icons/hicolor/*x*/apps/java-%{javaver}.png
852 %{_mandir}/man1/java-%{name}.1*
853 %{_mandir}/man1/keytool-%{name}.1*
854 %{_mandir}/man1/orbd-%{name}.1*
855 %{_mandir}/man1/pack200-%{name}.1*
856 %{_mandir}/man1/rmid-%{name}.1*
857 %{_mandir}/man1/rmiregistry-%{name}.1*
858 %{_mandir}/man1/servertool-%{name}.1*
859 %{_mandir}/man1/tnameserv-%{name}.1*
860 %{_mandir}/man1/unpack200-%{name}.1*
861 %{_jvmdir}/%{jredir}/lib/security/nss.cfg
862 %{_jvmdir}/%{jredir}/lib/audio/
863 %{_jvmdir}/%{jredir}/lib/security/US_export_policy.jar
864 %{_jvmdir}/%{jredir}/lib/security/local_policy.jar
865
866 %files devel
867 %defattr(-,root,root,-)
868 %doc %{buildoutputdir}/images/j2sdk-image/ASSEMBLY_EXCEPTION
869 %doc %{buildoutputdir}/images/j2sdk-image/LICENSE
870 %doc %{buildoutputdir}/images/j2sdk-image/THIRD_PARTY_README
871 %dir %{_jvmdir}/%{sdkdir}/bin
872 %dir %{_jvmdir}/%{sdkdir}/include
873 %dir %{_jvmdir}/%{sdkdir}/lib
874 %ifarch %{jit_arches}
875 %dir %{_jvmdir}/%{sdkdir}/tapset
876 %endif
877 %{_jvmdir}/%{sdkdir}/bin/*
878 %{_jvmdir}/%{sdkdir}/include/*
879 %{_jvmdir}/%{sdkdir}/lib/*
880 %ifarch %{jit_arches}
881 %{_jvmdir}/%{sdkdir}/tapset/*.stp
882 %endif
883 %{_jvmdir}/%{sdklnk}
884 %{_jvmjardir}/%{sdklnk}
885 %{_datadir}/applications/*jconsole.desktop
886 %{_datadir}/applications/*policytool.desktop
887 %{_mandir}/man1/appletviewer-%{name}.1*
888 %{_mandir}/man1/extcheck-%{name}.1*
889 %{_mandir}/man1/idlj-%{name}.1*
890 %{_mandir}/man1/jar-%{name}.1*
891 %{_mandir}/man1/jarsigner-%{name}.1*
892 %{_mandir}/man1/javac-%{name}.1*
893 %{_mandir}/man1/javadoc-%{name}.1*
894 %{_mandir}/man1/javah-%{name}.1*
895 %{_mandir}/man1/javap-%{name}.1*
896 %{_mandir}/man1/jconsole-%{name}.1*
897 %{_mandir}/man1/jcmd-%{name}.1*
898 %{_mandir}/man1/jdb-%{name}.1*
899 %{_mandir}/man1/jhat-%{name}.1*
900 %{_mandir}/man1/jinfo-%{name}.1*
901 %{_mandir}/man1/jmap-%{name}.1*
902 %{_mandir}/man1/jps-%{name}.1*
903 %{_mandir}/man1/jrunscript-%{name}.1*
904 %{_mandir}/man1/jsadebugd-%{name}.1*
905 %{_mandir}/man1/jstack-%{name}.1*
906 %{_mandir}/man1/jstat-%{name}.1*
907 %{_mandir}/man1/jstatd-%{name}.1*
908 %{_mandir}/man1/native2ascii-%{name}.1*
909 %{_mandir}/man1/policytool-%{name}.1*
910 %{_mandir}/man1/rmic-%{name}.1*
911 %{_mandir}/man1/schemagen-%{name}.1*
912 %{_mandir}/man1/serialver-%{name}.1*
913 %{_mandir}/man1/wsgen-%{name}.1*
914 %{_mandir}/man1/wsimport-%{name}.1*
915 %{_mandir}/man1/xjc-%{name}.1*
916 %ifarch %{jit_arches}
917 %{tapsetroot}
918 %endif
919
920 %files demo -f %{name}-demo.files
921 %defattr(-,root,root,-)
922 %doc %{buildoutputdir}/images/j2sdk-image/jre/LICENSE
923
924 %files src
925 %defattr(-,root,root,-)
926 %doc README.src
927 %{_jvmdir}/%{sdkdir}/src.zip
928
929 %files javadoc
930 %defattr(-,root,root,-)
931 %doc %{_javadocdir}/%{name}
932 %doc %{buildoutputdir}/images/j2sdk-image/jre/LICENSE
933

  ViewVC Help
Powered by ViewVC 1.1.28