From ffb3fb58346e9b2973cbd59a1aa0288f373046b0 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 16 Mar 2017 15:12:49 -0600 Subject: [PATCH] Use alternatives for man pages as well --- environment-modules.spec | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/environment-modules.spec b/environment-modules.spec index b268ba4..ad5b084 100644 --- a/environment-modules.spec +++ b/environment-modules.spec @@ -2,7 +2,7 @@ Name: environment-modules Version: 3.2.10 -Release: 20%{?dist} +Release: 21%{?dist} Summary: Provides dynamic modification of a user's environment Group: System Environment/Base @@ -110,6 +110,9 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modulefiles \ $RPM_BUILD_ROOT%{_datadir}/modulefiles # Install the rpm config file install -Dpm 644 %{SOURCE4} %{buildroot}/%{macrosdir}/macros.%{name} +# Prep for man alternatives +mv $RPM_BUILD_ROOT%{_mandir}/man1/module{,-c}.1 +mv $RPM_BUILD_ROOT%{_mandir}/man4/modulefile{,-c}.4 %check @@ -119,8 +122,12 @@ make test %post # Cleanup from pre-alternatives [ ! -L %{_bindir}/modules.sh ] && rm -f %{_sysconfdir}/profile.d/modules.sh +[ ! -L %{_mandir}/man1/module.1.gz ] && rm -f %{_mandir}/man1/module.1.gz +[ ! -L %{_mandir}/man4/modulefile.4.gz ] && rm -f %{_mandir}/man4/modulefile.4.gz %{_sbindir}/update-alternatives --install %{_sysconfdir}/profile.d/modules.sh modules.sh %{_datadir}/Modules/init/modules.sh 40 \ - --slave %{_sysconfdir}/profile.d/modules.csh modules.csh %{_datadir}/Modules/init/csh + --slave %{_sysconfdir}/profile.d/modules.csh modules.csh %{_datadir}/Modules/init/csh \ + --slave %{_mandir}/man1/module.1.gz module.1.gz %{_mandir}/man1/module-c.1.gz \ + --slave %{_mandir}/man4/modulefile.4.gz modulefile.4.gz %{_mandir}/man4/modulefile-c.4.gz %postun if [ $1 -eq 0 ] ; then @@ -142,12 +149,17 @@ fi %config(noreplace) %{_datadir}/Modules/init/.modulespath %{_datadir}/Modules/modulefiles %{_datadir}/modulefiles -%{_mandir}/man1/module.1.gz -%{_mandir}/man4/modulefile.4.gz +%ghost %{_mandir}/man1/module.1.gz +%ghost %{_mandir}/man4/modulefile.4.gz +%{_mandir}/man1/module-c.1.gz +%{_mandir}/man4/modulefile-c.4.gz %{macrosdir}/macros.%{name} %changelog +* Thu Mar 16 2017 Orion Poplawski - 3.2.10-21 +- Use alternatives for man pages as well + * Fri Feb 10 2017 Fedora Release Engineering - 3.2.10-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild