Handle milestone as variables so we can alter it easily and set the docs zip filename appropriately.

Include 'ea' designator in Release when appropriate.
This commit is contained in:
Andrew Hughes 2019-07-02 11:27:19 +01:00
parent 12bcca3b0c
commit d8d7f032b9

View File

@ -231,6 +231,7 @@
%global top_level_dir_name %{origin} %global top_level_dir_name %{origin}
%global minorver 0 %global minorver 0
%global buildver 7 %global buildver 7
%global rpmrelease 6
#%%global tagsuffix "" #%%global tagsuffix ""
# priority must be 8 digits in total; untill openjdk 1.8 we were using 18..... so when moving to 11 we had to add another digit # priority must be 8 digits in total; untill openjdk 1.8 we were using 18..... so when moving to 11 we had to add another digit
%if %is_system_jdk %if %is_system_jdk
@ -243,6 +244,23 @@
%global javaver %{majorver} %global javaver %{majorver}
# Define milestone (EA for pre-releases, GA for releases)
# Release will be (where N is usually a number starting at 1):
# - 0.N%%{?extraver}%%{?dist} for EA releases,
# - N%%{?extraver}{?dist} for GA releases
%global is_ga 1
%if %{is_ga}
%global ea_designator ""
%global ea_designator_zip ""
%global extraver %{nil}
%global eaprefix %{nil}
%else
%global ea_designator ea
%global ea_designator_zip -%{ea_designator}
%global extraver .%{ea_designator}
%global eaprefix 0.
%endif
# parametrized macros are order-sensitive # parametrized macros are order-sensitive
%global compatiblename java-%{majorver}-%{origin} %global compatiblename java-%{majorver}-%{origin}
%global fullversion %{compatiblename}-%{version}-%{release} %global fullversion %{compatiblename}-%{version}-%{release}
@ -953,7 +971,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
Name: java-%{javaver}-%{origin} Name: java-%{javaver}-%{origin}
Version: %{newjavaver}.%{buildver} Version: %{newjavaver}.%{buildver}
Release: 5%{?dist} Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist}
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # 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 # 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 # also included the epoch in their virtual provides. This created a
@ -1396,7 +1414,7 @@ bash ../configure \
--with-jobs=1 \ --with-jobs=1 \
%endif %endif
--with-version-build=%{buildver} \ --with-version-build=%{buildver} \
--with-version-pre="" \ --with-version-pre="%{ea_designator}" \
--with-version-opt=%{lts_designator} \ --with-version-opt=%{lts_designator} \
--with-vendor-version-string="%{vendor_version_string}" \ --with-vendor-version-string="%{vendor_version_string}" \
--with-boot-jdk=/usr/lib/jvm/java-%{buildjdkver}-openjdk \ --with-boot-jdk=/usr/lib/jvm/java-%{buildjdkver}-openjdk \
@ -1465,7 +1483,7 @@ for suffix in %{rev_build_loop} ; do
export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{jdkimage} export JAVA_HOME=$(pwd)/%{buildoutputdir -- $suffix}/images/%{jdkimage}
#check sheandoah is enabled #check Shenandoah is enabled
%if %{use_shenandoah_hotspot} %if %{use_shenandoah_hotspot}
$JAVA_HOME//bin/java -XX:+UseShenandoahGC -version $JAVA_HOME//bin/java -XX:+UseShenandoahGC -version
%endif %endif
@ -1621,7 +1639,7 @@ if ! echo $suffix | grep -q "debug" ; then
# Install Javadoc documentation # Install Javadoc documentation
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir} install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}
cp -a %{buildoutputdir -- $suffix}/images/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix} cp -a %{buildoutputdir -- $suffix}/images/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}
cp -a %{buildoutputdir -- $suffix}/bundles/jdk-%{newjavaver}+%{buildver}%{lts_designator_zip}-docs.zip $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip cp -a %{buildoutputdir -- $suffix}/bundles/jdk-%{newjavaver}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip
fi fi
# Install icons and menu entries # Install icons and menu entries
@ -1834,6 +1852,12 @@ require "copy_jdk_configs.lua"
%changelog %changelog
* Fri Jun 21 2019 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.3.7-6
- Include 'ea' designator in Release when appropriate.
* Wed May 22 2019 Andrew Hughes <gnu.andrew@redhat.com> - 1:11.0.3.7-6
- Handle milestone as variables so we can alter it easily and set the docs zip filename appropriately.
* Tue May 14 2019 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.3.7-5 * Tue May 14 2019 Severin Gehwolf <sgehwolf@redhat.com> - 1:11.0.3.7-5
- Bump release for rebuild. - Bump release for rebuild.