diff --git a/environment-modules.spec b/environment-modules.spec index 63ada40..f46a29f 100644 --- a/environment-modules.spec +++ b/environment-modules.spec @@ -1,9 +1,11 @@ %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) %global vimdatadir %{_datadir}/vim/vimfiles +%bcond_with compat + Name: environment-modules Version: 4.7.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Provides dynamic modification of a user's environment License: GPLv2+ @@ -20,9 +22,11 @@ BuildRequires: procps-ng # specific requirements to build compat version and extension library BuildRequires: gcc BuildRequires: tcl-devel +%if %{with compat} # specific requirements to build compat version BuildRequires: libX11-devel BuildRequires: tclx-devel +%endif Requires: tcl Requires: sed Requires: less @@ -58,6 +62,7 @@ suite of different applications. NOTE: You will need to get a new shell after installing this package to have access to the module alias. +%if %{with compat} %package compat Summary: Environment Modules compatibility version Requires: environment-modules = %{version}-%{release} @@ -68,7 +73,7 @@ The Environment Modules package provides for the dynamic modification of a user's environment via modulefiles. This package provides Environment Modules compatibility version (3.2). - +%endif %prep %setup -q -n modules-%{version} @@ -83,7 +88,9 @@ This package provides Environment Modules compatibility version (3.2). --mandir=%{_mandir} \ --vimdatadir=%{vimdatadir} \ --enable-multilib-support \ +%if %{with compat} --enable-compat-version \ +%endif --disable-doc-install \ --enable-dotmodulespath \ --disable-set-shell-startup \ @@ -148,22 +155,25 @@ fi --slave %{_sysconfdir}/profile.d/modules.csh modules.csh %{_datadir}/Modules/init/profile.csh \ --slave %{_bindir}/modulecmd modulecmd %{_datadir}/Modules/libexec/modulecmd.tcl +%if %{with compat} %post compat %{_sbindir}/update-alternatives \ --install %{_sysconfdir}/profile.d/modules.sh modules.sh %{_datadir}/Modules/init/profile-compat.sh 10 \ --slave %{_sysconfdir}/profile.d/modules.csh modules.csh %{_datadir}/Modules/init/profile-compat.csh \ --slave %{_bindir}/modulecmd modulecmd %{_datadir}/Modules/libexec/modulecmd-compat +%endif %postun if [ $1 -eq 0 ] ; then %{_sbindir}/update-alternatives --remove modules.sh %{_datadir}/Modules/init/profile.sh fi +%if %{with compat} %postun compat if [ $1 -eq 0 ] ; then %{_sbindir}/update-alternatives --remove modules.sh %{_datadir}/Modules/init/profile-compat.sh fi - +%endif %files %license COPYING.GPLv2 @@ -194,14 +204,18 @@ fi %{vimdatadir}/ftplugin/modulefile.vim %{vimdatadir}/syntax/modulefile.vim +%if %{with compat} %files compat %doc ChangeLog-compat NEWS-compat %{_datadir}/Modules/libexec/modulecmd-compat %{_mandir}/man1/module-compat.1.gz %{_mandir}/man4/modulefile-compat.4.gz - +%endif %changelog +* Wed May 19 2021 Joe Orton - 4.7.0-3 +- add bcond for compat subpackage (#1940568) + * Thu Apr 15 2021 Mohan Boddu - 4.7.0-2 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937