Define pkgnameroot to simplify build requirements and allow '-rhel7' suffix on RHEL

Related: RHEL-12998
This commit is contained in:
Andrew Hughes 2023-10-30 08:29:47 +00:00
parent b06f70935c
commit 7b175be3b3

View File

@ -351,7 +351,7 @@
%global top_level_dir_name %{vcstag} %global top_level_dir_name %{vcstag}
%global top_level_dir_name_backup %{top_level_dir_name}-backup %global top_level_dir_name_backup %{top_level_dir_name}-backup
%global buildver 12 %global buildver 12
%global rpmrelease 1 %global rpmrelease 2
# Settings used by the portable build # Settings used by the portable build
%global portablerelease 1 %global portablerelease 1
%global portablesuffix el9 %global portablesuffix el9
@ -1262,6 +1262,13 @@ Provides: java-%{origin}-src%{?1} = %{epoch}:%{version}-%{release}
# Prevent brp-java-repack-jars from being run # Prevent brp-java-repack-jars from being run
%global __jar_repack 0 %global __jar_repack 0
# Define the OS the portable JDK is built on
# Only used on RHEL
%if 0%{?centos} == 0
%global pkgos rhel7
%endif
# Define the root name of the portable packages
%global pkgnameroot java-%{featurever}-%{origin}-portable%{?pkgos:-%{pkgos}}
Name: java-%{javaver}-%{origin} Name: java-%{javaver}-%{origin}
Version: %{newjavaver}.%{buildver} Version: %{newjavaver}.%{buildver}
@ -1448,19 +1455,19 @@ BuildRequires: xorg-x11-proto-devel
BuildRequires: zip BuildRequires: zip
BuildRequires: javapackages-filesystem BuildRequires: javapackages-filesystem
%if %{include_normal_build} %if %{include_normal_build}
BuildRequires: java-%{featurever}-openjdk-portable-unstripped = %{epoch}:%{version}-%{prelease}.%{portablesuffix} BuildRequires: %{pkgnameroot}-unstripped = %{epoch}:%{version}-%{prelease}.%{portablesuffix}
BuildRequires: java-%{featurever}-openjdk-portable-static-libs = %{epoch}:%{version}-%{prelease}.%{portablesuffix} BuildRequires: %{pkgnameroot}-static-libs = %{epoch}:%{version}-%{prelease}.%{portablesuffix}
%endif %endif
%if %{include_fastdebug_build} %if %{include_fastdebug_build}
BuildRequires: java-%{featurever}-openjdk-portable-devel-fastdebug = %{epoch}:%{version}-%{prelease}.%{portablesuffix} BuildRequires: %{pkgnameroot}-devel-fastdebug = %{epoch}:%{version}-%{prelease}.%{portablesuffix}
BuildRequires: java-%{featurever}-openjdk-portable-static-libs-fastdebug = %{epoch}:%{version}-%{prelease}.%{portablesuffix} BuildRequires: %{pkgnameroot}-static-libs-fastdebug = %{epoch}:%{version}-%{prelease}.%{portablesuffix}
%endif %endif
%if %{include_debug_build} %if %{include_debug_build}
BuildRequires: java-%{featurever}-openjdk-portable-devel-slowdebug = %{epoch}:%{version}-%{prelease}.%{portablesuffix} BuildRequires: %{pkgnameroot}-devel-slowdebug = %{epoch}:%{version}-%{prelease}.%{portablesuffix}
BuildRequires: java-%{featurever}-openjdk-portable-static-libs-slowdebug = %{epoch}:%{version}-%{prelease}.%{portablesuffix} BuildRequires: %{pkgnameroot}-static-libs-slowdebug = %{epoch}:%{version}-%{prelease}.%{portablesuffix}
%endif %endif
BuildRequires: java-%{featurever}-openjdk-portable-docs = %{epoch}:%{version}-%{prelease}.%{portablesuffix} BuildRequires: %{pkgnameroot}-docs = %{epoch}:%{version}-%{prelease}.%{portablesuffix}
BuildRequires: java-%{featurever}-openjdk-portable-misc = %{epoch}:%{version}-%{prelease}.%{portablesuffix} BuildRequires: %{pkgnameroot}-misc = %{epoch}:%{version}-%{prelease}.%{portablesuffix}
# Zero-assembler build requirement # Zero-assembler build requirement
%ifarch %{zero_arches} %ifarch %{zero_arches}
BuildRequires: libffi-devel BuildRequires: libffi-devel
@ -2478,6 +2485,10 @@ cjc.mainProgram(args)
%endif %endif
%changelog %changelog
* Mon Oct 30 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:21.0.1.0.12-2
- Define pkgnameroot to simplify build requirements and allow '-rhel7' suffix on RHEL
- Related: RHEL-12998
* Fri Oct 27 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:21.0.1.0.12-1 * Fri Oct 27 2023 Andrew Hughes <gnu.andrew@redhat.com> - 1:21.0.1.0.12-1
- Update to jdk-21.0.1.0+12 (GA) - Update to jdk-21.0.1.0+12 (GA)
- Update release notes to 21.0.1.0+12 - Update release notes to 21.0.1.0+12