7de0d6
Name:           environment-modules
de902a
Version:        3.2.10
de902a
Release:        1%{?dist}
7de0d6
Summary:        Provides dynamic modification of a user's environment
7de0d6
7de0d6
Group:          System Environment/Base
8e1c9c
License:        GPLv2+
7de0d6
URL:            http://modules.sourceforge.net/
c2dd4d
Source0:        http://downloads.sourceforge.net/modules/modules-%{version}.tar.bz2
abe922
Source1:        modules.sh
abe922
Source2:        createmodule.sh
abe922
Patch0:         environment-modules-3.2.7-bindir.patch
de902a
# Comment out stray module use in modules file when not using versioning
de902a
# https://bugzilla.redhat.com/show_bug.cgi?id=895555
de902a
Patch1:         environment-modules-versioning.patch
de902a
# Fix module clear command
de902a
# https://bugzilla.redhat.com/show_bug.cgi?id=895551
de902a
Patch2:         environment-modules-clear.patch
de902a
# Patch from modules list to add completion to avail command
de902a
Patch3:         environment-modules-avail.patch
7de0d6
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
7de0d6
abe922
BuildRequires:  tcl-devel, tclx-devel, libX11-devel
de902a
BuildRequires:  dejagnu
abe922
BuildRequires:  man
abe922
#For ps in startup script
abe922
Requires:       procps
7de0d6
7de0d6
%description
7de0d6
The Environment Modules package provides for the dynamic modification of
7de0d6
a user's environment via modulefiles.
7de0d6
7de0d6
Each modulefile contains the information needed to configure the shell
7de0d6
for an application. Once the Modules package is initialized, the
7de0d6
environment can be modified on a per-module basis using the module
7de0d6
command which interprets modulefiles. Typically modulefiles instruct
7de0d6
the module command to alter or set shell environment variables such as
7de0d6
PATH, MANPATH, etc. modulefiles may be shared by many users on a system
7de0d6
and users may have their own collection to supplement or replace the
7de0d6
shared modulefiles.
7de0d6
7de0d6
Modules can be loaded and unloaded dynamically and atomically, in an
7de0d6
clean fashion. All popular shells are supported, including bash, ksh,
7de0d6
zsh, sh, csh, tcsh, as well as some scripting languages such as perl.
7de0d6
7de0d6
Modules are useful in managing different versions of applications.
7de0d6
Modules can also be bundled into metamodules that will load an entire
7de0d6
suite of different applications.
7de0d6
abe922
NOTE: You will need to get a new shell after installing this package to
abe922
have access to the module alias.
abe922
7de0d6
7de0d6
%prep
de902a
%setup -q -n modules-%{version}
abe922
%patch0 -p1 -b .bindir
de902a
%patch1 -p1 -b .versioning
de902a
%patch2 -p1 -b .clear
de902a
%patch3 -p1 -b .avail
7de0d6
7de0d6
7de0d6
%build
abe922
%configure --disable-versioning \
abe922
           --prefix=%{_datadir} \
192639
           --exec-prefix=%{_datadir}/Modules \
de902a
           --with-man-path=$(manpath) \
6bc720
           --with-module-path=%{_sysconfdir}/modulefiles
