From d8d7f032b98a745e01d69a4648c55eca56155ea2 Mon Sep 17 00:00:00 2001 From: Andrew Hughes Date: Tue, 2 Jul 2019 11:27:19 +0100 Subject: [PATCH] Handle milestone as variables so we can alter it easily and set the docs zip filename appropriately. Include 'ea' designator in Release when appropriate. --- java-11-openjdk.spec | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/java-11-openjdk.spec b/java-11-openjdk.spec index d1a390a..5477864 100644 --- a/java-11-openjdk.spec +++ b/java-11-openjdk.spec @@ -231,6 +231,7 @@ %global top_level_dir_name %{origin} %global minorver 0 %global buildver 7 +%global rpmrelease 6 #%%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 %if %is_system_jdk @@ -243,6 +244,23 @@ %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 %global compatiblename java-%{majorver}-%{origin} %global fullversion %{compatiblename}-%{version}-%{release} @@ -953,7 +971,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release} Name: java-%{javaver}-%{origin} 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 # 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 @@ -1396,7 +1414,7 @@ bash ../configure \ --with-jobs=1 \ %endif --with-version-build=%{buildver} \ - --with-version-pre="" \ + --with-version-pre="%{ea_designator}" \ --with-version-opt=%{lts_designator} \ --with-vendor-version-string="%{vendor_version_string}" \ --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} -#check sheandoah is enabled +#check Shenandoah is enabled %if %{use_shenandoah_hotspot} $JAVA_HOME//bin/java -XX:+UseShenandoahGC -version %endif @@ -1621,7 +1639,7 @@ if ! echo $suffix | grep -q "debug" ; then # Install Javadoc documentation install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir} 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 # Install icons and menu entries @@ -1834,6 +1852,12 @@ require "copy_jdk_configs.lua" %changelog +* Fri Jun 21 2019 Severin Gehwolf - 1:11.0.3.7-6 +- Include 'ea' designator in Release when appropriate. + +* Wed May 22 2019 Andrew Hughes - 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 - 1:11.0.3.7-5 - Bump release for rebuild.