man command on the system to display manual pages from the enabled Software Collection, update the MANPATH environment variable with the paths to the manual pages that are associated with the Software Collection.
MANPATH environment variable, add the following to the %install section of the Software Collection spec file:
%install cat >> %{buildroot}%{_scl_scripts}/enable << EOF export MANPATH=%{_mandir}:\${MANPATH} EOF
enable scriptlet to update the MANPATH environment variable. The manual pages associated with the Software Collection are then not visible as long as the Software Collection is not enabled.
/usr/bin/ directory. In this case, ensure that the manual pages are visible to the system even if the Software Collection is disabled.
man command on the system to display manual pages from the disabled Software Collection, update the MANPATH environment variable with the paths to the manual pages associated with the Software Collection.
Procedure 3.4. Updating the MANPATH environment variable for the disabled Software Collection
MANPATH environment variable, create a custom script /etc/profile.d/name.sh. The script is preloaded when a shell is started on the system.
%{?scl_prefix}manpage.shmanpage.sh short script that modifies the MANPATH variable to refer to your man path directory:
export MANPATH=/opt/provider/software_collection/path/to/your/man_pages:${MANPATH}SOURCE2: %{?scl_prefix}manpage.sh
/etc/profile.d/ directory by adjusting the %install section of the Software Collection package's spec file:
%install install -p -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{?scl:%_root_sysconfdir}%{!?scl:%_sysconfdir}/profile.d/