6bc720
#           --with-debug=42 --with-log-facility-debug=stderr
7de0d6
make %{?_smp_mflags}
7de0d6
7de0d6
7de0d6
%install
7de0d6
rm -rf $RPM_BUILD_ROOT
7de0d6
make install DESTDIR=$RPM_BUILD_ROOT
7de0d6
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
abe922
cp -p %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/modules.sh
abe922
cp -p %SOURCE2 $RPM_BUILD_ROOT%{_datadir}/Modules/bin
7de0d6
ln -s %{_datadir}/Modules/init/csh $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/modules.csh
6bc720
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modulefiles
7de0d6
7de0d6
de902a
%check
de902a
make test
de902a
de902a
7de0d6
%clean
7de0d6
rm -rf $RPM_BUILD_ROOT
7de0d6
7de0d6
7de0d6
%files
7de0d6
%defattr(-,root,root,-)
7de0d6
%doc LICENSE.GPL README TODO
6bc720
%{_sysconfdir}/modulefiles
7de0d6
%{_sysconfdir}/profile.d/*
7de0d6
%{_bindir}/modulecmd
7de0d6
%{_datadir}/Modules/
7de0d6
%{_mandir}/man1/module.1.gz
7de0d6
%{_mandir}/man4/modulefile.4.gz
7de0d6
7de0d6
7de0d6
%changelog
de902a
* Fri Aug 16 2013 Orion Poplawski <orion@cora.nwra.com> - 3.2.10-1
de902a
- Update to 3.2.10 from Fedora master (bug #997946)
de902a
abe922
* Thu Jan 7 2010 Orion Poplawski <orion@cora.nwra.com> - 3.2.7b-7
abe922
- Add patch to set a sane default MANPATH
abe922
- Add createmodule.sh utility script for creating modulefiles
abe922
 
abe922
* Mon Nov 30 2009 Orion Poplawski <orion@cora.nwra.com> - 3.2.7b-6
abe922
- Add Requires: propcs (bug #54272)
abe922
abe922
* Mon Oct 26 2009 Orion Poplawski <orion@cora.nwra.com> - 3.2.7b-5
abe922
- Don't assume different shell init scripts exist (bug #530770)
abe922
abe922
* Fri Oct 23 2009 Orion Poplawski <orion@cora.nwra.com> - 3.2.7b-4
abe922
- Don't load bash init script when bash is running as "sh" (bug #529745)
abe922
abe922
* Mon Oct 19 2009 Orion Poplawski <orion@cora.nwra.com> - 3.2.7b-3
abe922
- Support different flavors of "sh" (bug #529493)
abe922
abe922
* Wed Sep 23 2009 Orion Poplawski <orion@cora.nwra.com> - 3.2.7b-2
abe922
- Add patch to fix modulecmd path in init files
abe922
abe922
* Wed Sep 23 2009 Orion Poplawski <orion@cora.nwra.com> - 3.2.7b-1
abe922
- Update to 3.2.7b
abe922
abe922
* Mon Sep 21 2009 Orion Poplawski <orion@cora.nwra.com> - 3.2.7-1
abe922
- Update to 3.2.7, fixes bug #524475
abe922
- Drop versioning patch fixed upstream
abe922
abe922
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.6-8
abe922
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
abe922
abe922
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.6-7
abe922
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
abe922
abe922
* Wed Sep 3 2008 - Orion Poplawski <orion@cora.nwra.com> - 3.2.6-6
abe922
- Change %%patch -> %%patch0
abe922
abe922
* Fri Mar 14 2008 - Orion Poplawski <orion@cora.nwra.com> - 3.2.6-5
abe922
- Add BR libX11-devel so modulecmd can handle X resources
abe922
6bc720
* Wed Mar  5 2008 - Orion Poplawski <orion@cora.nwra.com> - 3.2.6-4
6bc720
- Add patch to fix extraneous version path entry properly
6bc720
- Use --with-module-path to point to /etc/modulefiles for local modules,
6bc720
  this also fixes bug #436041
6bc720
6bc720
* Sat Feb  9 2008 - Orion Poplawski <orion@cora.nwra.com> - 3.2.6-3
6bc720
- Rebuild for gcc 3.4
6bc720
6bc720
* Thu Jan 03 2008 - Alex Lancaster <alexlan at="" fedoraproject.org=""> - 3.2.6-2
6bc720
- Rebuild for new Tcl (8.5).
6bc720
6bc720
* Fri Nov  2 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.2.6-1
6bc720
- Update to 3.2.6
6bc720
709415
* Tue Aug 21 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.2.5-2
709415
- Update license tag to GPLv2
709415
709415
* Fri Feb 16 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.2.5-1
c2dd4d
- Update to 3.2.5
c2dd4d
709415
* Wed Feb 14 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.2.4-2
709415
- Rebuild for Tcl downgrade
709415
e09d1f
* Fri Feb 09 2007 - Orion Poplawski <orion@cora.nwra.com> - 3.2.4-1
e09d1f
- Update to 3.2.4
e09d1f
192639
* Wed Dec 20 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.2.3-3
192639
- Add --with-version-path to set VERSIONPATH (bug 220260)
192639
fb302c
* Tue Aug 28 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.2.3-2
fb302c
- Rebuild for FC6
fb302c
377813
* Fri Jun  2 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.2.3-1
377813
- Update to 3.2.3
377813
955f7d
* Fri May  5 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.2.2-1
955f7d
- Update to 3.2.2
955f7d
abcd1f
* Fri Mar 24 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.2.1-1
abcd1f
- Update to 3.2.1
abcd1f
7de0d6
* Thu Feb  9 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.2.0p1-1
7de0d6
- Update to 3.2.0p1
7de0d6
7de0d6
* Fri Jan 27 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.2.0-2
7de0d6
- Add profile.d links
7de0d6
7de0d6
* Tue Jan 24 2006 - Orion Poplawski <orion@cora.nwra.com> - 3.2.0-1
7de0d6
- Fedora Extras packaging