diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 9d3201c..8cfbfd9 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -1,3 +1,26 @@ +# RPM conditionals so as to be able to dynamically produce +# slowdebug/release builds. See: +# http://rpm.org/user_doc/conditional_builds.html +# +# Examples: +# +# Produce release *and* slowdebug builds on x86_64 (default): +# $ rpmbuild -ba java-1.8.0-openjdk.spec +# +# Produce only release builds (no slowdebug builds) on x86_64: +# $ rpmbuild -ba java-1.8.0-openjdk.spec --without slowdebug +# +# Only produce a release build on x86_64: +# $ fedpkg mockbuild --without slowdebug +# +# Only produce a debug build on x86_64: +# $ fedpkg local --without release +# +# Enable slowdebug builds by default on relevant arches. +%bcond_without slowdebug +# Enable release builds by default on relevant arches. +%bcond_without release + %define _find_debuginfo_opts -g # note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros # also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch @@ -14,8 +37,12 @@ %global debug_on with full debug on %global for_debug for packages with debug on -# by default we build normal build +%if %{with release} %global include_normal_build 1 +%else +%global include_normal_build 0 +%endif + %if %{include_normal_build} %global build_loop1 %{normal_suffix} %else @@ -30,6 +57,7 @@ %global jit_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} # By default, we build a debug build during main build on JIT architectures +%if %{with slowdebug} %ifarch %{jit_arches} %ifnarch %{arm} %global include_debug_build 1 @@ -39,6 +67,9 @@ %else %global include_debug_build 0 %endif +%else +%global include_debug_build 0 +%endif # On x86_64 and AArch64, we use the Shenandoah HotSpot %ifarch x86_64 %{aarch64} @@ -920,7 +951,7 @@ Provides: java-%{javaver}-%{origin}-accessibility = %{epoch}:%{version}-%{releas Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 10.%{buildver}%{?dist} +Release: 11.%{buildver}%{?dist} # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -1444,7 +1475,7 @@ else exit 12 fi if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then - echo "You have disabled both include_debug_build and include_debug_build. That is a no go." + echo "You have disabled both include_debug_build and include_normal_build. That is a no go." exit 13 fi %setup -q -c -n %{uniquesuffix ""} -T -a 0 @@ -2215,6 +2246,9 @@ require "copy_jdk_configs.lua" %endif %changelog +* Wed Jun 20 2018 Severin Gehwolf - 1:1.8.0.172-11.b11 +- Expose release/slowdebug builds being produced via conditionals. + * Wed Jun 20 2018 Jiri Vanek - 11:1.8.0.172-10.b11 - jsa files changed to 444 to pass rpm verification