relax version requirements when renaming directories
[packages/openjdk8.git] / openjdk8.spec
CommitLineData
0fa4da98
JP
1%bcond_with bootstrap # build a bootstrap version, using icedtea6
2%bcond_without cacerts # don't include the default CA certificates
3899c70b
JK
3
4%if %{with bootstrap}
0fa4da98 5%define use_jdk icedtea8
3899c70b
JK
6%else
7%define use_jdk openjdk8
8%endif
9
0fa4da98
JP
10%ifarch %{ix86} %{x8664} sparc ppc64 ppc64le %{arm} aarch64
11%define with_jfr 1
12%endif
13
3899c70b 14# class data version seen with file(1) that this jvm is able to load
c5052a68 15%define _classdataversion 52.0
3899c70b 16
c296b123 17%define ver_u 312
0fa4da98 18
83cf7429
ER
19Summary: Open-source implementation of the Java Platform, Standard Edition
20Summary(pl.UTF-8): Wolnoźródłowa implementacja Java 8 SE
9910e19d 21Name: openjdk8
0fa4da98
JP
22Version: 1.8.0.%{ver_u}
23Release: 1
24Epoch: 1
3899c70b
JK
25License: GPL v2
26Group: Development/Languages/Java
0fa4da98 27Source0: https://hg.openjdk.java.net/jdk8u/jdk8u/archive/jdk8u%{ver_u}-ga.tar.bz2?/%{name}-%{version}.tar.bz2
c296b123 28# Source0-md5: a44c9a3a7c5bca3860905c24ad21b449
0fa4da98 29Source1: https://hg.openjdk.java.net/jdk8u/jdk8u/corba/archive/jdk8u%{ver_u}-ga.tar.bz2?/%{name}-corba-%{version}.tar.bz2
c296b123 30# Source1-md5: 26b7d05ce243e7e4c2e9bcc106386b42
0fa4da98 31Source2: https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/archive/jdk8u%{ver_u}-ga.tar.bz2?/%{name}-hotspot-%{version}.tar.bz2
c296b123 32# Source2-md5: 9132b24a6a5cfdd0265f369367a60d71
0fa4da98 33Source3: https://hg.openjdk.java.net/jdk8u/jdk8u/jaxp/archive/jdk8u%{ver_u}-ga.tar.bz2?/%{name}-jaxp-%{version}.tar.bz2
c296b123 34# Source3-md5: 84bfc99cc384863e06e330fc1b04e048
0fa4da98 35Source4: https://hg.openjdk.java.net/jdk8u/jdk8u/jaxws/archive/jdk8u%{ver_u}-ga.tar.bz2?/%{name}-jaxws-%{version}.tar.bz2
c296b123 36# Source4-md5: e8ce03c81dc9f6252e412dc0f27ddbe0
0fa4da98 37Source5: https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/archive/jdk8u%{ver_u}-ga.tar.bz2?/%{name}-jdk-%{version}.tar.bz2
c296b123 38# Source5-md5: 22147c9a4ecac8e1f6ea2af02480ebd5
0fa4da98 39Source6: https://hg.openjdk.java.net/jdk8u/jdk8u/langtools/archive/jdk8u%{ver_u}-ga.tar.bz2?/%{name}-langtools-%{version}.tar.bz2
c296b123 40# Source6-md5: e93f4fa1d9221fe235d74dac0034d052
0fa4da98 41Source7: https://hg.openjdk.java.net/jdk8u/jdk8u/nashorn/archive/jdk8u%{ver_u}-ga.tar.bz2?/%{name}-nashorn-%{version}.tar.bz2
c296b123
JP
42# Source7-md5: 70462a74254e22e14d4759c4af4fbc2d
43Source8: https://hg.openjdk.java.net/aarch32-port/jdk8u/hotspot/archive/jdk8u%{ver_u}-b06-aarch32-20210923.tar.bz2?/%{name}-hotspot-aarch32-%{version}.tar.bz2
44# Source8-md5: 718e61ddf0d704495aea330433676848
3899c70b 45Source10: make-cacerts.sh
5b4e4f20
JK
46Patch0: adjust-mflags.patch
47Patch1: format_strings.patch
d12f28e3 48Patch2: CompileDemos.patch
ce94f011 49Patch3: libpath.patch
991454fa
JK
50Patch4: system-libjpeg.patch
51Patch5: system-libpng.patch
52Patch6: system-lcms.patch
53Patch7: system-pcsclite.patch
38bddea5 54Patch8: x32.patch
0fa4da98
JP
55Patch9: gcc11.patch
56Patch10: link-with-as-needed.patch
57Patch11: aarch32.patch
ac6ec47b 58Patch12: atomic.patch
d164db4b 59Patch13: hotspot-disable-werror.patch
b2950e84 60URL: http://openjdk.java.net/
9910e19d 61BuildRequires: /usr/bin/jar
b2950e84
JK
62BuildRequires: alsa-lib-devel
63BuildRequires: ant
64BuildRequires: autoconf
65BuildRequires: bash
66%{?with_cacerts:BuildRequires: ca-certificates-update}
67BuildRequires: cups-devel
0fa4da98 68BuildRequires: elfutils-devel
b2950e84
JK
69BuildRequires: freetype-devel >= 2.3
70BuildRequires: gawk
665079f5 71BuildRequires: giflib-devel >= 5.1
b2950e84 72BuildRequires: glibc-misc
0fa4da98 73%buildrequires_jdk
991454fa 74BuildRequires: lcms2-devel
ac6ec47b
JP
75%ifarch %{arm}
76BuildRequires: libatomic-devel
77%endif
3899c70b 78BuildRequires: libjpeg-devel
991454fa 79BuildRequires: libpng-devel
3899c70b 80BuildRequires: lsb-release
991454fa 81BuildRequires: pcsc-lite-devel
3899c70b
JK
82BuildRequires: pkgconfig
83BuildRequires: rpmbuild(macros) >= 1.557
3899c70b
JK
84BuildRequires: unzip
85BuildRequires: util-linux
86BuildRequires: xorg-lib-libX11-devel
87BuildRequires: xorg-lib-libXinerama-devel
88BuildRequires: xorg-lib-libXp-devel
89BuildRequires: xorg-lib-libXrender-devel
90BuildRequires: xorg-lib-libXt-devel
91BuildRequires: xorg-lib-libXtst-devel
92BuildRequires: xorg-proto-printproto-devel
93BuildRequires: xorg-proto-xproto-devel
94BuildRequires: zip
95BuildRequires: zlib-devel
0fa4da98
JP
96Requires: %{name}-appletviewer = %{epoch}:%{version}-%{release}
97Requires: %{name}-jdk = %{epoch}:%{version}-%{release}
3899c70b
JK
98Suggests: %{name}-jre-X11
99Suggests: icedtea-web
100Obsoletes: icedtea6
101Obsoletes: icedtea7
0fa4da98 102Obsoletes: icedtea8
3899c70b
JK
103Obsoletes: java-gcj-compat
104Obsoletes: java-gcj-compat-devel
105Obsoletes: java-sun
106Obsoletes: java-sun-demos
107Obsoletes: java-sun-jre
9910e19d 108Obsoletes: java-sun-jre-X11
3899c70b
JK
109Obsoletes: java-sun-jre-alsa
110Obsoletes: java-sun-jre-jdbc
3899c70b 111Obsoletes: java-sun-tools
9910e19d
JK
112Obsoletes: java5-sun
113Obsoletes: java5-sun-jre
114Obsoletes: java5-sun-jre-X11
115Obsoletes: java5-sun-jre-jdbc
116Obsoletes: java5-sun-tools
3899c70b
JK
117Obsoletes: oracle-java7
118Obsoletes: oracle-java7-jre
9910e19d 119Obsoletes: oracle-java7-jre-X11
3899c70b
JK
120Obsoletes: oracle-java7-jre-alsa
121Obsoletes: oracle-java7-jre-jdbc
3899c70b
JK
122Obsoletes: oracle-java7-tools
123BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
124
125%define dstreldir %{name}-%{version}
126%define dstdir %{_jvmdir}/%{dstreldir}
127%define jrereldir %{dstreldir}/jre
128%define jredir %{_jvmdir}/%{jrereldir}
129%define jvmjardir %{_jvmjardir}/%{name}-%{version}
130
131%ifarch %{x8664}
132%define jre_arch amd64
133%endif
134%ifarch %{ix86}
135%define jre_arch i386
136%endif
137%ifarch x32
138%define jre_arch x32
139%endif
0fa4da98
JP
140%ifarch aarch64
141%define jre_arch aarch64
142%endif
143%ifarch %{arm}
144%define jre_arch arm
145%endif
146
147%ifarch %{arm}
148%define jvm_type client
149%else
150%define jvm_type server
151%endif
3899c70b
JK
152
153# to break artificial subpackage dependency loops
154%define _noautoreq 'libmawt.so' java\\\\(ClassDataVersion\\\\)
155
156%description
157Open-source implementation of the Java Platform, Standard Edition.
158
159This is a meta-package which provides, by its dependencies, all the
160OpenJDK components including the OpenJDK, Java 8 developement kit and
161runtime environment.
162
163%description -l pl.UTF-8
164Wolnoźródłowa implementacja Java 8 SE.
165
166To jest meta-pakiet, który, za pośrednictwem zależności, dostarcza
167wszystkie komponenty OpenJDK, w tym środowisko programistyczne
168(OpenJDK) i uruchomieniowe (JRE).
169
170%package jdk
171Summary: OpenJDK - software development kit
172Summary(pl.UTF-8): OpenJDK - środowisko programistyczne
173Group: Development/Languages/Java
0fa4da98
JP
174Requires: %{name}-jar = %{epoch}:%{version}-%{release}
175Requires: %{name}-jdk-base = %{epoch}:%{version}-%{release}
176Requires: %{name}-jre = %{epoch}:%{version}-%{release}
177Provides: j2sdk = %{version}
178Provides: jdk = %{version}
3899c70b
JK
179Obsoletes: blackdown-java-sdk
180Obsoletes: ibm-java
181Obsoletes: icedtea6-jdk
182Obsoletes: icedtea7-jdk
0fa4da98 183Obsoletes: icedtea8-jdk
3899c70b
JK
184Obsoletes: java-blackdown
185Obsoletes: java-gcj-compat-devel
186Obsoletes: java-sun
187Obsoletes: java5-sun
3899c70b
JK
188Obsoletes: jdk
189Obsoletes: kaffe
9910e19d 190Obsoletes: oracle-java7
3899c70b
JK
191
192%description jdk
193This package symlinks OpenJDK development tools provided by
194%{name}-jdk-base to system-wide directories like %{_bindir}, making
195OpenJDK the default JDK.
196
197%description jdk -l pl.UTF-8
198Ten pakiet tworzy symboliczne dowiązania do narzędzi programistycznych
199OpenJDK, dostarczanych przez pakiet %{name}-jdk-base, w standardowych
200systemowych ścieżkach takich jak %{_bindir}, sprawiając tym samym, że
201OpenJDK staje się domyślnym JDK w systemie.
202
203%package jdk-base
204Summary: OpenJDK - software development kit
205Summary(pl.UTF-8): Kod OpenJDK - środowisko programistyczne
206Group: Development/Languages/Java
0fa4da98
JP
207Requires: %{name}-jre-base = %{epoch}:%{version}-%{release}
208Requires: jpackage-utils >= 0:1.7.5-8
3899c70b
JK
209Provides: jdk(%{name})
210
211%description jdk-base
212OpenJDK development tools built using free software only.
213
214%description jdk-base -l pl.UTF-8
215OpenJDK skompilowane wyłącznie przy użyciu wolnego oprogramowania.
216
217%package jre
218Summary: OpenJDK - runtime environment
219Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe
220Group: Development/Languages/Java
0fa4da98 221Requires: %{name}-jre-base = %{epoch}:%{version}-%{release}
3899c70b
JK
222Requires: nss >= 1:3.13.4
223# Require zoneinfo data provided by java-tzdata subpackage.
224Requires: java-tzdata
225Provides: java
226Provides: java(ClassDataVersion) = %{_classdataversion}
227Provides: java(jaas) = %{version}
228Provides: java(jaf) = 1.1.1
229Provides: java(jaxp) = 1.3
230Provides: java(jaxp_parser_impl)
231Provides: java(jce) = %{version}
232Provides: java(jdbc-stdext) = %{version}
233Provides: java(jdbc-stdext) = 3.0
234Provides: java(jmx) = 1.4
235Provides: java(jndi) = %{version}
236Provides: java(jsse) = %{version}
237Provides: java1.4
0fa4da98 238Provides: jre = %{version}
3899c70b
JK
239Obsoletes: icedtea6-jre
240Obsoletes: icedtea7-jre
0fa4da98
JP
241Obsoletes: icedtea8-jre
242Obsoletes: jaas
243Obsoletes: jaf
3899c70b 244Obsoletes: java-gcj-compat
0fa4da98
JP
245Obsoletes: java-jaxp
246Obsoletes: java-jdbc-stdext
3899c70b
JK
247Obsoletes: java-sun-jre
248Obsoletes: java5-sun-jre
0fa4da98
JP
249Obsoletes: jce
250Obsoletes: jdbc-stdext
251Obsoletes: jmx
252Obsoletes: jndi
b2950e84 253Obsoletes: jre
0fa4da98 254Obsoletes: jsse
9910e19d 255Obsoletes: oracle-java7-jre
3899c70b
JK
256
257%description jre
258This package symlinks OpenJDK runtime environment tools provided by
259%{name}-jre-base to system-wide directories like %{_bindir}, making
260OpenJDK the default JRE.
261
262%description jre -l pl.UTF-8
263Ten pakiet tworzy symboliczne dowiązania do środowiska
264uruchomieniowego OpenJDK, dostarczanych przez pakiet %{name}-jre-base,
265w standardowych systemowych ścieżkach takich jak %{_bindir},
266sprawiając tym samym, że OpenJDK staje się domyślnym JRE w systemie.
267
268%package jre-X11
269Summary: OpenJDK - runtime environment - X11 support
270Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa X11
271Group: Development/Languages/Java
0fa4da98
JP
272Requires: %{name}-jre = %{epoch}:%{version}-%{release}
273Requires: %{name}-jre-base-X11 = %{epoch}:%{version}-%{release}
274Provides: jre-X11 = %{version}
3899c70b
JK
275Obsoletes: icedtea6-jre-X11
276Obsoletes: icedtea7-jre-X11
0fa4da98 277Obsoletes: icedtea8-jre-X11
3899c70b
JK
278Obsoletes: java-sun-jre-X11
279Obsoletes: oracle-java7-jre-X11
280
281%description jre-X11
282X11 support for OpenJDK runtime environment built using free software
283only.
284
285%description jre-X11 -l pl.UTF-8
286Biblioteki X11 dla środowiska OpenJDK zbudowany wyłocznie przy uzyciu
287wolnego oprogramowania.
288
289%package jre-base
290Summary: OpenJDK - runtime environment
291Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe
292Group: Development/Languages/Java
0fa4da98 293Requires: jpackage-utils >= 0:1.7.5-8
3899c70b
JK
294Provides: jre(%{name})
295
296%description jre-base
297OpenJDK runtime environment built using free software only.
298
299%description jre-base -l pl.UTF-8
300Środowisko uruchomieniowe OpenJDK zbudowany wyłącznie przy użyciu
301wolnego oprogramowania.
302
303%package jre-base-X11
304Summary: OpenJDK - runtime environment - X11 support
305Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa X11
306Group: Development/Languages/Java
0fa4da98
JP
307Requires: %{name}-jre-base = %{epoch}:%{version}-%{release}
308Requires: %{name}-jre-base-freetype = %{epoch}:%{version}-%{release}
3899c70b
JK
309
310%description jre-base-X11
311X11 support for OpenJDK runtime environment built using free software
312only.
313
314%description jre-base-X11 -l pl.UTF-8
315Biblioteki X11 dla środowiska OpenJDK zbudowany wyłocznie przy uzyciu
316wolnego oprogramowania.
317
318%package jre-base-alsa
319Summary: OpenJDK - runtime environment - ALSA support
320Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa ALSA
321Group: Development/Languages/Java
0fa4da98 322Requires: %{name}-jre-base = %{epoch}:%{version}-%{release}
3899c70b
JK
323
324%description jre-base-alsa
325ALSA sound support for OpenJDK runtime environment build using free
326software only.
327
328%description jre-base-alsa -l pl.UTF-8
329Biblioteki ALSA rozszerzające środowisko OpenJDK o obsługę dźwięku
330zbudowane przy uzyciu wyłącznie wolnego oprogramowania.
331
332%package jre-base-freetype
333Summary: OpenJDK - runtime environment - font support
334Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa fontów
335Group: Development/Languages/Java
0fa4da98 336Requires: %{name}-jre-base = %{epoch}:%{version}-%{release}
3899c70b
JK
337
338%description jre-base-freetype
339Font handling library for OpenJDK runtime environment built using free
340software only.
341
342%description jre-base-freetype -l pl.UTF-8
343Biblioteki obsługi czcionek dla OpenJDK zbudowane wyłącznie przy
344użyciu wolnego oprogramowania.
345
346%package jre-base-gtk
347Summary: OpenJDK - runtime environment - GTK support
348Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa GTK
349Group: Development/Languages/Java
0fa4da98 350Requires: %{name}-jre-base = %{epoch}:%{version}-%{release}
3899c70b
JK
351
352%description jre-base-gtk
353GTK support for OpenJDK runtime environment.
354
355%description jre-base-gtk -l pl.UTF-8
356Biblioteki GTK dla OpenJDK.
357
358%package jar
359Summary: OpenJDK - JAR tool
360Summary(pl.UTF-8): OpenJDK - narzędzie JAR
361Group: Development/Languages/Java
0fa4da98 362Requires: %{name}-jdk-base = %{epoch}:%{version}-%{release}
3899c70b
JK
363Provides: jar
364Obsoletes: fastjar
365Obsoletes: icedtea6-jar
366Obsoletes: icedtea7-jar
0fa4da98 367Obsoletes: icedtea8-jar
3899c70b
JK
368Obsoletes: jar
369
370%description jar
371JAR tool from OpenJDK built using free software only.
372
373JAR is an archiver used to merge Java classes into a single library.
374
375%description jar -l pl.UTF-8
376Narzędzie jar z OpenJDK zbudowane przy uzyciu wyłącznie wolnego
377oprogramowania.
378
379JAR jest narzędziem pozwalającym wykonywać podstawowe operacje na
380archiwach javy .jar takie jak na przykład tworzenie lub rozpakowywanie
381archiwów.
382
383%package appletviewer
384Summary: OpenJDK - appletviewer tool
385Summary(pl.UTF-8): OpenJDK - narzędzie appletviewer
386Group: Development/Languages/Java
0fa4da98
JP
387Requires: %{name}-jdk-base = %{epoch}:%{version}-%{release}
388Requires: %{name}-jre-X11 = %{epoch}:%{version}-%{release}
3899c70b
JK
389Obsoletes: icedtea6-appletviewer
390Obsoletes: icedtea7-appletviewer
0fa4da98 391Obsoletes: icedtea8-appletviewer
3899c70b
JK
392Obsoletes: java-sun-appletviewer
393Obsoletes: oracle-java7-appletviewer
394
395%description appletviewer
396Appletviewer from OpenJDK build using free software only.
397
398%description appletviewer -l pl.UTF-8
399Appletviewer pozwala uruchamiać aplety javy niezależnie od
400przeglądarki www. Ten appletviewer pochodzi z zestawu narzędzi OpenJDK
401i został zbudowany wyłącznie przy użyciu wolnego oprogramowania.
402
403%package jdk-sources
404Summary: OpenJDK - sources
405Summary(pl.UTF-8): OpenJDK - kod źródłowy
406Group: Documentation
3899c70b 407BuildArch: noarch
3899c70b
JK
408
409%description jdk-sources
410Source code for the OpenJDK development kit and Java standard library.
411
412%description jdk-sources -l pl.UTF-8
413Kod źródłowy narzędzi programistycznych OpenJDK oraz standardowej
414biblioteki Javy.
415
416%package examples
417Summary: OpenJDK - examples
418Summary(pl.UTF-8): OpenJDK - przykłady
419Group: Documentation
3899c70b 420BuildArch: noarch
3899c70b
JK
421
422%description examples
423Code examples for OpenJDK.
424
425%description examples -l pl.UTF-8
426Przykłady dla OpenJDK.
427
428%prep
0fa4da98
JP
429%setup -qn jdk8u-jdk8u%{ver_u}-ga -a1 -a3 -a4 -a5 -a6 -a7
430%ifarch %{arm}
431tar xf %{SOURCE8}
432%else
433tar xf %{SOURCE2}
434%endif
3899c70b 435
d517bd94
JP
436for d in *-jdk8u%{ver_u}-*; do
437 mv "$d" "${d%%-jdk8u%{ver_u}-*}"
3899c70b
JK
438done
439
5b4e4f20
JK
440%patch0 -p1
441%patch1 -p1
d12f28e3 442%patch2 -p1
ce94f011 443%patch3 -p1
991454fa
JK
444%patch4 -p1
445%patch5 -p1
446%patch6 -p1
447%patch7 -p1
38bddea5 448%patch8 -p1
4f9ad6d4 449%patch9 -p1
2e7929e1 450%patch10 -p1
0fa4da98
JP
451%ifarch %{arm}
452%patch11 -p1
ac6ec47b 453%patch12 -p1
0fa4da98 454%endif
d164db4b 455%patch13 -p1
5b4e4f20 456
3899c70b
JK
457%build
458# Make sure we have /proc mounted - otherwise idlc will fail later.
459if [ ! -f /proc/self/stat ]; then
460 echo "You need to have /proc mounted in order to build this package!"
461 exit 1
462fi
463
0fa4da98
JP
464unset JAVA_HOME
465unset CLASSPATH
466
467mkdir -p build-bin
468export PATH="$(pwd)/build-bin:$PATH"
469
991454fa 470cd common/autoconf
bd96d31d 471rm generated-configure.sh
991454fa
JK
472%{__autoconf} -o generated-configure.sh
473cd ../..
474
d12f28e3 475export SHELL=/bin/bash
3899c70b 476
5b4e4f20
JK
477chmod a+x configure
478
2dab85d0 479# disable-debug-symbols so openjdk debuginfo handling won't conflict with ours
5b4e4f20 480%configure \
bd96d31d
JK
481%ifarch x32
482 --with-jvm-variants=zero \
483%endif
0fa4da98
JP
484 --with-boot-jdk="%{java_home}" \
485 --with-extra-cflags="%{rpmcppflags} %{rpmcflags}" \
486 --with-extra-cxxflags="%{rpmcppflags} %{rpmcxxflags}" \
5b4e4f20 487 --with-extra-ldflags="%{rpmldflags}" \
0fa4da98
JP
488 --with-native-debug-symbols=none \
489 --with-jobs="%{__jobs}" \
665079f5 490 --with-giflib=system \
991454fa
JK
491 --with-libjpeg=system \
492 --with-libpng=system \
493 --with-lcms=system \
494 --with-libpcsclite=system \
0fa4da98
JP
495 --with-zlib=system \
496 --with-update-version="%{ver_u}" \
497 --with-build-number="%{release}" \
498 --with-milestone="ga" \
499 --with-vendor-name="PLD-Linux" \
500 --with-vendor-url="https://www.pld-linux.org" \
501 --with-vendor-bug-url="https://bugs.pld-linux.org" \
502 --with-vendor-vm-bug-url="https://bugs.openjdk.java.net"
5b4e4f20
JK
503
504specdir="$(dirname build/*-release/spec.gmk)"
505cat > $specdir/custom-spec.gmk <<EOF
2dab85d0 506# OpenJDK build system depends on bash
5b4e4f20
JK
507SHELL=/bin/bash
508EOF
2dab85d0 509[ -L tmp-bin ] || ln -s "$specdir/jdk/bin" tmp-bin
5b4e4f20 510
0fa4da98
JP
511%{__make} -j1 all \
512 SCTP_WERROR= \
2dab85d0
JK
513 LOG=debug \
514 # these are normally set when --disable-debug-symbols is not used \
515 LIBMANAGEMENT_OPTIMIZATION=LOW \
516 LIBHPROF_OPTIMIZATION=LOW \
517 LIBVERIFY_OPTIMIZATION=LOW
3899c70b 518
052665c9
JK
519# smoke test
520tmp-bin/java -version
521
3899c70b
JK
522%{?with_cacerts:%{__sh} %{SOURCE10}}
523
524%install
525rm -rf $RPM_BUILD_ROOT
526install -d $RPM_BUILD_ROOT{%{_bindir},%{dstdir},%{_mandir}/ja} \
527 $RPM_BUILD_ROOT{%{jvmjardir},%{_examplesdir}/%{name}-%{version},%{_javasrcdir}} \
528 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
529
530# install the 'JDK image', it contains the JRE too
d12f28e3 531cp -a build/*-release/images/j2sdk-image/* $RPM_BUILD_ROOT%{dstdir}
3899c70b 532
0fa4da98
JP
533find $RPM_BUILD_ROOT%{dstdir} -name '*.diz' -delete
534
3899c70b
JK
535# convenience symlinks without version number
536ln -s %{dstreldir} $RPM_BUILD_ROOT%{_jvmdir}/%{name}
0fa4da98 537ln -s %{dstreldir} $RPM_BUILD_ROOT%{_jvmdir}/%{name}-jre
3899c70b
JK
538
539ln -s %{dstreldir} $RPM_BUILD_ROOT%{_jvmdir}/java
540
9910e19d 541# move JDK sources and demo to %{_prefix}/src
3899c70b
JK
542mv $RPM_BUILD_ROOT%{dstdir}/demo $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
543mv $RPM_BUILD_ROOT%{dstdir}/sample $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
544mv $RPM_BUILD_ROOT%{dstdir}/src.zip $RPM_BUILD_ROOT%{_javasrcdir}/%{name}-jdk.zip
545
546# move manual pages to its place
547mv $RPM_BUILD_ROOT%{dstdir}/man/ja_JP.UTF-8/man1 $RPM_BUILD_ROOT%{_mandir}/ja/man1
548rmdir $RPM_BUILD_ROOT%{dstdir}/man/ja_JP.UTF-8
549rm $RPM_BUILD_ROOT%{dstdir}/man/ja
550mv $RPM_BUILD_ROOT%{dstdir}/man/man1 $RPM_BUILD_ROOT%{_mandir}/man1
551rmdir $RPM_BUILD_ROOT%{dstdir}/man
552
553# replace duplicates with symlinks, link to %{_bindir}
554for path in $RPM_BUILD_ROOT%{dstdir}/bin/*; do
555 filename=$(basename $path)
0fa4da98 556 ln -sf "%{dstdir}/bin/$filename" $RPM_BUILD_ROOT%{_bindir}
3899c70b 557done
3899c70b 558
9910e19d 559# keep configuration in %{_sysconfdir} (not all *.properties go there)
0fa4da98 560for config in management security \
3899c70b
JK
561 logging.properties net.properties sound.properties; do
562
563 mv $RPM_BUILD_ROOT%{jredir}/lib/$config $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$config
564 ln -s %{_sysconfdir}/%{name}/$config $RPM_BUILD_ROOT%{jredir}/lib/$config
565done
566
3899c70b
JK
567%{?with_cacerts:install cacerts $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/security}
568
569%clean
570rm -rf $RPM_BUILD_ROOT
571
572%files
573%defattr(644,root,root,755)
0fa4da98 574%doc README
3899c70b
JK
575
576%files jdk
577%defattr(644,root,root,755)
3899c70b
JK
578%attr(755,root,root) %{_bindir}/extcheck
579%attr(755,root,root) %{_bindir}/idlj
580%attr(755,root,root) %{_bindir}/jarsigner
581%attr(755,root,root) %{_bindir}/java-rmi.cgi
582%attr(755,root,root) %{_bindir}/javac
583%attr(755,root,root) %{_bindir}/javadoc
584%attr(755,root,root) %{_bindir}/javah
585%attr(755,root,root) %{_bindir}/javap
586%attr(755,root,root) %{_bindir}/jcmd
587%attr(755,root,root) %{_bindir}/jconsole
588%attr(755,root,root) %{_bindir}/jdb
d12f28e3 589%attr(755,root,root) %{_bindir}/jdeps
3899c70b
JK
590%attr(755,root,root) %{_bindir}/jhat
591%attr(755,root,root) %{_bindir}/jinfo
0fa4da98 592%attr(755,root,root) %{_bindir}/jjs
3899c70b
JK
593%attr(755,root,root) %{_bindir}/jmap
594%attr(755,root,root) %{_bindir}/jps
595%attr(755,root,root) %{_bindir}/jrunscript
596%attr(755,root,root) %{_bindir}/jsadebugd
597%attr(755,root,root) %{_bindir}/jstack
598%attr(755,root,root) %{_bindir}/jstat
599%attr(755,root,root) %{_bindir}/jstatd
600%attr(755,root,root) %{_bindir}/native2ascii
601%attr(755,root,root) %{_bindir}/rmic
602%attr(755,root,root) %{_bindir}/schemagen
603%attr(755,root,root) %{_bindir}/serialver
604%attr(755,root,root) %{_bindir}/wsgen
605%attr(755,root,root) %{_bindir}/wsimport
606%attr(755,root,root) %{_bindir}/xjc
3899c70b
JK
607%{_mandir}/man1/extcheck.1*
608%{_mandir}/man1/idlj.1*
609%{_mandir}/man1/jarsigner.1*
610%{_mandir}/man1/javac.1*
611%{_mandir}/man1/javadoc.1*
612%{_mandir}/man1/javah.1*
613%{_mandir}/man1/javap.1*
614%{_mandir}/man1/jcmd.1*
615%{_mandir}/man1/jconsole.1*
616%{_mandir}/man1/jdb.1*
d12f28e3 617%{_mandir}/man1/jdeps.1*
3899c70b
JK
618%{_mandir}/man1/jhat.1*
619%{_mandir}/man1/jinfo.1*
0fa4da98 620%{_mandir}/man1/jjs.1*
3899c70b
JK
621%{_mandir}/man1/jmap.1*
622%{_mandir}/man1/jps.1*
623%{_mandir}/man1/jrunscript.1*
624%{_mandir}/man1/jsadebugd.1*
625%{_mandir}/man1/jstack.1*
626%{_mandir}/man1/jstat.1*
627%{_mandir}/man1/jstatd.1*
628%{_mandir}/man1/native2ascii.1*
629%{_mandir}/man1/schemagen.1*
630%{_mandir}/man1/serialver.1*
631%{_mandir}/man1/rmic.1*
632%{_mandir}/man1/wsgen.1*
633%{_mandir}/man1/wsimport.1*
634%{_mandir}/man1/xjc.1*
3899c70b
JK
635%lang(ja) %{_mandir}/ja/man1/extcheck.1*
636%lang(ja) %{_mandir}/ja/man1/idlj.1*
637%lang(ja) %{_mandir}/ja/man1/jarsigner.1*
638%lang(ja) %{_mandir}/ja/man1/javac.1*
639%lang(ja) %{_mandir}/ja/man1/javadoc.1*
640%lang(ja) %{_mandir}/ja/man1/javah.1*
641%lang(ja) %{_mandir}/ja/man1/javap.1*
642%lang(ja) %{_mandir}/ja/man1/jcmd.1*
643%lang(ja) %{_mandir}/ja/man1/jconsole.1*
644%lang(ja) %{_mandir}/ja/man1/jdb.1*
d12f28e3 645%lang(ja) %{_mandir}/ja/man1/jdeps.1*
3899c70b
JK
646%lang(ja) %{_mandir}/ja/man1/jhat.1*
647%lang(ja) %{_mandir}/ja/man1/jinfo.1*
0fa4da98 648%lang(ja) %{_mandir}/ja/man1/jjs.1*
3899c70b
JK
649%lang(ja) %{_mandir}/ja/man1/jmap.1*
650%lang(ja) %{_mandir}/ja/man1/jps.1*
651%lang(ja) %{_mandir}/ja/man1/jrunscript.1*
652%lang(ja) %{_mandir}/ja/man1/jsadebugd.1*
653%lang(ja) %{_mandir}/ja/man1/jstack.1*
654%lang(ja) %{_mandir}/ja/man1/jstat.1*
655%lang(ja) %{_mandir}/ja/man1/jstatd.1*
656%lang(ja) %{_mandir}/ja/man1/native2ascii.1*
657%lang(ja) %{_mandir}/ja/man1/schemagen.1*
658%lang(ja) %{_mandir}/ja/man1/serialver.1*
659%lang(ja) %{_mandir}/ja/man1/rmic.1*
660%lang(ja) %{_mandir}/ja/man1/wsgen.1*
661%lang(ja) %{_mandir}/ja/man1/wsimport.1*
662%lang(ja) %{_mandir}/ja/man1/xjc.1*
663
664%files jdk-base
665%defattr(644,root,root,755)
d12f28e3
JK
666%doc build/*-release/images/j2sdk-image/THIRD_PARTY_README
667%doc build/*-release/images/j2sdk-image/ASSEMBLY_EXCEPTION
3899c70b
JK
668%dir %{dstdir}
669%{_jvmdir}/%{name}
0fa4da98 670%dir %{dstdir}/bin
3899c70b 671%attr(755,root,root) %{dstdir}/bin/appletviewer
3899c70b
JK
672%attr(755,root,root) %{dstdir}/bin/extcheck
673%attr(755,root,root) %{dstdir}/bin/idlj
674%attr(755,root,root) %{dstdir}/bin/jar
675%attr(755,root,root) %{dstdir}/bin/jarsigner
676%attr(755,root,root) %{dstdir}/bin/java-rmi.cgi
677%attr(755,root,root) %{dstdir}/bin/javac
678%attr(755,root,root) %{dstdir}/bin/javadoc
679%attr(755,root,root) %{dstdir}/bin/javah
680%attr(755,root,root) %{dstdir}/bin/javap
681%attr(755,root,root) %{dstdir}/bin/jconsole
682%attr(755,root,root) %{dstdir}/bin/jcmd
683%attr(755,root,root) %{dstdir}/bin/jdb
d12f28e3 684%attr(755,root,root) %{dstdir}/bin/jdeps
3899c70b
JK
685%attr(755,root,root) %{dstdir}/bin/jhat
686%attr(755,root,root) %{dstdir}/bin/jinfo
687%attr(755,root,root) %{dstdir}/bin/jmap
688%attr(755,root,root) %{dstdir}/bin/jps
689%attr(755,root,root) %{dstdir}/bin/jrunscript
690%attr(755,root,root) %{dstdir}/bin/jsadebugd
691%attr(755,root,root) %{dstdir}/bin/jstack
692%attr(755,root,root) %{dstdir}/bin/jstat
693%attr(755,root,root) %{dstdir}/bin/jstatd
694%attr(755,root,root) %{dstdir}/bin/native2ascii
695%attr(755,root,root) %{dstdir}/bin/rmic
696%attr(755,root,root) %{dstdir}/bin/schemagen
697%attr(755,root,root) %{dstdir}/bin/serialver
698%attr(755,root,root) %{dstdir}/bin/wsgen
699%attr(755,root,root) %{dstdir}/bin/wsimport
700%attr(755,root,root) %{dstdir}/bin/xjc
701%{dstdir}/include
702%dir %{dstdir}/lib
703%{dstdir}/lib/ct.sym
704%{dstdir}/lib/dt.jar
705%{dstdir}/lib/ir.idl
706%{dstdir}/lib/jconsole.jar
707%attr(755,root,root) %{dstdir}/lib/jexec
708%{dstdir}/lib/orb.idl
0fa4da98 709%ifnarch %{arm} x32
3899c70b
JK
710%{dstdir}/lib/sa-jdi.jar
711%endif
712%{dstdir}/lib/tools.jar
713%dir %{dstdir}/lib/%{jre_arch}
714%dir %{dstdir}/lib/%{jre_arch}/jli
715%attr(755,root,root) %{dstdir}/lib/%{jre_arch}/jli/*.so
0fa4da98 716%{?with_systemtap:%{dstdir}/tapset}
3899c70b
JK
717
718%files jre
719%defattr(644,root,root,755)
0fa4da98 720%attr(755,root,root) %{_bindir}/clhsdb
3899c70b 721%attr(755,root,root) %{_bindir}/java
0fa4da98 722%{?with_jfr:%attr(755,root,root) %{_bindir}/jfr}
3899c70b
JK
723%attr(755,root,root) %{_bindir}/keytool
724%attr(755,root,root) %{_bindir}/orbd
725%attr(755,root,root) %{_bindir}/pack200
726%attr(755,root,root) %{_bindir}/rmid
727%attr(755,root,root) %{_bindir}/rmiregistry
728%attr(755,root,root) %{_bindir}/servertool
729%attr(755,root,root) %{_bindir}/tnameserv
730%attr(755,root,root) %{_bindir}/unpack200
731%{_mandir}/man1/java.1*
732%{_mandir}/man1/keytool.1*
733%{_mandir}/man1/orbd.1*
734%{_mandir}/man1/pack200.1*
735%{_mandir}/man1/rmid.1*
736%{_mandir}/man1/rmiregistry.1*
737%{_mandir}/man1/servertool.1*
738%{_mandir}/man1/tnameserv.1*
739%{_mandir}/man1/unpack200.1*
740%lang(ja) %{_mandir}/ja/man1/java.1*
741%lang(ja) %{_mandir}/ja/man1/keytool.1*
742%lang(ja) %{_mandir}/ja/man1/orbd.1*
743%lang(ja) %{_mandir}/ja/man1/pack200.1*
744%lang(ja) %{_mandir}/ja/man1/rmid.1*
745%lang(ja) %{_mandir}/ja/man1/rmiregistry.1*
746%lang(ja) %{_mandir}/ja/man1/servertool.1*
747%lang(ja) %{_mandir}/ja/man1/tnameserv.1*
748%lang(ja) %{_mandir}/ja/man1/unpack200.1*
0fa4da98 749%{_jvmdir}/java
3899c70b
JK
750
751%files jre-base
752%defattr(644,root,root,755)
0fa4da98
JP
753%doc build/*-release/images/j2sdk-image/jre/THIRD_PARTY_README
754%doc build/*-release/images/j2sdk-image/jre/ASSEMBLY_EXCEPTION
3899c70b
JK
755%dir %{_sysconfdir}/%{name}
756%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*
757%dir %{dstdir}
758%{dstdir}/release
759%dir %{jredir}
760%{_jvmdir}/%{name}-jre
761%dir %{jredir}/bin
762%dir %{dstdir}/bin
0fa4da98 763%attr(755,root,root) %{dstdir}/bin/clhsdb
3899c70b
JK
764%attr(755,root,root) %{jredir}/bin/java
765%attr(755,root,root) %{dstdir}/bin/java
0fa4da98 766%{?with_jfr:%attr(755,root,root) %{dstdir}/bin/jfr}
d12f28e3
JK
767%attr(755,root,root) %{jredir}/bin/jjs
768%attr(755,root,root) %{dstdir}/bin/jjs
3899c70b
JK
769%attr(755,root,root) %{jredir}/bin/keytool
770%attr(755,root,root) %{dstdir}/bin/keytool
771%attr(755,root,root) %{jredir}/bin/orbd
772%attr(755,root,root) %{dstdir}/bin/orbd
773%attr(755,root,root) %{jredir}/bin/pack200
774%attr(755,root,root) %{dstdir}/bin/pack200
775%attr(755,root,root) %{jredir}/bin/rmid
776%attr(755,root,root) %{dstdir}/bin/rmid
777%attr(755,root,root) %{jredir}/bin/rmiregistry
778%attr(755,root,root) %{dstdir}/bin/rmiregistry
779%attr(755,root,root) %{jredir}/bin/servertool
780%attr(755,root,root) %{dstdir}/bin/servertool
781%attr(755,root,root) %{jredir}/bin/tnameserv
782%attr(755,root,root) %{dstdir}/bin/tnameserv
783%attr(755,root,root) %{jredir}/bin/unpack200
784%attr(755,root,root) %{dstdir}/bin/unpack200
785%dir %{jredir}/lib
786%dir %{jredir}/lib/applet
787%{jredir}/lib/cmm
788%{jredir}/lib/ext
0fa4da98
JP
789%if %{with jfr}
790%{jredir}/lib/jfr.jar
791%dir %{jredir}/lib/jfr
792%{jredir}/lib/jfr/*.jfc
793%endif
3899c70b 794%dir %{jredir}/lib/%{jre_arch}
3899c70b
JK
795%dir %{jredir}/lib/%{jre_arch}/jli
796%attr(755,root,root) %{jredir}/lib/%{jre_arch}/jli/*.so
0fa4da98
JP
797%dir %{jredir}/lib/%{jre_arch}/%{jvm_type}
798%{jredir}/lib/%{jre_arch}/%{jvm_type}/Xusage.txt
799%attr(755,root,root) %{jredir}/lib/%{jre_arch}/%{jvm_type}/*.so
3899c70b
JK
800%{jredir}/lib/%{jre_arch}/jvm.cfg
801%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libattach.so
802%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libawt.so
d12f28e3 803%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libawt_headless.so
3899c70b
JK
804%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libdt_socket.so
805%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libhprof.so
806%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libinstrument.so
807%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libj2gss.so
3899c70b
JK
808%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libj2pcsc.so
809%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libj2pkcs11.so
810%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjaas_unix.so
811%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjava.so
d12f28e3 812%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libsctp.so
3899c70b 813%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjava_crw_demo.so
991454fa
JK
814%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjavajpeg.so
815%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjavalcms.so
3899c70b
JK
816%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjdwp.so
817%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjsdt.so
818%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjsig.so
819%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjsound.so
3899c70b
JK
820%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libmanagement.so
821%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libmlib_image.so
822%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libnet.so
823%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libnio.so
824%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libnpt.so
0fa4da98 825%ifnarch %{arm} x32
3899c70b
JK
826%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libsaproc.so
827%endif
0fa4da98 828%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libsunec.so
3899c70b
JK
829%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libunpack.so
830%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libverify.so
831%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libzip.so
832%{jredir}/lib/images
833%{jredir}/lib/management
834%{jredir}/lib/security
0fa4da98
JP
835%{jredir}/lib/hijrah-config-umalqura.properties
836%{jredir}/lib/tzdb.dat
837
3899c70b
JK
838%if %{with webstart}
839%{jredir}/lib/about.jar
840%{jredir}/lib/about.jnlp
841%endif
842%{jredir}/lib/calendars.properties
843%{jredir}/lib/charsets.jar
844%{jredir}/lib/classlist
845%{jredir}/lib/content-types.properties
846%{jredir}/lib/currency.data
847%{jredir}/lib/flavormap.properties
3899c70b
JK
848%{jredir}/lib/jce.jar
849%attr(755, root, root) %{jredir}/lib/jexec
850%{jredir}/lib/jsse.jar
851%{jredir}/lib/jvm.hprof.txt
852%{jredir}/lib/logging.properties
853%{jredir}/lib/management-agent.jar
854%{jredir}/lib/meta-index
855%{jredir}/lib/net.properties
856%{jredir}/lib/psfont.properties.ja
857%{jredir}/lib/psfontj2d.properties
858%{jredir}/lib/resources.jar
3899c70b
JK
859%{jredir}/lib/rt.jar
860%{jredir}/lib/sound.properties
3899c70b
JK
861%{jvmjardir}
862
863%files jre-X11
864%defattr(644,root,root,755)
0fa4da98 865%attr(755,root,root) %{_bindir}/hsdb
3899c70b
JK
866%attr(755,root,root) %{_bindir}/policytool
867%{_mandir}/man1/policytool.1*
868%lang(ja) %{_mandir}/ja/man1/policytool.1*
869
870%files jre-base-X11
871%defattr(644,root,root,755)
0fa4da98 872%attr(755,root,root) %{dstdir}/bin/hsdb
3899c70b
JK
873%attr(755,root,root) %{jredir}/bin/policytool
874%attr(755,root,root) %{dstdir}/bin/policytool
d12f28e3
JK
875%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libawt_xawt.so
876%attr(755,root,root) %{dstdir}/lib/%{jre_arch}/libjawt.so
51f128fd 877%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjawt.so
0fa4da98 878%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libsplashscreen.so
3899c70b
JK
879
880%files jre-base-alsa
881%defattr(644,root,root,755)
882%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libjsoundalsa.so
883
884%files jre-base-freetype
885%defattr(644,root,root,755)
886%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libfontmanager.so
887
888%files jre-base-gtk
889%defattr(644,root,root,755)
3899c70b
JK
890
891%files jar
892%defattr(644,root,root,755)
893%attr(755,root,root) %{_bindir}/jar
894%{_mandir}/man1/jar.1*
895%lang(ja) %{_mandir}/ja/man1/jar.1*
896
897%files appletviewer
898%defattr(644,root,root,755)
899%attr(755,root,root) %{_bindir}/appletviewer
900%{_mandir}/man1/appletviewer.1*
901%lang(ja) %{_mandir}/ja/man1/appletviewer.1*
902
903%files jdk-sources
904%defattr(644,root,root,755)
905%{_javasrcdir}/%{name}-jdk.zip
906
907%files examples
908%defattr(644,root,root,755)
909%{_examplesdir}/%{name}-%{version}
This page took 0.34038 seconds and 4 git commands to generate.