]>
Commit | Line | Data |
---|---|---|
2692550d 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} | |
2692550d | 5 | %define use_jdk icedtea8 |
3899c70b | 6 | %else |
2692550d JP |
7 | %define use_jdk openjdk9 |
8 | %endif | |
9 | ||
10 | %ifarch %{x8664} | |
11 | %define with_aot 1 | |
3899c70b JK |
12 | %endif |
13 | ||
74861363 JP |
14 | %ifarch x32 |
15 | %define with_zero 1 | |
16 | %endif | |
17 | ||
3899c70b | 18 | # class data version seen with file(1) that this jvm is able to load |
2692550d JP |
19 | %define _classdataversion 53.0 |
20 | ||
21 | %define ver_u 9.0.4 | |
22 | %define ver_b 12 | |
23 | ||
d8978afb | 24 | # JDK/JRE version, as returned with `java -version`, '_' replaced with '.' |
2692550d | 25 | %define _jdkversion %{ver_u} |
3899c70b | 26 | |
83cf7429 | 27 | Summary: Open-source implementation of the Java Platform, Standard Edition |
2692550d JP |
28 | Summary(pl.UTF-8): Wolnoźródłowa implementacja Java 9 SE |
29 | Name: openjdk9 | |
30 | Version: %{ver_u}.%{ver_b} | |
31 | Release: 1 | |
3899c70b JK |
32 | License: GPL v2 |
33 | Group: Development/Languages/Java | |
2692550d JP |
34 | Source0: https://hg.openjdk.java.net/jdk-updates/jdk9u/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-%{version}.tar.bz2 |
35 | # Source0-md5: f71280d31603efeffdadea56fab8436e | |
36 | Source1: https://hg.openjdk.java.net/jdk-updates/jdk9u/corba/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-corba-%{version}.tar.bz2 | |
37 | # Source1-md5: 2bc0a490f71eaa17fcae9387b354ccfd | |
38 | Source2: https://hg.openjdk.java.net/jdk-updates/jdk9u/hotspot/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-hotspot-%{version}.tar.bz2 | |
39 | # Source2-md5: 37ff0144a673417c793d282d12aba6a1 | |
40 | Source3: https://hg.openjdk.java.net/jdk-updates/jdk9u/jaxp/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-jaxp-%{version}.tar.bz2 | |
41 | # Source3-md5: c6c4ee8ef80f10fc4fbc9d151436c89a | |
42 | Source4: https://hg.openjdk.java.net/jdk-updates/jdk9u/jaxws/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-jaxws-%{version}.tar.bz2 | |
43 | # Source4-md5: 3cf0375c3bba7d028c8408e41bbbb352 | |
44 | Source5: https://hg.openjdk.java.net/jdk-updates/jdk9u/jdk/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-jdk-%{version}.tar.bz2 | |
45 | # Source5-md5: 74d33ad39f5b67596c5269585811cfab | |
46 | Source6: https://hg.openjdk.java.net/jdk-updates/jdk9u/langtools/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-langtools-%{version}.tar.bz2 | |
47 | # Source6-md5: 95d7011a050602218b5400c632339e2c | |
48 | Source7: https://hg.openjdk.java.net/jdk-updates/jdk9u/nashorn/archive/jdk-%{ver_u}+%{ver_b}.tar.bz2?/%{name}-nashorn-%{version}.tar.bz2 | |
49 | # Source7-md5: 5fbaceceb82449806263ba99188b7139 | |
3899c70b | 50 | Source10: make-cacerts.sh |
2692550d JP |
51 | Patch0: libpath.patch |
52 | Patch1: make-4.3.patch | |
53 | Patch2: x32.patch | |
54 | Patch3: aarch64.patch | |
b2950e84 | 55 | URL: http://openjdk.java.net/ |
9910e19d | 56 | BuildRequires: /usr/bin/jar |
b2950e84 JK |
57 | BuildRequires: alsa-lib-devel |
58 | BuildRequires: ant | |
59 | BuildRequires: autoconf | |
60 | BuildRequires: bash | |
61 | %{?with_cacerts:BuildRequires: ca-certificates-update} | |
62 | BuildRequires: cups-devel | |
2692550d | 63 | BuildRequires: elfutils-devel |
b2950e84 JK |
64 | BuildRequires: freetype-devel >= 2.3 |
65 | BuildRequires: gawk | |
665079f5 | 66 | BuildRequires: giflib-devel >= 5.1 |
b2950e84 | 67 | BuildRequires: glibc-misc |
83cf7429 | 68 | %{?buildrequires_jdk} |
991454fa | 69 | BuildRequires: lcms2-devel |
3899c70b | 70 | BuildRequires: libjpeg-devel |
991454fa | 71 | BuildRequires: libpng-devel |
3899c70b | 72 | BuildRequires: lsb-release |
991454fa | 73 | BuildRequires: pcsc-lite-devel |
3899c70b JK |
74 | BuildRequires: pkgconfig |
75 | BuildRequires: rpmbuild(macros) >= 1.557 | |
3899c70b JK |
76 | BuildRequires: unzip |
77 | BuildRequires: util-linux | |
78 | BuildRequires: xorg-lib-libX11-devel | |
79 | BuildRequires: xorg-lib-libXinerama-devel | |
80 | BuildRequires: xorg-lib-libXp-devel | |
81 | BuildRequires: xorg-lib-libXrender-devel | |
82 | BuildRequires: xorg-lib-libXt-devel | |
83 | BuildRequires: xorg-lib-libXtst-devel | |
84 | BuildRequires: xorg-proto-printproto-devel | |
85 | BuildRequires: xorg-proto-xproto-devel | |
86 | BuildRequires: zip | |
87 | BuildRequires: zlib-devel | |
88 | Requires: %{name}-appletviewer = %{version}-%{release} | |
89 | Requires: %{name}-jdk = %{version}-%{release} | |
90 | Suggests: %{name}-jre-X11 | |
91 | Suggests: icedtea-web | |
92 | Obsoletes: icedtea6 | |
93 | Obsoletes: icedtea7 | |
3899c70b JK |
94 | Obsoletes: java-gcj-compat |
95 | Obsoletes: java-gcj-compat-devel | |
96 | Obsoletes: java-sun | |
97 | Obsoletes: java-sun-demos | |
98 | Obsoletes: java-sun-jre | |
9910e19d | 99 | Obsoletes: java-sun-jre-X11 |
3899c70b JK |
100 | Obsoletes: java-sun-jre-alsa |
101 | Obsoletes: java-sun-jre-jdbc | |
3899c70b | 102 | Obsoletes: java-sun-tools |
9910e19d JK |
103 | Obsoletes: java5-sun |
104 | Obsoletes: java5-sun-jre | |
105 | Obsoletes: java5-sun-jre-X11 | |
106 | Obsoletes: java5-sun-jre-jdbc | |
107 | Obsoletes: java5-sun-tools | |
3899c70b JK |
108 | Obsoletes: oracle-java7 |
109 | Obsoletes: oracle-java7-jre | |
9910e19d | 110 | Obsoletes: oracle-java7-jre-X11 |
3899c70b JK |
111 | Obsoletes: oracle-java7-jre-alsa |
112 | Obsoletes: oracle-java7-jre-jdbc | |
3899c70b JK |
113 | Obsoletes: oracle-java7-tools |
114 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
115 | ||
116 | %define dstreldir %{name}-%{version} | |
117 | %define dstdir %{_jvmdir}/%{dstreldir} | |
3899c70b JK |
118 | %define jvmjardir %{_jvmjardir}/%{name}-%{version} |
119 | ||
3899c70b JK |
120 | # to break artificial subpackage dependency loops |
121 | %define _noautoreq 'libmawt.so' java\\\\(ClassDataVersion\\\\) | |
122 | ||
2692550d JP |
123 | # openjdk build system handles _FORTIFY_SOURCE internally |
124 | %undefine _fortify_cflags | |
125 | ||
3899c70b JK |
126 | %description |
127 | Open-source implementation of the Java Platform, Standard Edition. | |
128 | ||
129 | This is a meta-package which provides, by its dependencies, all the | |
130 | OpenJDK components including the OpenJDK, Java 8 developement kit and | |
131 | runtime environment. | |
132 | ||
133 | %description -l pl.UTF-8 | |
134 | Wolnoźródłowa implementacja Java 8 SE. | |
135 | ||
136 | To jest meta-pakiet, który, za pośrednictwem zależności, dostarcza | |
137 | wszystkie komponenty OpenJDK, w tym środowisko programistyczne | |
138 | (OpenJDK) i uruchomieniowe (JRE). | |
139 | ||
140 | %package jdk | |
141 | Summary: OpenJDK - software development kit | |
142 | Summary(pl.UTF-8): OpenJDK - środowisko programistyczne | |
143 | Group: Development/Languages/Java | |
144 | Requires: %{name}-jar = %{version}-%{release} | |
145 | Requires: %{name}-jdk-base = %{version}-%{release} | |
146 | Requires: %{name}-jre = %{version}-%{release} | |
d8978afb JK |
147 | Provides: j2sdk = %{_jdkversion} |
148 | Provides: jdk = %{_jdkversion} | |
3899c70b JK |
149 | Obsoletes: blackdown-java-sdk |
150 | Obsoletes: ibm-java | |
151 | Obsoletes: icedtea6-jdk | |
152 | Obsoletes: icedtea7-jdk | |
153 | Obsoletes: java-blackdown | |
154 | Obsoletes: java-gcj-compat-devel | |
155 | Obsoletes: java-sun | |
156 | Obsoletes: java5-sun | |
3899c70b JK |
157 | Obsoletes: jdk |
158 | Obsoletes: kaffe | |
9910e19d | 159 | Obsoletes: oracle-java7 |
3899c70b JK |
160 | |
161 | %description jdk | |
162 | This package symlinks OpenJDK development tools provided by | |
163 | %{name}-jdk-base to system-wide directories like %{_bindir}, making | |
164 | OpenJDK the default JDK. | |
165 | ||
166 | %description jdk -l pl.UTF-8 | |
167 | Ten pakiet tworzy symboliczne dowiązania do narzędzi programistycznych | |
168 | OpenJDK, dostarczanych przez pakiet %{name}-jdk-base, w standardowych | |
169 | systemowych ścieżkach takich jak %{_bindir}, sprawiając tym samym, że | |
170 | OpenJDK staje się domyślnym JDK w systemie. | |
171 | ||
172 | %package jdk-base | |
173 | Summary: OpenJDK - software development kit | |
174 | Summary(pl.UTF-8): Kod OpenJDK - środowisko programistyczne | |
175 | Group: Development/Languages/Java | |
176 | Requires: %{name}-jre-base = %{version}-%{release} | |
2692550d | 177 | Requires: jpackage-utils >= 0:1.7.5-8 |
3899c70b JK |
178 | Provides: jdk(%{name}) |
179 | ||
180 | %description jdk-base | |
181 | OpenJDK development tools built using free software only. | |
182 | ||
183 | %description jdk-base -l pl.UTF-8 | |
184 | OpenJDK skompilowane wyłącznie przy użyciu wolnego oprogramowania. | |
185 | ||
186 | %package jre | |
187 | Summary: OpenJDK - runtime environment | |
188 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe | |
189 | Group: Development/Languages/Java | |
190 | Requires: %{name}-jre-base = %{version}-%{release} | |
191 | Requires: nss >= 1:3.13.4 | |
192 | # Require zoneinfo data provided by java-tzdata subpackage. | |
193 | Requires: java-tzdata | |
194 | Provides: java | |
195 | Provides: java(ClassDataVersion) = %{_classdataversion} | |
196 | Provides: java(jaas) = %{version} | |
197 | Provides: java(jaf) = 1.1.1 | |
198 | Provides: java(jaxp) = 1.3 | |
199 | Provides: java(jaxp_parser_impl) | |
200 | Provides: java(jce) = %{version} | |
201 | Provides: java(jdbc-stdext) = %{version} | |
202 | Provides: java(jdbc-stdext) = 3.0 | |
203 | Provides: java(jmx) = 1.4 | |
204 | Provides: java(jndi) = %{version} | |
205 | Provides: java(jsse) = %{version} | |
206 | Provides: java1.4 | |
d8978afb | 207 | Provides: jre = %{_jdkversion} |
3899c70b JK |
208 | Obsoletes: icedtea6-jre |
209 | Obsoletes: icedtea7-jre | |
210 | Obsoletes: java(jaas) | |
211 | Obsoletes: java(jaf) | |
212 | Obsoletes: java(jaxp) | |
213 | Obsoletes: java(jce) | |
214 | Obsoletes: java(jdbc-stdext) | |
215 | Obsoletes: java(jdbc-stdext) | |
216 | Obsoletes: java(jmx) | |
217 | Obsoletes: java(jndi) | |
218 | Obsoletes: java(jsse) | |
219 | Obsoletes: java-gcj-compat | |
220 | Obsoletes: java-sun-jre | |
221 | Obsoletes: java5-sun-jre | |
b2950e84 | 222 | Obsoletes: jre |
9910e19d | 223 | Obsoletes: oracle-java7-jre |
3899c70b JK |
224 | |
225 | %description jre | |
226 | This package symlinks OpenJDK runtime environment tools provided by | |
227 | %{name}-jre-base to system-wide directories like %{_bindir}, making | |
228 | OpenJDK the default JRE. | |
229 | ||
230 | %description jre -l pl.UTF-8 | |
231 | Ten pakiet tworzy symboliczne dowiązania do środowiska | |
232 | uruchomieniowego OpenJDK, dostarczanych przez pakiet %{name}-jre-base, | |
233 | w standardowych systemowych ścieżkach takich jak %{_bindir}, | |
234 | sprawiając tym samym, że OpenJDK staje się domyślnym JRE w systemie. | |
235 | ||
236 | %package jre-X11 | |
237 | Summary: OpenJDK - runtime environment - X11 support | |
238 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa X11 | |
239 | Group: Development/Languages/Java | |
240 | Requires: %{name}-jre = %{version}-%{release} | |
241 | Requires: %{name}-jre-base-X11 = %{version}-%{release} | |
d8978afb | 242 | Provides: jre-X11 = %{_jdkversion} |
3899c70b JK |
243 | Obsoletes: icedtea6-jre-X11 |
244 | Obsoletes: icedtea7-jre-X11 | |
245 | Obsoletes: java-sun-jre-X11 | |
246 | Obsoletes: oracle-java7-jre-X11 | |
247 | ||
248 | %description jre-X11 | |
249 | X11 support for OpenJDK runtime environment built using free software | |
250 | only. | |
251 | ||
252 | %description jre-X11 -l pl.UTF-8 | |
253 | Biblioteki X11 dla środowiska OpenJDK zbudowany wyłocznie przy uzyciu | |
254 | wolnego oprogramowania. | |
255 | ||
256 | %package jre-base | |
257 | Summary: OpenJDK - runtime environment | |
258 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe | |
259 | Group: Development/Languages/Java | |
2692550d | 260 | Requires: jpackage-utils >= 0:1.7.5-8 |
3899c70b JK |
261 | Provides: jre(%{name}) |
262 | ||
263 | %description jre-base | |
264 | OpenJDK runtime environment built using free software only. | |
265 | ||
266 | %description jre-base -l pl.UTF-8 | |
267 | Środowisko uruchomieniowe OpenJDK zbudowany wyłącznie przy użyciu | |
268 | wolnego oprogramowania. | |
269 | ||
270 | %package jre-base-X11 | |
271 | Summary: OpenJDK - runtime environment - X11 support | |
272 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa X11 | |
273 | Group: Development/Languages/Java | |
274 | Requires: %{name}-jre-base = %{version}-%{release} | |
275 | Requires: %{name}-jre-base-freetype = %{version}-%{release} | |
276 | ||
277 | %description jre-base-X11 | |
278 | X11 support for OpenJDK runtime environment built using free software | |
279 | only. | |
280 | ||
281 | %description jre-base-X11 -l pl.UTF-8 | |
282 | Biblioteki X11 dla środowiska OpenJDK zbudowany wyłocznie przy uzyciu | |
283 | wolnego oprogramowania. | |
284 | ||
285 | %package jre-base-alsa | |
286 | Summary: OpenJDK - runtime environment - ALSA support | |
287 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa ALSA | |
288 | Group: Development/Languages/Java | |
289 | Requires: %{name}-jre-base = %{version}-%{release} | |
290 | ||
291 | %description jre-base-alsa | |
292 | ALSA sound support for OpenJDK runtime environment build using free | |
293 | software only. | |
294 | ||
295 | %description jre-base-alsa -l pl.UTF-8 | |
296 | Biblioteki ALSA rozszerzające środowisko OpenJDK o obsługę dźwięku | |
297 | zbudowane przy uzyciu wyłącznie wolnego oprogramowania. | |
298 | ||
299 | %package jre-base-freetype | |
300 | Summary: OpenJDK - runtime environment - font support | |
301 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa fontów | |
302 | Group: Development/Languages/Java | |
303 | Requires: %{name}-jre-base = %{version}-%{release} | |
304 | ||
305 | %description jre-base-freetype | |
306 | Font handling library for OpenJDK runtime environment built using free | |
307 | software only. | |
308 | ||
309 | %description jre-base-freetype -l pl.UTF-8 | |
310 | Biblioteki obsługi czcionek dla OpenJDK zbudowane wyłącznie przy | |
311 | użyciu wolnego oprogramowania. | |
312 | ||
313 | %package jre-base-gtk | |
314 | Summary: OpenJDK - runtime environment - GTK support | |
315 | Summary(pl.UTF-8): OpenJDK - środowisko uruchomieniowe - obsługa GTK | |
316 | Group: Development/Languages/Java | |
317 | Requires: %{name}-jre-base = %{version}-%{release} | |
318 | ||
319 | %description jre-base-gtk | |
320 | GTK support for OpenJDK runtime environment. | |
321 | ||
322 | %description jre-base-gtk -l pl.UTF-8 | |
323 | Biblioteki GTK dla OpenJDK. | |
324 | ||
325 | %package jar | |
326 | Summary: OpenJDK - JAR tool | |
327 | Summary(pl.UTF-8): OpenJDK - narzędzie JAR | |
328 | Group: Development/Languages/Java | |
329 | Requires: %{name}-jdk-base = %{version}-%{release} | |
330 | Provides: jar | |
331 | Obsoletes: fastjar | |
332 | Obsoletes: icedtea6-jar | |
333 | Obsoletes: icedtea7-jar | |
334 | Obsoletes: jar | |
335 | ||
336 | %description jar | |
337 | JAR tool from OpenJDK built using free software only. | |
338 | ||
339 | JAR is an archiver used to merge Java classes into a single library. | |
340 | ||
341 | %description jar -l pl.UTF-8 | |
342 | Narzędzie jar z OpenJDK zbudowane przy uzyciu wyłącznie wolnego | |
343 | oprogramowania. | |
344 | ||
345 | JAR jest narzędziem pozwalającym wykonywać podstawowe operacje na | |
346 | archiwach javy .jar takie jak na przykład tworzenie lub rozpakowywanie | |
347 | archiwów. | |
348 | ||
349 | %package appletviewer | |
350 | Summary: OpenJDK - appletviewer tool | |
351 | Summary(pl.UTF-8): OpenJDK - narzędzie appletviewer | |
352 | Group: Development/Languages/Java | |
353 | Requires: %{name}-jdk-base = %{version}-%{release} | |
354 | Requires: %{name}-jre-X11 = %{version}-%{release} | |
355 | Obsoletes: icedtea6-appletviewer | |
356 | Obsoletes: icedtea7-appletviewer | |
357 | Obsoletes: java-sun-appletviewer | |
358 | Obsoletes: oracle-java7-appletviewer | |
359 | ||
360 | %description appletviewer | |
361 | Appletviewer from OpenJDK build using free software only. | |
362 | ||
363 | %description appletviewer -l pl.UTF-8 | |
364 | Appletviewer pozwala uruchamiać aplety javy niezależnie od | |
365 | przeglądarki www. Ten appletviewer pochodzi z zestawu narzędzi OpenJDK | |
366 | i został zbudowany wyłącznie przy użyciu wolnego oprogramowania. | |
367 | ||
368 | %package jdk-sources | |
369 | Summary: OpenJDK - sources | |
370 | Summary(pl.UTF-8): OpenJDK - kod źródłowy | |
371 | Group: Documentation | |
372 | %if "%{_rpmversion}" >= "5" | |
373 | BuildArch: noarch | |
374 | %endif | |
375 | ||
376 | %description jdk-sources | |
377 | Source code for the OpenJDK development kit and Java standard library. | |
378 | ||
379 | %description jdk-sources -l pl.UTF-8 | |
380 | Kod źródłowy narzędzi programistycznych OpenJDK oraz standardowej | |
381 | biblioteki Javy. | |
382 | ||
383 | %package examples | |
384 | Summary: OpenJDK - examples | |
385 | Summary(pl.UTF-8): OpenJDK - przykłady | |
386 | Group: Documentation | |
387 | %if "%{_rpmversion}" >= "5" | |
388 | BuildArch: noarch | |
389 | %endif | |
390 | ||
391 | %description examples | |
392 | Code examples for OpenJDK. | |
393 | ||
394 | %description examples -l pl.UTF-8 | |
395 | Przykłady dla OpenJDK. | |
396 | ||
397 | %prep | |
2692550d | 398 | %setup -qn jdk9u-jdk-%{ver_u}+%{ver_b} -a1 -a2 -a3 -a4 -a5 -a6 -a7 |
3899c70b | 399 | |
2692550d JP |
400 | for d in *-jdk-%{ver_u}+%{ver_b}* ; do |
401 | mv "$d" "${d%%-jdk-%{ver_u}+%{ver_b}}" | |
3899c70b JK |
402 | done |
403 | ||
5b4e4f20 JK |
404 | %patch0 -p1 |
405 | %patch1 -p1 | |
d12f28e3 | 406 | %patch2 -p1 |
2692550d | 407 | %ifarch aarch64 |
ce94f011 | 408 | %patch3 -p1 |
2692550d | 409 | %endif |
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) | |
2692550d | 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 | |
705 | %{dstdir}/lib/classlist | |
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} |