packages: environment-modules/environment-modules-bindir.patch (NEW), envir...

draenog draenog at pld-linux.org
Sat May 8 23:16:36 CEST 2010


Author: draenog                      Date: Sat May  8 21:16:36 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial version

---- Files affected:
packages/environment-modules:
   environment-modules-bindir.patch (NONE -> 1.1)  (NEW), environment-modules.spec (NONE -> 1.1)  (NEW), modules.sh (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/environment-modules/environment-modules-bindir.patch
diff -u /dev/null packages/environment-modules/environment-modules-bindir.patch:1.1
--- /dev/null	Sat May  8 23:16:36 2010
+++ packages/environment-modules/environment-modules-bindir.patch	Sat May  8 23:16:30 2010
@@ -0,0 +1,11 @@
+--- modules-3.2.7/init/Makefile.in.bindir	2009-09-22 12:13:52.000000000 -0600
++++ modules-3.2.7/init/Makefile.in	2009-09-23 12:19:50.797470155 -0600
+@@ -404,7 +404,7 @@
+ 	sed -e "/@$(if $(subst 0,,$(WANTS_VERSIONING)),NOT,)VERSIONING\@/d; \
+ 	s,@$(if $(subst 0,,$(WANTS_VERSIONING)),,NOT)VERSIONING\@,,g; \
+ 	s, at prefix\@,${prefix},g; \
+-	s, at bindir\@,${exec_prefix}/bin,g; \
++	s, at bindir\@,${bindir},g; \
+ 	s, at VERSION\@, at VERSION@,g; \
+ 	s, at BASEPREFIX\@, at BASEPREFIX@,g;" < $< > $@
+ 

================================================================
Index: packages/environment-modules/environment-modules.spec
diff -u /dev/null packages/environment-modules/environment-modules.spec:1.1
--- /dev/null	Sat May  8 23:16:36 2010
+++ packages/environment-modules/environment-modules.spec	Sat May  8 23:16:30 2010
@@ -0,0 +1,84 @@
+# $Revision$, $Date$
+#
+Summary:	Provides dynamic modification of a user's environment
+Name:		environment-modules
+Version:	3.2.7b
+Release:	0.01
+License:	GPL v2
+Group:		Applications/System
+Source0:	http://downloads.sourceforge.net/modules/modules-%{version}.tar.bz2
+# Source0-md5:	3ebba50a1f79e63aa9e2189e9e6c7952
+Source1:	modules.sh
+Patch0:		%{name}-bindir.patch
+URL:		http://modules.sourceforge.net/
+BuildRequires:	tcl-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The Environment Modules package provides for the dynamic modification
+of a user's environment via modulefiles.
+
+Each modulefile contains the information needed to configure the shell
+for an application. Once the Modules package is initialized, the
+environment can be modified on a per-module basis using the module
+command which interprets modulefiles. Typically modulefiles instruct
+the module command to alter or set shell environment variables such as
+PATH, MANPATH, etc. modulefiles may be shared by many users on a
+system and users may have their own collection to supplement or
+replace the shared modulefiles.
+
+Modules can be loaded and unloaded dynamically and atomically, in an
+clean fashion. All popular shells are supported, including bash, ksh,
+zsh, sh, csh, tcsh, as well as some scripting languages such as perl.
+
+Modules are useful in managing different versions of applications.
+Modules can also be bundled into metamodules that will load an entire
+suite of different applications.
+
+
+%prep
+%setup -q -n modules-3.2.7
+%patch0 -p1
+
+%build
+%configure \
+	--disable-versioning \
+	--prefix=%{_datadir} \
+	--exec-prefix=%{_datadir}/Modules \
+	--with-module-path=%{_sysconfdir}/modulefiles
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+install -D %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/shrc.d/modules.sh
+ln -s %{_datadir}/Modules/init/csh $RPM_BUILD_ROOT%{_sysconfdir}/shrc.d/modules.csh
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/modulefiles
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/modulecmd
+%dir %{_sysconfdir}/modulefiles
+%{_sysconfdir}/shrc.d/modules.*
+%{_datadir}/Modules
+%{_mandir}/man1/module.1.*
+%{_mandir}/man4/modulefile.4.*
+
+%doc ChangeLog INSTALL NEWS README TODO
+
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2010/05/08 21:16:30  draenog
+- initial version
+

================================================================
Index: packages/environment-modules/modules.sh
diff -u /dev/null packages/environment-modules/modules.sh:1.1
--- /dev/null	Sat May  8 23:16:36 2010
+++ packages/environment-modules/modules.sh	Sat May  8 23:16:30 2010
@@ -0,0 +1,7 @@
+shell=`/bin/basename \`/bin/ps -p $$ -ocomm=\``
+if [ -f /usr/share/Modules/init/$shell ]
+then
+  . /usr/share/Modules/init/$shell
+else
+  . /usr/share/Modules/init/sh
+fi
================================================================


More information about the pld-cvs-commit mailing list