diff --git a/.gitignore b/.gitignore index ff67c22..3014eee 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ modules-3.2.8.tar.bz2 /modules-4.5.3.tar.bz2 /modules-4.6.0.tar.bz2 /modules-4.6.1.tar.bz2 +/modules-4.7.0.tar.bz2 diff --git a/environment-modules.spec b/environment-modules.spec index ebc4d3b..bf09428 100644 --- a/environment-modules.spec +++ b/environment-modules.spec @@ -2,23 +2,37 @@ %global vimdatadir %{_datadir}/vim/vimfiles Name: environment-modules -Version: 4.6.1 -Release: 2%{?dist} +Version: 4.7.0 +Release: 1%{?dist} Summary: Provides dynamic modification of a user's environment License: GPLv2+ URL: http://modules.sourceforge.net/ Source0: http://downloads.sourceforge.net/modules/modules-%{version}.tar.bz2 +BuildRequires: tcl +BuildRequires: dejagnu +BuildRequires: make +BuildRequires: sed +BuildRequires: less +BuildRequires: hostname +BuildRequires: procps-ng +# specific requirements to build compat version and extension library BuildRequires: gcc -BuildRequires: tcl-devel, tclx-devel, libX11-devel -BuildRequires: dejagnu, sed, procps, hostname, man, less -BuildRequires: make -Requires: tcl, sed, procps, man, less +BuildRequires: tcl-devel +# specific requirements to build compat version +BuildRequires: libX11-devel +BuildRequires: tclx-devel +Requires: tcl +Requires: sed +Requires: less Requires: vim-filesystem +Requires: procps-ng +Requires: man-db +Requires(post): coreutils Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives -Provides: environment(modules) +Provides: environment(modules) %description The Environment Modules package provides for the dynamic modification of @@ -66,16 +80,18 @@ This package provides Environment Modules compatibility version (3.2). --etcdir=%{_sysconfdir}/%{name} \ --bindir=%{_datadir}/Modules/bin \ --libexecdir=%{_datadir}/Modules/libexec \ - --docdir=%{_docdir}/%{name} \ + --mandir=%{_mandir} \ --vimdatadir=%{vimdatadir} \ --enable-multilib-support \ --enable-compat-version \ + --disable-doc-install \ --enable-dotmodulespath \ --disable-set-shell-startup \ --with-python=/usr/bin/python3 \ --with-initconf-in=etcdir \ --with-modulepath=%{_datadir}/Modules/modulefiles:%{_sysconfdir}/modulefiles:%{_datadir}/modulefiles \ --with-quarantine-vars='LD_LIBRARY_PATH LD_PRELOAD' + %make_build @@ -87,18 +103,16 @@ mkdir -p %{buildroot}%{_datadir}/modulefiles mkdir -p %{buildroot}%{_sysconfdir}/profile.d mkdir -p %{buildroot}%{_bindir} -# Set up for alternatives. +# setup for alternatives touch %{buildroot}%{_sysconfdir}/profile.d/modules.{csh,sh} touch %{buildroot}%{_bindir}/modulecmd # remove modulecmd wrapper as it will be handled by alternatives rm -f %{buildroot}%{_datadir}/Modules/bin/modulecmd -mv %{buildroot}%{_mandir}/man1/module{,-c}.1 -mv %{buildroot}%{_mandir}/man4/modulefile{,-c}.4 -# Major utilities go to regular bin dir. +# major utilities go to regular bin dir mv %{buildroot}%{_datadir}/Modules/bin/envml %{buildroot}%{_bindir}/ -# Rename compat docs to find them in files section. +# rename compat docs to find them in files section mv compat/ChangeLog ChangeLog-compat mv compat/NEWS NEWS-compat @@ -107,19 +121,19 @@ mv {doc/build/,}MIGRATING.txt mv {doc/build/,}CONTRIBUTING.txt mv {doc/build/,}diff_v3_v4.txt mv {doc/,}example.txt -rm -f %{buildroot}%{_docdir}/%{name}/{COPYING.GPLv2,ChangeLog-compat,INSTALL{,-win}.txt,NEWS-compat} cp -p script/createmodule.sh %{buildroot}%{_datadir}/Modules/bin +# install the rpm config file install -Dpm 644 contrib/rpm/macros.%{name} %{buildroot}/%{macrosdir}/macros.%{name} + %check make test + %post # Cleanup from pre-alternatives -[ ! -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 [ ! -L %{_sysconfdir}/profile.d/modules.sh ] && rm -f %{_sysconfdir}/profile.d/modules.sh [ ! -L %{_sysconfdir}/profile.d/modules.csh ] && rm -f %{_sysconfdir}/profile.d/modules.csh [ ! -L %{_bindir}/modulecmd ] && rm -f %{_bindir}/modulecmd @@ -132,9 +146,7 @@ fi %{_sbindir}/update-alternatives \ --install %{_sysconfdir}/profile.d/modules.sh modules.sh %{_datadir}/Modules/init/profile.sh 40 \ --slave %{_sysconfdir}/profile.d/modules.csh modules.csh %{_datadir}/Modules/init/profile.csh \ - --slave %{_bindir}/modulecmd modulecmd %{_datadir}/Modules/libexec/modulecmd.tcl \ - --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 + --slave %{_bindir}/modulecmd modulecmd %{_datadir}/Modules/libexec/modulecmd.tcl %post compat %{_sbindir}/update-alternatives \ @@ -175,10 +187,8 @@ fi %{_datadir}/Modules/modulefiles %{_datadir}/modulefiles %{_mandir}/man1/ml.1.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 +%{_mandir}/man1/module.1.gz +%{_mandir}/man4/modulefile.4.gz %{macrosdir}/macros.%{name} %{vimdatadir}/ftdetect/modulefile.vim %{vimdatadir}/ftplugin/modulefile.vim @@ -192,6 +202,14 @@ fi %changelog +* Fri Feb 19 2021 Xavier Delaruelle - 4.7.0-1 +- Update to 4.7.0 (#1930632) +- Align spec syntax with upstream spec file +- Add 'tcl' to the BuildRequires and remove 'man' from this list +- Fix names of 'procps-ng' and 'man-db' packages on Fedora +- Only install manpages through make install, other docs are handled by %%doc +- Remove alternatives mechanism for manpages + * Tue Jan 26 2021 Fedora Release Engineering - 4.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 48df4e3..33b55ee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (modules-4.6.1.tar.bz2) = 183538d3c3c2ede7566647d9a45ab9b91e9163153f8d6d52152c2c1467181ee3633d6f64bc76c666e6ed3c6cae28778e55a2961a77e62d875e3e0f6100aae1b6 +SHA512 (modules-4.7.0.tar.bz2) = f53b260a0a27b0ecc11a87136a0fe5776d32e37cc9755565c0fc11d4c6c33bdbef13d3d1a8c1c6a77980fec41ed1a60fc793e668745fee8b10c41051a602be1c