Add additional javadoc & javadoczip alternatives
Create additional alternatives linked from the javadocdir, named: * java-%{origin} / java-%{origin}.zip * java-%{javaver} / java-%{javaver}.zip * java-%{javaver}-%{origin} / java-%{javaver}-%{origin}.zip
This commit is contained in:
parent
4bb380bddf
commit
53085a2a7f
@ -348,7 +348,7 @@
|
||||
%global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u})
|
||||
# eg jdk8u60-b27 -> b27
|
||||
%global buildver %(VERSION=%{version_tag}; echo ${VERSION##*-})
|
||||
%global rpmrelease 3
|
||||
%global rpmrelease 4
|
||||
# Define milestone (EA for pre-releases, GA ("fcs") for releases)
|
||||
# Release will be (where N is usually a number starting at 1):
|
||||
# - 0.N%%{?extraver}%%{?dist} for EA releases,
|
||||
@ -767,10 +767,19 @@ PRIORITY=%{priority}
|
||||
if [ "%{?1}" == %{debug_suffix} ]; then
|
||||
let PRIORITY=PRIORITY-1
|
||||
fi
|
||||
for X in %{origin} %{javaver} ; do
|
||||
key=javadocdir_"$X"
|
||||
alternatives --install %{_javadocdir}/java-"$X" $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $PRIORITY --family %{family_noarch}
|
||||
%{set_if_needed_alternatives $key %{family_noarch}}
|
||||
done
|
||||
|
||||
key=javadocdir
|
||||
alternatives --install %{_javadocdir}/java $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $PRIORITY --family %{family_noarch}
|
||||
%{set_if_needed_alternatives $key %{family_noarch}}
|
||||
key=javadocdir_%{javaver}_%{origin}
|
||||
alternatives --install %{_javadocdir}/java-%{javaver}-%{origin} $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $PRIORITY --family %{family_noarch}
|
||||
%{set_if_needed_alternatives $key %{family_noarch}}
|
||||
|
||||
key=javadocdir
|
||||
alternatives --install %{_javadocdir}/java $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $PRIORITY --family %{family_noarch}
|
||||
%{set_if_needed_alternatives $key %{family_noarch}}
|
||||
exit 0
|
||||
}
|
||||
|
||||
@ -780,6 +789,9 @@ if [ "x$debug" == "xtrue" ] ; then
|
||||
fi
|
||||
post_state=$1 # from postun, https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
|
||||
%{save_and_remove_alternatives javadocdir %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $post_state %{family_noarch}}
|
||||
%{save_and_remove_alternatives javadocdir_%{origin} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $post_state %{family_noarch}}
|
||||
%{save_and_remove_alternatives javadocdir_%{javaver} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $post_state %{family_noarch}}
|
||||
%{save_and_remove_alternatives javadocdir_%{javaver}_%{origin} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}/api $post_state %{family_noarch}}
|
||||
exit 0
|
||||
}
|
||||
|
||||
@ -791,9 +803,20 @@ PRIORITY=%{priority}
|
||||
if [ "%{?1}" == %{debug_suffix} ]; then
|
||||
let PRIORITY=PRIORITY-1
|
||||
fi
|
||||
key=javadoczip
|
||||
alternatives --install %{_javadocdir}/java-zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $PRIORITY --family %{family_noarch}
|
||||
%{set_if_needed_alternatives $key %{family_noarch}}
|
||||
for X in %{origin} %{javaver} ; do
|
||||
key=javadoczip_"$X"
|
||||
alternatives --install %{_javadocdir}/java-"$X".zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $PRIORITY --family %{family_noarch}
|
||||
%{set_if_needed_alternatives $key %{family_noarch}}
|
||||
done
|
||||
|
||||
key=javadoczip_%{javaver}_%{origin}
|
||||
alternatives --install %{_javadocdir}/java-%{javaver}-%{origin}.zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $PRIORITY --family %{family_noarch}
|
||||
%{set_if_needed_alternatives $key %{family_noarch}}
|
||||
|
||||
# Weird legacy filename for backwards-compatibility
|
||||
key=javadoczip
|
||||
alternatives --install %{_javadocdir}/java-zip $key %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $PRIORITY --family %{family_noarch}
|
||||
%{set_if_needed_alternatives $key %{family_noarch}}
|
||||
exit 0
|
||||
}
|
||||
|
||||
@ -803,6 +826,9 @@ exit 0
|
||||
fi
|
||||
post_state=$1 # from postun, https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
|
||||
%{save_and_remove_alternatives javadoczip %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $post_state %{family_noarch}}
|
||||
%{save_and_remove_alternatives javadoczip_%{origin} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $post_state %{family_noarch}}
|
||||
%{save_and_remove_alternatives javadoczip_%{javaver} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $post_state %{family_noarch}}
|
||||
%{save_and_remove_alternatives javadoczip_%{javaver}_%{origin} %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip $post_state %{family_noarch}}
|
||||
exit 0
|
||||
}
|
||||
|
||||
@ -1181,6 +1207,9 @@ exit 0
|
||||
%if %is_system_jdk
|
||||
%if %{is_release_build -- %{?1}}
|
||||
%ghost %{_javadocdir}/java
|
||||
%ghost %{_javadocdir}/java-%{origin}
|
||||
%ghost %{_javadocdir}/java-%{javaver}
|
||||
%ghost %{_javadocdir}/java-%{javaver}-%{origin}
|
||||
%endif
|
||||
%endif
|
||||
}
|
||||
@ -1193,6 +1222,9 @@ exit 0
|
||||
%if %is_system_jdk
|
||||
%if %{is_release_build -- %{?1}}
|
||||
%ghost %{_javadocdir}/java-zip
|
||||
%ghost %{_javadocdir}/java-%{origin}.zip
|
||||
%ghost %{_javadocdir}/java-%{javaver}.zip
|
||||
%ghost %{_javadocdir}/java-%{javaver}-%{origin}.zip
|
||||
%endif
|
||||
%endif
|
||||
}
|
||||
@ -2787,6 +2819,9 @@ cjc.mainProgram(args)
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Jul 14 2022 FeRD (Frank Dana) <ferdnyc@gmail.com> - 1:1.8.0.332.b09-4
|
||||
- Add javaver- and origin-specific javadoc and javadoczip alternatives.
|
||||
|
||||
* Fri Jul 01 2022 Stephan Bergmann <sbergman@redhat.com> - 1:1.8.0.332.b09-3
|
||||
- Disable copy-jdk-configs for Flatpak builds
|
||||
- Fix flatpak builds by exempting them from bootstrap
|
||||
|
Loading…
Reference in New Issue
Block a user