diff --git a/java-latest-openjdk-portable.spec b/java-latest-openjdk-portable.spec index c7fbdd7..06d86b4 100644 --- a/java-latest-openjdk-portable.spec +++ b/java-latest-openjdk-portable.spec @@ -393,7 +393,7 @@ %global top_level_dir_name %{vcstag} %global top_level_dir_name_backup %{top_level_dir_name}-backup %global buildver 12 -%global rpmrelease 2 +%global rpmrelease 3 #%%global tagsuffix %%{nil} # Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit %if %is_system_jdk @@ -508,6 +508,7 @@ %define jrebindir() %{expand:%{_jvmdir}/%{sdkdir -- %{?1}}/bin} %global alt_java_name alt-java +%global generated_sources_name generated_sources %global rpm_state_dir %{_localstatedir}/lib/rpm-state/ @@ -1291,6 +1292,26 @@ function packFullPatchedSources() { genchecksum ${srcpackagesdir}/%{jdkportablesourcesarchive -- ""} } +function findGeneratedSources() { + local targetDir=${1} + local targetDirParent=$(dirname ${targetDir}) + local builtJdk=${2} + local builtJdkName=$(basename ${builtJdk}) + local sources=${3} + local sourcesName=$(basename ${sources}) + local sourcesParent=$(dirname ${sources}) + local target=${sourcesParent}/${targetDirParent}/%{generated_sources_name} + mkdir $target + pushd ${builtJdk} + mkdir ${target}/${builtJdkName} + cp --parents $(find . | grep -e "\.cpp$" -e "\.hpp$" -e "\.h$" -e "\.hh$" -e "\.rl$" -e "NONE$") ${target}/${builtJdkName} + popd + pushd ${sources} + mkdir ${target}/${sourcesName} + cp --parents $(find make | grep -e "\.cpp$" -e "\.hpp$" -e "\.h$" -e "\.hh$" -e "\.rl$" -e "NONE$") ${target}/${sourcesName} + popd +} + function packagejdk() { local imagesdir=$(pwd)/${1}/images local docdir=$(pwd)/${1}/images/docs @@ -1357,7 +1378,7 @@ function packagejdk() { %if %{with_systemtap} cp -a ${tapsetdir}* ${miscname} %endif - cp -av ${altjavadir}/%{alt_java_name} ${miscname} + cp -avr ${altjavadir}/%{alt_java_name} ${altjavadir}/../%{generated_sources_name} ${miscname} tar -cJf ${miscarchive} ${miscname} genchecksum ${miscarchive} fi @@ -1437,11 +1458,13 @@ for suffix in %{build_loop} ; do buildjdk ${bootbuilddir} ${systemjdk} "%{bootstrap_targets}" ${debugbuild} ${link_opt} ${debug_symbols} installjdk ${bootbuilddir} ${bootinstalldir} buildjdk ${builddir} $(pwd)/${bootinstalldir}/images/%{jdkimage} "${maketargets}" ${debugbuild} ${link_opt} ${debug_symbols} + findGeneratedSources ${installdir} ${builddir} $(pwd)/%{top_level_dir_name} stripjdk ${builddir} installjdk ${builddir} ${installdir} %{!?with_artifacts:rm -rf ${bootinstalldir}} else buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt} ${debug_symbols} + findGeneratedSources ${installdir} ${builddir} $(pwd)/%{top_level_dir_name} stripjdk ${builddir} installjdk ${builddir} ${installdir} fi @@ -1754,6 +1777,9 @@ done %endif %changelog +* Wed Dec 13 2023 Jiri Vanek - 1:21.0.1.0.12-3.rolling +- packing generated sources + * Wed Nov 22 2023 Jiri Vanek - 1:21.0.1.0.12-2.rolling - updated to OpenJDK 21.0.1 (2023-10-17) - adjsuted generate_source_tarball