Install man pages in _root_mandir

One shouldn't need to invoke gcc-toolset-env (or scl) to read about
gcc-toolset.

Resolves: RHEL-95996
This commit is contained in:
Siddhesh Poyarekar 2025-06-10 15:00:11 -04:00 committed by Siddhesh Poyarekar
parent 99843ffec7
commit ced527c67f

View File

@ -192,10 +192,10 @@ install -p -m 755 enable %{buildroot}%{_root_prefix}/lib/gcc-toolset/%{gts_ver}-
%endif %endif
# Install generated man page. # Install generated man page.
install -d -m 755 %{buildroot}%{_mandir}/man7 install -d -m 755 %{buildroot}%{_root_mandir}/man7
install -p -m 644 %{?scl_name}.7 %{buildroot}%{_mandir}/man7/ install -p -m 644 %{?scl_name}.7 %{buildroot}%{_root_mandir}/man7/
%if %have_scl_utils == 0 %if %have_scl_utils == 0
pushd %{buildroot}%{_mandir}/man7/ pushd %{buildroot}%{_root_mandir}/man7/
ln -s ./%{?scl_name}.7 gcc-toolset-%{gts_ver}-env.7 ln -s ./%{?scl_name}.7 gcc-toolset-%{gts_ver}-env.7
popd popd
%endif %endif
@ -219,6 +219,9 @@ popd
%files %files
%doc README %doc README
%if %have_scl_utils
%{_root_mandir}/man7/%{?scl_name}.*
%endif
%files runtime %files runtime
%{_root_sysconfdir}/rpm/macros.%{scl}-enable %{_root_sysconfdir}/rpm/macros.%{scl}-enable
@ -231,8 +234,8 @@ popd
%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/selinux-equiv.created %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_sysconfdir}/selinux-equiv.created
%dir %{_scl_root}/etc/alternatives %dir %{_scl_root}/etc/alternatives
%else %else
%{_mandir}/man7/%{?scl_name}.* %{_root_mandir}/man7/%{?scl_name}.*
%{_mandir}/man7/gcc-toolset-%{gts_ver}-env.* %{_root_mandir}/man7/gcc-toolset-%{gts_ver}-env.*
%{_root_bindir}/gcc-toolset-%{gts_ver}-env %{_root_bindir}/gcc-toolset-%{gts_ver}-env
%{_root_prefix}/lib/gcc-toolset/%{gts_ver}-env.source %{_root_prefix}/lib/gcc-toolset/%{gts_ver}-env.source
%endif %endif