]>
Commit | Line | Data |
---|---|---|
695b72ee JB |
1 | # |
2 | # Conditional build: | |
2692550d JP |
3 | %bcond_with bootstrap # build a bootstrap version, using icedtea6 |
4 | %bcond_without cacerts # don't include the default CA certificates | |
3899c70b JK |
5 | |
6 | %if %{with bootstrap} | |
91e281dc | 7 | %define use_jdk openjdk8 |
3899c70b | 8 | %else |
2692550d JP |
9 | %define use_jdk openjdk9 |
10 | %endif | |
11 | ||
12 | %ifarch %{x8664} | |
13 | %define with_aot 1 | |
3899c70b JK |
14 | %endif |
15 | ||
74861363 JP |
16 | %ifarch x32 |
17 | %define with_zero 1 | |
18 | %endif | |
19 | ||
3899c70b | 20 | # class data version seen with file(1) that this jvm is able to load |
2692550d JP |
21 | %define _classdataversion 53.0 |
22 | ||
23 | %define ver_u 9.0.4 | |
24 | %define ver_b 12 | |
25 | ||
d8978afb | 26 | # JDK/JRE version, as returned with `java -version`, '_' replaced with '.' |
2692550d | 27 | %define _jdkversion %{ver_u} |
3899c70b | 28 | |
83cf7429 | 29 | Summary: Open-source implementation of the Java Platform, Standard Edition |
2692550d JP |
30 | Summary(pl.UTF-8): Wolnoźródłowa implementacja Java 9 SE |
31 | Name: openjdk9 | |
32 | Version: %{ver_u}.%{ver_b} | |
feecb826 | 33 | Release: 4 |
3899c70b JK |
34 | License: GPL v2 |
35 | Group: Development/Languages/Java | |
2692550d JP |
36 | Source0: https://hg.openjdk.java.net/jdk-updates/jdk9u/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-%{version}.tar.bz2 |
37 | # Source0-md5: f71280d31603efeffdadea56fab8436e | |
38 | Source1: https://hg.openjdk.java.net/jdk-updates/jdk9u/corba/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-corba-%{version}.tar.bz2 | |
39 | # Source1-md5: 2bc0a490f71eaa17fcae9387b354ccfd | |
40 | Source2: https://hg.openjdk.java.net/jdk-updates/jdk9u/hotspot/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-hotspot-%{version}.tar.bz2 | |
41 | # Source2-md5: 37ff0144a673417c793d282d12aba6a1 | |
42 | Source3: https://hg.openjdk.java.net/jdk-updates/jdk9u/jaxp/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-jaxp-%{version}.tar.bz2 | |
43 | # Source3-md5: c6c4ee8ef80f10fc4fbc9d151436c89a | |
44 | Source4: https://hg.openjdk.java.net/jdk-updates/jdk9u/jaxws/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-jaxws-%{version}.tar.bz2 | |
45 | # Source4-md5: 3cf0375c3bba7d028c8408e41bbbb352 | |
46 | Source5: https://hg.openjdk.java.net/jdk-updates/jdk9u/jdk/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-jdk-%{version}.tar.bz2 | |
47 | # Source5-md5: 74d33ad39f5b67596c5269585811cfab | |
48 | Source6: https://hg.openjdk.java.net/jdk-updates/jdk9u/langtools/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-langtools-%{version}.tar.bz2 | |
49 | # Source6-md5: 95d7011a050602218b5400c632339e2c | |
50 | Source7: https://hg.openjdk.java.net/jdk-updates/jdk9u/nashorn/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-nashorn-%{version}.tar.bz2 | |
51 | # Source7-md5: 5fbaceceb82449806263ba99188b7139 | |
3899c70b | 52 | Source10: make-cacerts.sh |
2692550d JP |
53 | Patch0: libpath.patch |
54 | Patch1: make-4.3.patch | |
55 | Patch2: x32.patch | |
56 | Patch3: aarch64.patch | |
76fd6e23 | 57 | Patch4: default-assumemp.patch |
e27f9dd8 | 58 | Patch5: glibc-2.34.patch |
5491470b | 59 | Patch6: gcc11.patch |
b2950e84 | 60 | URL: http://openjdk.java.net/ |
9910e19d | 61 | BuildRequires: /usr/bin/jar |
b2950e84 JK |
62 | BuildRequires: alsa-lib-devel |
63 | BuildRequires: ant | |
64 | BuildRequires: autoconf | |
65 | BuildRequires: bash | |
66 | %{?with_cacerts:BuildRequires: ca-certificates-update} | |
67 | BuildRequires: cups-devel | |
2692550d | 68 | BuildRequires: elfutils-devel |
b2950e84 JK |
69 | BuildRequires: freetype-devel >= 2.3 |
70 | BuildRequires: gawk | |
665079f5 | 71 | BuildRequires: giflib-devel >= 5.1 |
b2950e84 | 72 | BuildRequires: glibc-misc |
83cf7429 | 73 | %{?buildrequires_jdk} |
991454fa | 74 | BuildRequires: lcms2-devel |
3899c70b | 75 | BuildRequires: libjpeg-devel |
991454fa | 76 | BuildRequires: libpng-devel |
3899c70b | 77 | BuildRequires: lsb-release |
991454fa | 78 | BuildRequires: pcsc-lite-devel |
3899c70b | 79 | BuildRequires: pkgconfig |
58e78be3 | 80 | BuildRequires: rpm-build >= 4.6 |
1a99ed6d | 81 | BuildRequires: rpmbuild(macros) >= 2.007 |
3899c70b JK |
82 | BuildRequires: unzip |
83 | BuildRequires: util-linux | |
84 | BuildRequires: xorg-lib-libX11-devel | |
85 | BuildRequires: xorg-lib-libXinerama-devel | |
86 | BuildRequires: xorg-lib-libXp-devel | |
87 | BuildRequires: xorg-lib-libXrender-devel | |
88 | BuildRequires: xorg-lib-libXt-devel | |
89 | BuildRequires: xorg-lib-libXtst-devel | |
90 | BuildRequires: xorg-proto-printproto-devel | |
91 | BuildRequires: xorg-proto-xproto-devel | |
92 | BuildRequires: zip | |
93 | BuildRequires: zlib-devel | |
94 | Requires: %{name}-appletviewer = %{version}-%{release} | |
95 | Requires: %{name}-jdk = %{version}-%{release} | |
96 | Suggests: %{name}-jre-X11 | |
97 | Suggests: icedtea-web | |
98 | Obsoletes: icedtea6 | |
99 | Obsoletes: icedtea7 | |
3899c70b JK |
100 | Obsoletes: java-gcj-compat |
101 | Obsoletes: java-gcj-compat-devel | |
102 | Obsoletes: java-sun | |
103 | Obsoletes: java-sun-demos | |
104 | Obsoletes: java-sun-jre | |
9910e19d | 105 | Obsoletes: java-sun-jre-X11 |
3899c70b JK |
106 | Obsoletes: java-sun-jre-alsa |
107 | Obsoletes: java-sun-jre-jdbc | |
3899c70b | 108 | Obsoletes: java-sun-tools |
9910e19d JK |
109 | Obsoletes: java5-sun |
110 | Obsoletes: java5-sun-jre | |
111 | Obsoletes: java5-sun-jre-X11 | |
112 | Obsoletes: java5-sun-jre-jdbc | |
113 | Obsoletes: java5-sun-tools | |
3899c70b JK |
114 | Obsoletes: oracle-java7 |
115 | Obsoletes: oracle-java7-jre | |
9910e19d | 116 | Obsoletes: oracle-java7-jre-X11 |
3899c70b JK |
117 | Obsoletes: oracle-java7-jre-alsa |
118 | Obsoletes: oracle-java7-jre-jdbc | |
3899c70b JK |
119 | Obsoletes: oracle-java7-tools |
120 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
121 | ||
122 | %define dstreldir %{name}-%{version} | |
123 | %define dstdir %{_jvmdir}/%{dstreldir} | |
3899c70b JK |
124 | %define jvmjardir %{_jvmjardir}/%{name}-%{version} |
125 | ||
3899c70b JK |
126 | # to break artificial subpackage dependency loops |
127 | %define _noautoreq 'libmawt.so' java\\\\(ClassDataVersion\\\\) | |
128 | ||
2692550d JP |
129 | # openjdk build system handles _FORTIFY_SOURCE internally |
130 | %undefine _fortify_cflags | |
131 | ||
1a99ed6d JP |
132 | %if %{_ver_ge %(rpm -q --qf='%%{VERSION}' gcc) 12} |
133 | %ifarch %arm32_with_neon | |
134 | %define specflags_arm -fno-tree-vectorize | |
135 | %endif | |
136 | %endif | |
137 | ||
3899c70b JK |
138 | %description |
139 | Open-source implementation of the Java Platform, Standard Edition. | |
140 | ||
141 | This is a meta-package which provides, by its dependencies, all the | |
142 | OpenJDK components including the OpenJDK, Java 8 developement kit and | |
143 | runtime environment. | |
144 | ||
145 | %description -l pl.UTF-8 | |
146 | Wolnoźródłowa implementacja Java 8 SE. | |
147 | ||
148 | To jest meta-pakiet, który, za pośrednictwem zależności, dostarcza | |
149 | wszystkie komponenty OpenJDK, w tym środowisko programistyczne | |
150 | (OpenJDK) i uruchomieniowe (JRE). | |
151 | ||
152 | %package jdk | |
153 | Summary: OpenJDK - software development kit | |
154 | Summary(pl.UTF-8): OpenJDK - środowisko programistyczne | |
155 | Group: Development/Languages/Java | |
156 | Requires: %{name}-jar = %{version}-%{release} | |
157 | Requires: %{name}-jdk-base = %{version}-%{release} | |
158 | Requires: %{name}-jre = %{version}-%{release} | |
d8978afb JK |
159 | Provides: j2sdk = %{_jdkversion} |
160 | Provides: jdk = %{_jdkversion} | |
3899c70b JK |
161 | Obsoletes: blackdown-java-sdk |
162 | Obsoletes: ibm-java | |
163 | Obsoletes: icedtea6-jdk | |
164 | Obsoletes: icedtea7-jdk | |
165 | Obsoletes: java-blackdown | |
166 | Obsoletes: java-gcj-compat-devel | |
167 | Obsoletes: java-sun | |
168 | Obsoletes: java5-sun | |
3899c70b JK |
169 | Obsoletes: jdk |
170 | Obsoletes: kaffe | |
9910e19d | 171 | Obsoletes: oracle-java7 |
3899c70b JK |
172 | |
173 | %description jdk | |
174 | This package symlinks OpenJDK development tools provided by | |
175 | %{name}-jdk-base to system-wide directories like %{_bindir}, making | |
176 | OpenJDK the default JDK. | |
177 | ||
178 | %description jdk -l pl.UTF-8 | |
179 | Ten pakiet tworzy symboliczne dowiązania do narzędzi programistycznych | |
180 | OpenJDK, dostarczanych przez pakiet %{name}-jdk-base, w standardowych | |
181 | systemowych ścieżkach takich jak %{_bindir}, sprawiając tym samym, że | |
182 | OpenJDK staje się domyślnym JDK w systemie. | |
183 | ||
184 | %package jdk-base | |
185 | Summary: OpenJDK - software development kit | |
186 | Summary(pl.UTF-8): Kod OpenJDK - środowisko programistyczne | |
187 | Group: Development/Languages/Java | |
188 | Requires: %{name}-jre-base = %{version}-%{release} | |
2692550d | 189 | Requires: jpackage-utils >= 0:1.7.5-8 |
3899c70b JK |
190 | Provides: jdk(%{name}) |
191 | ||
192 | %description jdk-base | |
193 | OpenJDK development tools built using free software only. | |
194 | ||
195 | %description jdk-base -l pl.UTF-8 | |
196 | OpenJDK skompilowane wyłącznie przy użyciu wolnego oprogramowania. | |
197 | ||
198 | %package jre | |
199 | Summary: OpenJDK - runtime environment | |
200 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe | |
201 | Group: Development/Languages/Java | |
202 | Requires: %{name}-jre-base = %{version}-%{release} | |
203 | Requires: nss >= 1:3.13.4 | |
204 | # Require zoneinfo data provided by java-tzdata subpackage. | |
205 | Requires: java-tzdata | |
206 | Provides: java | |
207 | Provides: java(ClassDataVersion) = %{_classdataversion} | |
208 | Provides: java(jaas) = %{version} | |
209 | Provides: java(jaf) = 1.1.1 | |
210 | Provides: java(jaxp) = 1.3 | |
211 | Provides: java(jaxp_parser_impl) | |
212 | Provides: java(jce) = %{version} | |
213 | Provides: java(jdbc-stdext) = %{version} | |
214 | Provides: java(jdbc-stdext) = 3.0 | |
215 | Provides: java(jmx) = 1.4 | |
216 | Provides: java(jndi) = %{version} | |
217 | Provides: java(jsse) = %{version} | |
218 | Provides: java1.4 | |
d8978afb | 219 | Provides: jre = %{_jdkversion} |
3899c70b JK |
220 | Obsoletes: icedtea6-jre |
221 | Obsoletes: icedtea7-jre | |
76fd6e23 AM |
222 | Obsoletes: icedtea8-jre |
223 | Obsoletes: jaas | |
224 | Obsoletes: jaf | |
225 | Obsoletes: java5-sun-jre | |
3899c70b | 226 | Obsoletes: java-gcj-compat |
76fd6e23 AM |
227 | Obsoletes: java-jaxp |
228 | Obsoletes: java-jdbc-stdext | |
3899c70b | 229 | Obsoletes: java-sun-jre |
76fd6e23 AM |
230 | Obsoletes: jce |
231 | Obsoletes: jdbc-stdext | |
232 | Obsoletes: jmx | |
233 | Obsoletes: jndi | |
b2950e84 | 234 | Obsoletes: jre |
76fd6e23 | 235 | Obsoletes: jsse |
9910e19d | 236 | Obsoletes: oracle-java7-jre |
3899c70b JK |
237 | |
238 | %description jre | |
239 | This package symlinks OpenJDK runtime environment tools provided by | |
240 | %{name}-jre-base to system-wide directories like %{_bindir}, making | |
241 | OpenJDK the default JRE. | |
242 | ||
243 | %description jre -l pl.UTF-8 | |
244 | Ten pakiet tworzy symboliczne dowiązania do środowiska | |
245 | uruchomieniowego OpenJDK, dostarczanych przez pakiet %{name}-jre-base, | |
246 | w standardowych systemowych ścieżkach takich jak %{_bindir}, | |
247 | sprawiając tym samym, że OpenJDK staje się domyślnym JRE w systemie. | |
248 | ||
249 | %package jre-X11 | |
250 | Summary: OpenJDK - runtime environment - X11 support | |
251 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa X11 | |
252 | Group: Development/Languages/Java | |
253 | Requires: %{name}-jre = %{version}-%{release} | |
254 | Requires: %{name}-jre-base-X11 = %{version}-%{release} | |
d8978afb | 255 | Provides: jre-X11 = %{_jdkversion} |
3899c70b JK |
256 | Obsoletes: icedtea6-jre-X11 |
257 | Obsoletes: icedtea7-jre-X11 | |
258 | Obsoletes: java-sun-jre-X11 | |
259 | Obsoletes: oracle-java7-jre-X11 | |
260 | ||
261 | %description jre-X11 | |
262 | X11 support for OpenJDK runtime environment built using free software | |
263 | only. | |
264 | ||
265 | %description jre-X11 -l pl.UTF-8 | |
266 | Biblioteki X11 dla środowiska OpenJDK zbudowany wyłocznie przy uzyciu | |
267 | wolnego oprogramowania. | |
268 | ||
269 | %package jre-base | |
270 | Summary: OpenJDK - runtime environment | |
271 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe | |
272 | Group: Development/Languages/Java | |
2692550d | 273 | Requires: jpackage-utils >= 0:1.7.5-8 |
3899c70b JK |
274 | Provides: jre(%{name}) |
275 | ||
276 | %description jre-base | |
277 | OpenJDK runtime environment built using free software only. | |
278 | ||
279 | %description jre-base -l pl.UTF-8 | |
280 | Środowisko uruchomieniowe OpenJDK zbudowany wyłącznie przy użyciu | |
281 | wolnego oprogramowania. | |
282 | ||
283 | %package jre-base-X11 | |
284 | Summary: OpenJDK - runtime environment - X11 support | |
285 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa X11 | |
286 | Group: Development/Languages/Java | |
287 | Requires: %{name}-jre-base = %{version}-%{release} | |
288 | Requires: %{name}-jre-base-freetype = %{version}-%{release} | |
289 | ||
290 | %description jre-base-X11 | |
291 | X11 support for OpenJDK runtime environment built using free software | |
292 | only. | |
293 | ||
294 | %description jre-base-X11 -l pl.UTF-8 | |
295 | Biblioteki X11 dla środowiska OpenJDK zbudowany wyłocznie przy uzyciu | |
296 | wolnego oprogramowania. | |
297 | ||
298 | %package jre-base-alsa | |
299 | Summary: OpenJDK - runtime environment - ALSA support | |
300 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa ALSA | |
301 | Group: Development/Languages/Java | |
302 | Requires: %{name}-jre-base = %{version}-%{release} | |
303 | ||
304 | %description jre-base-alsa | |
305 | ALSA sound support for OpenJDK runtime environment build using free | |
306 | software only. | |
307 | ||
308 | %description jre-base-alsa -l pl.UTF-8 | |
309 | Biblioteki ALSA rozszerzające środowisko OpenJDK o obsługę dźwięku | |
310 | zbudowane przy uzyciu wyłącznie wolnego oprogramowania. | |
311 | ||
312 | %package jre-base-freetype | |
313 | Summary: OpenJDK - runtime environment - font support | |
314 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa fontów | |
315 | Group: Development/Languages/Java | |
316 | Requires: %{name}-jre-base = %{version}-%{release} | |
317 | ||
318 | %description jre-base-freetype | |
319 | Font handling library for OpenJDK runtime environment built using free | |
320 | software only. | |
321 | ||
322 | %description jre-base-freetype -l pl.UTF-8 | |
323 | Biblioteki obsługi czcionek dla OpenJDK zbudowane wyłącznie przy | |
324 | użyciu wolnego oprogramowania. | |
325 | ||
3899c70b JK |
326 | %package jar |
327 | Summary: OpenJDK - JAR tool | |
328 | Summary(pl.UTF-8): OpenJDK - narzędzie JAR | |
329 | Group: Development/Languages/Java | |
330 | Requires: %{name}-jdk-base = %{version}-%{release} | |
331 | Provides: jar | |
332 | Obsoletes: fastjar | |
333 | Obsoletes: icedtea6-jar | |
334 | Obsoletes: icedtea7-jar | |
335 | Obsoletes: jar | |
336 | ||
337 | %description jar | |
338 | JAR tool from OpenJDK built using free software only. | |
339 | ||
340 | JAR is an archiver used to merge Java classes into a single library. | |
341 | ||
342 | %description jar -l pl.UTF-8 | |
343 | Narzędzie jar z OpenJDK zbudowane przy uzyciu wyłącznie wolnego | |
344 | oprogramowania. | |
345 | ||
346 | JAR jest narzędziem pozwalającym wykonywać podstawowe operacje na | |
347 | archiwach javy .jar takie jak na przykład tworzenie lub rozpakowywanie | |
348 | archiwów. | |
349 | ||
350 | %package appletviewer | |
351 | Summary: OpenJDK - appletviewer tool | |
352 | Summary(pl.UTF-8): OpenJDK - narzędzie appletviewer | |
353 | Group: Development/Languages/Java | |
354 | Requires: %{name}-jdk-base = %{version}-%{release} | |
355 | Requires: %{name}-jre-X11 = %{version}-%{release} | |
356 | Obsoletes: icedtea6-appletviewer | |
357 | Obsoletes: icedtea7-appletviewer | |
358 | Obsoletes: java-sun-appletviewer | |
359 | Obsoletes: oracle-java7-appletviewer | |
360 | ||
361 | %description appletviewer | |
362 | Appletviewer from OpenJDK build using free software only. | |
363 | ||
364 | %description appletviewer -l pl.UTF-8 | |
365 | Appletviewer pozwala uruchamiać aplety javy niezależnie od | |
366 | przeglądarki www. Ten appletviewer pochodzi z zestawu narzędzi OpenJDK | |
367 | i został zbudowany wyłącznie przy użyciu wolnego oprogramowania. | |
368 | ||
369 | %package jdk-sources | |
370 | Summary: OpenJDK - sources | |
371 | Summary(pl.UTF-8): OpenJDK - kod źródłowy | |
372 | Group: Documentation | |
3899c70b | 373 | BuildArch: noarch |
3899c70b JK |
374 | |
375 | %description jdk-sources | |
376 | Source code for the OpenJDK development kit and Java standard library. | |
377 | ||
378 | %description jdk-sources -l pl.UTF-8 | |
379 | Kod źródłowy narzędzi programistycznych OpenJDK oraz standardowej | |
380 | biblioteki Javy. | |
381 | ||
382 | %package examples | |
383 | Summary: OpenJDK - examples | |
384 | Summary(pl.UTF-8): OpenJDK - przykłady | |
385 | Group: Documentation | |
3899c70b | 386 | BuildArch: noarch |
3899c70b JK |
387 | |
388 | %description examples | |
389 | Code examples for OpenJDK. | |
390 | ||
391 | %description examples -l pl.UTF-8 | |
392 | Przykłady dla OpenJDK. | |
393 | ||
394 | %prep | |
2692550d | 395 | %setup -qn jdk9u-jdk-%{ver_u}+%{ver_b} -a1 -a2 -a3 -a4 -a5 -a6 -a7 |
3899c70b | 396 | |
2692550d JP |
397 | for d in *-jdk-%{ver_u}+%{ver_b}* ; do |
398 | mv "$d" "${d%%-jdk-%{ver_u}+%{ver_b}}" | |
3899c70b JK |
399 | done |
400 | ||
5b4e4f20 JK |
401 | %patch0 -p1 |
402 | %patch1 -p1 | |
d12f28e3 | 403 | %patch2 -p1 |
2692550d | 404 | %ifarch aarch64 |
ce94f011 | 405 | %patch3 -p1 |
2692550d | 406 | %endif |
76fd6e23 | 407 | %patch4 -p1 |
e27f9dd8 | 408 | %patch5 -p1 |
5491470b | 409 | %patch6 -p1 |
5b4e4f20 | 410 | |
3899c70b JK |
411 | %build |
412 | # Make sure we have /proc mounted - otherwise idlc will fail later. | |
413 | if [ ! -f /proc/self/stat ]; then | |
414 | echo "You need to have /proc mounted in order to build this package!" | |
415 | exit 1 | |
416 | fi | |
417 | ||
991454fa | 418 | cd common/autoconf |
bd96d31d | 419 | rm generated-configure.sh |
991454fa JK |
420 | %{__autoconf} -o generated-configure.sh |
421 | cd ../.. | |
422 | ||
3899c70b | 423 | mkdir -p build-bin |
b3255d96 | 424 | |
b3255d96 JK |
425 | # unset CLASSPATH to be safe, gnustep puts garbage there, which openjdk hates |
426 | unset CLASSPATH | |
427 | ||
d12f28e3 | 428 | export SHELL=/bin/bash |
3899c70b | 429 | |
5b4e4f20 JK |
430 | chmod a+x configure |
431 | ||
2dab85d0 | 432 | # disable-debug-symbols so openjdk debuginfo handling won't conflict with ours |
5b4e4f20 | 433 | %configure \ |
74861363 | 434 | %{?with_zero:--with-jvm-variants=zero} \ |
2692550d JP |
435 | --with-boot-jdk="%{java_home}" \ |
436 | --with-extra-cflags="%{rpmcppflags} %{rpmcflags} -fcommon -fno-tree-dse" \ | |
437 | --with-extra-cxxflags="%{rpmcppflags} %{rpmcxxflags} -fcommon -fno-tree-dse" \ | |
5b4e4f20 | 438 | --with-extra-ldflags="%{rpmldflags}" \ |
2692550d | 439 | --with-native-debug-symbols=none \ |
c0e7c813 | 440 | --disable-full-docs \ |
2692550d JP |
441 | --disable-javac-server \ |
442 | --disable-hotspot-gtest \ | |
443 | --disable-warnings-as-errors \ | |
444 | --with-jobs="%{__jobs}" \ | |
665079f5 | 445 | --with-giflib=system \ |
991454fa JK |
446 | --with-libjpeg=system \ |
447 | --with-libpng=system \ | |
448 | --with-lcms=system \ | |
2692550d JP |
449 | --with-zlib=system \ |
450 | --with-version-pre="" \ | |
451 | --with-version-opt="" \ | |
452 | --with-version-build="%{release}" | |
5b4e4f20 JK |
453 | |
454 | specdir="$(dirname build/*-release/spec.gmk)" | |
455 | cat > $specdir/custom-spec.gmk <<EOF | |
2dab85d0 | 456 | # OpenJDK build system depends on bash |
5b4e4f20 JK |
457 | SHELL=/bin/bash |
458 | EOF | |
2dab85d0 | 459 | [ -L tmp-bin ] || ln -s "$specdir/jdk/bin" tmp-bin |
5b4e4f20 | 460 | |
2692550d | 461 | %{__make} -j1 all \ |
2dab85d0 JK |
462 | LOG=debug \ |
463 | # these are normally set when --disable-debug-symbols is not used \ | |
464 | LIBMANAGEMENT_OPTIMIZATION=LOW \ | |
465 | LIBHPROF_OPTIMIZATION=LOW \ | |
466 | LIBVERIFY_OPTIMIZATION=LOW | |
3899c70b | 467 | |
052665c9 JK |
468 | # smoke test |
469 | tmp-bin/java -version | |
470 | ||
d12f28e3 | 471 | export PATH="$(pwd)/build-bin:$PATH" |
3899c70b JK |
472 | %{?with_cacerts:%{__sh} %{SOURCE10}} |
473 | ||
474 | %install | |
475 | rm -rf $RPM_BUILD_ROOT | |
476 | install -d $RPM_BUILD_ROOT{%{_bindir},%{dstdir},%{_mandir}/ja} \ | |
477 | $RPM_BUILD_ROOT{%{jvmjardir},%{_examplesdir}/%{name}-%{version},%{_javasrcdir}} \ | |
478 | $RPM_BUILD_ROOT%{_sysconfdir}/%{name} | |
479 | ||
480 | # install the 'JDK image', it contains the JRE too | |
2692550d JP |
481 | cp -a build/*-release/images/jdk/* $RPM_BUILD_ROOT%{dstdir} |
482 | ||
483 | find $RPM_BUILD_ROOT%{dstdir} -name '*.diz' -delete | |
3899c70b JK |
484 | |
485 | # convenience symlinks without version number | |
486 | ln -s %{dstreldir} $RPM_BUILD_ROOT%{_jvmdir}/%{name} | |
2692550d | 487 | ln -s %{dstreldir} $RPM_BUILD_ROOT%{_jvmdir}/%{name}-jre |
3899c70b JK |
488 | |
489 | ln -s %{dstreldir} $RPM_BUILD_ROOT%{_jvmdir}/java | |
490 | ||
9910e19d | 491 | # move JDK sources and demo to %{_prefix}/src |
3899c70b | 492 | mv $RPM_BUILD_ROOT%{dstdir}/demo $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
2692550d | 493 | mv $RPM_BUILD_ROOT%{dstdir}/lib/src.zip $RPM_BUILD_ROOT%{_javasrcdir}/%{name}-jdk.zip |
3899c70b JK |
494 | |
495 | # move manual pages to its place | |
496 | mv $RPM_BUILD_ROOT%{dstdir}/man/ja_JP.UTF-8/man1 $RPM_BUILD_ROOT%{_mandir}/ja/man1 | |
497 | rmdir $RPM_BUILD_ROOT%{dstdir}/man/ja_JP.UTF-8 | |
498 | rm $RPM_BUILD_ROOT%{dstdir}/man/ja | |
499 | mv $RPM_BUILD_ROOT%{dstdir}/man/man1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
500 | rmdir $RPM_BUILD_ROOT%{dstdir}/man | |
501 | ||
502 | # replace duplicates with symlinks, link to %{_bindir} | |
503 | for path in $RPM_BUILD_ROOT%{dstdir}/bin/*; do | |
504 | filename=$(basename $path) | |
86b11c59 | 505 | ln -sf "%{dstdir}/bin/$filename" $RPM_BUILD_ROOT%{_bindir} |
3899c70b | 506 | done |
3899c70b | 507 | |
9910e19d | 508 | # keep configuration in %{_sysconfdir} (not all *.properties go there) |
2692550d | 509 | for config in management security \ |
3899c70b JK |
510 | logging.properties net.properties sound.properties; do |
511 | ||
2692550d JP |
512 | mv $RPM_BUILD_ROOT%{dstdir}/conf/$config $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/$config |
513 | ln -s %{_sysconfdir}/%{name}/$config $RPM_BUILD_ROOT%{dstdir}/conf/$config | |
3899c70b JK |
514 | done |
515 | ||
3899c70b JK |
516 | %{?with_cacerts:install cacerts $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/security} |
517 | ||
518 | %clean | |
519 | rm -rf $RPM_BUILD_ROOT | |
520 | ||
521 | %files | |
522 | %defattr(644,root,root,755) | |
3899c70b JK |
523 | |
524 | %files jdk | |
525 | %defattr(644,root,root,755) | |
2692550d | 526 | %{?with_aot:%attr(755,root,root) %{_bindir}/jaotc} |
3899c70b | 527 | %attr(755,root,root) %{_bindir}/jarsigner |
3899c70b JK |
528 | %attr(755,root,root) %{_bindir}/javac |
529 | %attr(755,root,root) %{_bindir}/javadoc | |
530 | %attr(755,root,root) %{_bindir}/javah | |
531 | %attr(755,root,root) %{_bindir}/javap | |
532 | %attr(755,root,root) %{_bindir}/jcmd | |
533 | %attr(755,root,root) %{_bindir}/jconsole | |
534 | %attr(755,root,root) %{_bindir}/jdb | |
2692550d | 535 | %attr(755,root,root) %{_bindir}/jdeprscan |
d12f28e3 | 536 | %attr(755,root,root) %{_bindir}/jdeps |
74861363 | 537 | %{!?with_zero:%attr(755,root,root) %{_bindir}/jhsdb} |
2692550d | 538 | %attr(755,root,root) %{_bindir}/jimage |
3899c70b | 539 | %attr(755,root,root) %{_bindir}/jinfo |
2692550d | 540 | %attr(755,root,root) %{_bindir}/jlink |
3899c70b | 541 | %attr(755,root,root) %{_bindir}/jmap |
2692550d | 542 | %attr(755,root,root) %{_bindir}/jmod |
3899c70b | 543 | %attr(755,root,root) %{_bindir}/jps |
2692550d | 544 | %attr(755,root,root) %{_bindir}/jshell |
3899c70b JK |
545 | %attr(755,root,root) %{_bindir}/jstack |
546 | %attr(755,root,root) %{_bindir}/jstat | |
547 | %attr(755,root,root) %{_bindir}/jstatd | |
3899c70b JK |
548 | %attr(755,root,root) %{_bindir}/rmic |
549 | %attr(755,root,root) %{_bindir}/schemagen | |
550 | %attr(755,root,root) %{_bindir}/serialver | |
551 | %attr(755,root,root) %{_bindir}/wsgen | |
552 | %attr(755,root,root) %{_bindir}/wsimport | |
553 | %attr(755,root,root) %{_bindir}/xjc | |
554 | %{_jvmdir}/java | |
3899c70b JK |
555 | %{_mandir}/man1/jarsigner.1* |
556 | %{_mandir}/man1/javac.1* | |
557 | %{_mandir}/man1/javadoc.1* | |
558 | %{_mandir}/man1/javah.1* | |
559 | %{_mandir}/man1/javap.1* | |
560 | %{_mandir}/man1/jcmd.1* | |
561 | %{_mandir}/man1/jconsole.1* | |
562 | %{_mandir}/man1/jdb.1* | |
d12f28e3 | 563 | %{_mandir}/man1/jdeps.1* |
3899c70b JK |
564 | %{_mandir}/man1/jinfo.1* |
565 | %{_mandir}/man1/jmap.1* | |
566 | %{_mandir}/man1/jps.1* | |
3899c70b JK |
567 | %{_mandir}/man1/jstack.1* |
568 | %{_mandir}/man1/jstat.1* | |
569 | %{_mandir}/man1/jstatd.1* | |
3899c70b JK |
570 | %{_mandir}/man1/schemagen.1* |
571 | %{_mandir}/man1/serialver.1* | |
572 | %{_mandir}/man1/rmic.1* | |
573 | %{_mandir}/man1/wsgen.1* | |
574 | %{_mandir}/man1/wsimport.1* | |
575 | %{_mandir}/man1/xjc.1* | |
3899c70b JK |
576 | %lang(ja) %{_mandir}/ja/man1/jarsigner.1* |
577 | %lang(ja) %{_mandir}/ja/man1/javac.1* | |
578 | %lang(ja) %{_mandir}/ja/man1/javadoc.1* | |
579 | %lang(ja) %{_mandir}/ja/man1/javah.1* | |
580 | %lang(ja) %{_mandir}/ja/man1/javap.1* | |
581 | %lang(ja) %{_mandir}/ja/man1/jcmd.1* | |
582 | %lang(ja) %{_mandir}/ja/man1/jconsole.1* | |
583 | %lang(ja) %{_mandir}/ja/man1/jdb.1* | |
d12f28e3 | 584 | %lang(ja) %{_mandir}/ja/man1/jdeps.1* |
3899c70b JK |
585 | %lang(ja) %{_mandir}/ja/man1/jinfo.1* |
586 | %lang(ja) %{_mandir}/ja/man1/jmap.1* | |
587 | %lang(ja) %{_mandir}/ja/man1/jps.1* | |
3899c70b JK |
588 | %lang(ja) %{_mandir}/ja/man1/jstack.1* |
589 | %lang(ja) %{_mandir}/ja/man1/jstat.1* | |
590 | %lang(ja) %{_mandir}/ja/man1/jstatd.1* | |
3899c70b JK |
591 | %lang(ja) %{_mandir}/ja/man1/schemagen.1* |
592 | %lang(ja) %{_mandir}/ja/man1/serialver.1* | |
593 | %lang(ja) %{_mandir}/ja/man1/rmic.1* | |
594 | %lang(ja) %{_mandir}/ja/man1/wsgen.1* | |
595 | %lang(ja) %{_mandir}/ja/man1/wsimport.1* | |
596 | %lang(ja) %{_mandir}/ja/man1/xjc.1* | |
597 | ||
598 | %files jdk-base | |
599 | %defattr(644,root,root,755) | |
3899c70b JK |
600 | %dir %{dstdir} |
601 | %{_jvmdir}/%{name} | |
602 | %attr(755,root,root) %{dstdir}/bin/appletviewer | |
2692550d | 603 | %{?with_aot:%attr(755,root,root) %{dstdir}/bin/jaotc} |
3899c70b JK |
604 | %attr(755,root,root) %{dstdir}/bin/jar |
605 | %attr(755,root,root) %{dstdir}/bin/jarsigner | |
3899c70b JK |
606 | %attr(755,root,root) %{dstdir}/bin/javac |
607 | %attr(755,root,root) %{dstdir}/bin/javadoc | |
608 | %attr(755,root,root) %{dstdir}/bin/javah | |
609 | %attr(755,root,root) %{dstdir}/bin/javap | |
610 | %attr(755,root,root) %{dstdir}/bin/jconsole | |
611 | %attr(755,root,root) %{dstdir}/bin/jcmd | |
612 | %attr(755,root,root) %{dstdir}/bin/jdb | |
2692550d | 613 | %attr(755,root,root) %{dstdir}/bin/jdeprscan |
d12f28e3 | 614 | %attr(755,root,root) %{dstdir}/bin/jdeps |
74861363 | 615 | %{!?with_zero:%attr(755,root,root) %{dstdir}/bin/jhsdb} |
2692550d | 616 | %attr(755,root,root) %{dstdir}/bin/jimage |
3899c70b | 617 | %attr(755,root,root) %{dstdir}/bin/jinfo |
2692550d | 618 | %attr(755,root,root) %{dstdir}/bin/jlink |
3899c70b | 619 | %attr(755,root,root) %{dstdir}/bin/jmap |
2692550d | 620 | %attr(755,root,root) %{dstdir}/bin/jmod |
3899c70b | 621 | %attr(755,root,root) %{dstdir}/bin/jps |
2692550d | 622 | %attr(755,root,root) %{dstdir}/bin/jshell |
3899c70b JK |
623 | %attr(755,root,root) %{dstdir}/bin/jstack |
624 | %attr(755,root,root) %{dstdir}/bin/jstat | |
625 | %attr(755,root,root) %{dstdir}/bin/jstatd | |
3899c70b JK |
626 | %attr(755,root,root) %{dstdir}/bin/rmic |
627 | %attr(755,root,root) %{dstdir}/bin/schemagen | |
628 | %attr(755,root,root) %{dstdir}/bin/serialver | |
629 | %attr(755,root,root) %{dstdir}/bin/wsgen | |
630 | %attr(755,root,root) %{dstdir}/bin/wsimport | |
631 | %attr(755,root,root) %{dstdir}/bin/xjc | |
632 | %{dstdir}/include | |
2692550d JP |
633 | %{dstdir}/jmods |
634 | %{?with_aot:%attr(755,root,root) %{dstdir}/lib/libjelfshim.so} | |
3899c70b | 635 | %{dstdir}/lib/ct.sym |
3899c70b JK |
636 | |
637 | %files jre | |
638 | %defattr(644,root,root,755) | |
2692550d | 639 | %attr(755,root,root) %{_bindir}/idlj |
3899c70b | 640 | %attr(755,root,root) %{_bindir}/java |
d12f28e3 | 641 | %attr(755,root,root) %{_bindir}/jjs |
2692550d | 642 | %attr(755,root,root) %{_bindir}/jrunscript |
3899c70b JK |
643 | %attr(755,root,root) %{_bindir}/keytool |
644 | %attr(755,root,root) %{_bindir}/orbd | |
645 | %attr(755,root,root) %{_bindir}/pack200 | |
646 | %attr(755,root,root) %{_bindir}/rmid | |
647 | %attr(755,root,root) %{_bindir}/rmiregistry | |
648 | %attr(755,root,root) %{_bindir}/servertool | |
649 | %attr(755,root,root) %{_bindir}/tnameserv | |
650 | %attr(755,root,root) %{_bindir}/unpack200 | |
2692550d | 651 | %{_mandir}/man1/idlj.1* |
3899c70b | 652 | %{_mandir}/man1/java.1* |
d12f28e3 | 653 | %{_mandir}/man1/jjs.1* |
2692550d | 654 | %{_mandir}/man1/jrunscript.1* |
3899c70b JK |
655 | %{_mandir}/man1/keytool.1* |
656 | %{_mandir}/man1/orbd.1* | |
657 | %{_mandir}/man1/pack200.1* | |
658 | %{_mandir}/man1/rmid.1* | |
659 | %{_mandir}/man1/rmiregistry.1* | |
660 | %{_mandir}/man1/servertool.1* | |
661 | %{_mandir}/man1/tnameserv.1* | |
662 | %{_mandir}/man1/unpack200.1* | |
2692550d | 663 | %lang(ja) %{_mandir}/ja/man1/idlj.1* |
3899c70b | 664 | %lang(ja) %{_mandir}/ja/man1/java.1* |
d12f28e3 | 665 | %lang(ja) %{_mandir}/ja/man1/jjs.1* |
2692550d | 666 | %lang(ja) %{_mandir}/ja/man1/jrunscript.1* |
3899c70b JK |
667 | %lang(ja) %{_mandir}/ja/man1/keytool.1* |
668 | %lang(ja) %{_mandir}/ja/man1/orbd.1* | |
669 | %lang(ja) %{_mandir}/ja/man1/pack200.1* | |
670 | %lang(ja) %{_mandir}/ja/man1/rmid.1* | |
671 | %lang(ja) %{_mandir}/ja/man1/rmiregistry.1* | |
672 | %lang(ja) %{_mandir}/ja/man1/servertool.1* | |
673 | %lang(ja) %{_mandir}/ja/man1/tnameserv.1* | |
674 | %lang(ja) %{_mandir}/ja/man1/unpack200.1* | |
675 | ||
676 | %files jre-base | |
677 | %defattr(644,root,root,755) | |
3899c70b JK |
678 | %dir %{_sysconfdir}/%{name} |
679 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/* | |
680 | %dir %{dstdir} | |
681 | %{dstdir}/release | |
3899c70b | 682 | %{_jvmdir}/%{name}-jre |
3899c70b | 683 | %dir %{dstdir}/bin |
2692550d | 684 | %attr(755,root,root) %{dstdir}/bin/idlj |
3899c70b | 685 | %attr(755,root,root) %{dstdir}/bin/java |
d12f28e3 | 686 | %attr(755,root,root) %{dstdir}/bin/jjs |
2692550d | 687 | %attr(755,root,root) %{dstdir}/bin/jrunscript |
3899c70b | 688 | %attr(755,root,root) %{dstdir}/bin/keytool |
3899c70b | 689 | %attr(755,root,root) %{dstdir}/bin/orbd |
3899c70b | 690 | %attr(755,root,root) %{dstdir}/bin/pack200 |
3899c70b | 691 | %attr(755,root,root) %{dstdir}/bin/rmid |
3899c70b | 692 | %attr(755,root,root) %{dstdir}/bin/rmiregistry |
3899c70b | 693 | %attr(755,root,root) %{dstdir}/bin/servertool |
3899c70b | 694 | %attr(755,root,root) %{dstdir}/bin/tnameserv |
3899c70b | 695 | %attr(755,root,root) %{dstdir}/bin/unpack200 |
2692550d JP |
696 | %{dstdir}/conf |
697 | %{dstdir}/legal | |
698 | %dir %{dstdir}/lib | |
699 | %dir %{dstdir}/lib/jli | |
700 | %attr(755,root,root) %{dstdir}/lib/jli/libjli.so | |
701 | %{dstdir}/lib/security | |
702 | %dir %{dstdir}/lib/server | |
703 | %attr(755,root,root) %{dstdir}/lib/server/*.so | |
704 | %{dstdir}/lib/server/Xusage.txt | |
161e81b6 | 705 | %{!?with_zero:%{dstdir}/lib/classlist} |
2692550d JP |
706 | %{dstdir}/lib/jrt-fs.jar |
707 | %{dstdir}/lib/jvm.cfg | |
708 | %attr(755,root,root) %{dstdir}/lib/libattach.so | |
709 | %attr(755,root,root) %{dstdir}/lib/libawt.so | |
710 | %attr(755,root,root) %{dstdir}/lib/libawt_headless.so | |
711 | %attr(755,root,root) %{dstdir}/lib/libdt_socket.so | |
712 | %attr(755,root,root) %{dstdir}/lib/libinstrument.so | |
713 | %attr(755,root,root) %{dstdir}/lib/libj2gss.so | |
714 | %attr(755,root,root) %{dstdir}/lib/libj2pcsc.so | |
715 | %attr(755,root,root) %{dstdir}/lib/libj2pkcs11.so | |
716 | %attr(755,root,root) %{dstdir}/lib/libjaas_unix.so | |
717 | %attr(755,root,root) %{dstdir}/lib/libjava.so | |
718 | %attr(755,root,root) %{dstdir}/lib/libjimage.so | |
719 | %attr(755,root,root) %{dstdir}/lib/liblcms.so | |
720 | %attr(755,root,root) %{dstdir}/lib/libmanagement_agent.so | |
721 | %attr(755,root,root) %{dstdir}/lib/libmanagement_ext.so | |
722 | %attr(755,root,root) %{dstdir}/lib/libprefs.so | |
723 | %attr(755,root,root) %{dstdir}/lib/librmi.so | |
724 | %attr(755,root,root) %{dstdir}/lib/libsctp.so | |
725 | %attr(755,root,root) %{dstdir}/lib/libsunec.so | |
726 | %attr(755,root,root) %{dstdir}/lib/libjavajpeg.so | |
727 | %attr(755,root,root) %{dstdir}/lib/libjdwp.so | |
728 | %attr(755,root,root) %{dstdir}/lib/libjsig.so | |
729 | %attr(755,root,root) %{dstdir}/lib/libjsound.so | |
730 | %attr(755,root,root) %{dstdir}/lib/libmanagement.so | |
731 | %attr(755,root,root) %{dstdir}/lib/libmlib_image.so | |
732 | %attr(755,root,root) %{dstdir}/lib/libnet.so | |
733 | %attr(755,root,root) %{dstdir}/lib/libnio.so | |
74861363 | 734 | %{!?with_zero:%attr(755,root,root) %{dstdir}/lib/libsaproc.so} |
2692550d JP |
735 | %{?with_sunec:%attr(755,root,root) %{dstdir}/lib/libsunec.so} |
736 | %attr(755,root,root) %{dstdir}/lib/libunpack.so | |
737 | %attr(755,root,root) %{dstdir}/lib/libverify.so | |
738 | %attr(755,root,root) %{dstdir}/lib/libzip.so | |
739 | %attr(755,root,root) %{dstdir}/lib/jexec | |
740 | %{dstdir}/lib/modules | |
741 | %{dstdir}/lib/psfont.properties.ja | |
742 | %{dstdir}/lib/psfontj2d.properties | |
743 | %{dstdir}/lib/tzdb.dat | |
3899c70b JK |
744 | %{jvmjardir} |
745 | ||
746 | %files jre-X11 | |
747 | %defattr(644,root,root,755) | |
748 | %attr(755,root,root) %{_bindir}/policytool | |
749 | %{_mandir}/man1/policytool.1* | |
750 | %lang(ja) %{_mandir}/ja/man1/policytool.1* | |
751 | ||
752 | %files jre-base-X11 | |
753 | %defattr(644,root,root,755) | |
3899c70b | 754 | %attr(755,root,root) %{dstdir}/bin/policytool |
2692550d JP |
755 | %attr(755,root,root) %{dstdir}/lib/libsplashscreen.so |
756 | %attr(755,root,root) %{dstdir}/lib/libawt_xawt.so | |
757 | %attr(755,root,root) %{dstdir}/lib/libjawt.so | |
3899c70b JK |
758 | |
759 | %files jre-base-alsa | |
760 | %defattr(644,root,root,755) | |
2692550d | 761 | %attr(755,root,root) %{dstdir}/lib/libjsoundalsa.so |
3899c70b JK |
762 | |
763 | %files jre-base-freetype | |
764 | %defattr(644,root,root,755) | |
2692550d | 765 | %attr(755,root,root) %{dstdir}/lib/libfontmanager.so |
3899c70b JK |
766 | |
767 | %files jar | |
768 | %defattr(644,root,root,755) | |
769 | %attr(755,root,root) %{_bindir}/jar | |
770 | %{_mandir}/man1/jar.1* | |
771 | %lang(ja) %{_mandir}/ja/man1/jar.1* | |
772 | ||
773 | %files appletviewer | |
774 | %defattr(644,root,root,755) | |
775 | %attr(755,root,root) %{_bindir}/appletviewer | |
776 | %{_mandir}/man1/appletviewer.1* | |
777 | %lang(ja) %{_mandir}/ja/man1/appletviewer.1* | |
778 | ||
779 | %files jdk-sources | |
780 | %defattr(644,root,root,755) | |
781 | %{_javasrcdir}/%{name}-jdk.zip | |
782 | ||
783 | %files examples | |
784 | %defattr(644,root,root,755) | |
785 | %{_examplesdir}/%{name}-%{version} |