2007-01-15 23:49:24 +01:00
|
|
|
#
|
2011-11-17 11:04:50 +01:00
|
|
|
# spec file for package Modules
|
2007-01-15 23:49:24 +01:00
|
|
|
#
|
2014-08-26 13:08:49 +02:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-15 23:49:24 +01:00
|
|
|
#
|
2009-06-18 00:06:45 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2007-01-15 23:49:24 +01:00
|
|
|
#
|
|
|
|
|
2012-09-04 10:01:11 +02:00
|
|
|
|
2009-06-18 00:06:45 +02:00
|
|
|
Name: Modules
|
2011-12-01 13:45:20 +01:00
|
|
|
BuildRequires: automake
|
2011-11-17 11:04:50 +01:00
|
|
|
BuildRequires: tcl-devel
|
|
|
|
# xorg-x11-devel
|
2009-06-18 00:06:45 +02:00
|
|
|
Url: http://modules.sourceforge.net/
|
2012-12-21 10:01:30 +01:00
|
|
|
Version: 3.2.10
|
2011-12-01 13:45:20 +01:00
|
|
|
Release: 0
|
2009-06-18 00:06:45 +02:00
|
|
|
Summary: Environment Modules
|
2013-02-04 10:38:16 +01:00
|
|
|
License: BSD-3-Clause and GPL-2.0+ and LGPL-2.1+
|
2009-06-18 00:06:45 +02:00
|
|
|
Group: System/Management
|
2012-09-04 10:01:11 +02:00
|
|
|
Requires: tcl
|
2012-12-21 10:01:30 +01:00
|
|
|
Source: modules-%{version}.tar.bz2
|
2012-09-04 10:01:11 +02:00
|
|
|
# PATCH-FIX-OPENSUSE share.patch
|
|
|
|
Patch0: share.patch
|
|
|
|
# PATCH-FIX-UPSTREAM return.patch
|
|
|
|
Patch1: return.patch
|
2009-06-18 00:06:45 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Provides: environment-modules
|
2012-12-21 10:01:30 +01:00
|
|
|
Obsoletes: environment-modules < %{version}
|
2007-01-15 23:49:24 +01:00
|
|
|
|
|
|
|
%description
|
2009-06-18 00:06:45 +02:00
|
|
|
The Modules package provides for dynamic modification of a user's
|
|
|
|
environment with module files. Each module file contains the
|
|
|
|
information needed to configure the shell for an application. Once the
|
2007-01-15 23:49:24 +01:00
|
|
|
package is initialized, the environment can be modified dynamically on
|
2009-06-18 00:06:45 +02:00
|
|
|
a per-module basis using the module command that interprets module
|
|
|
|
files. Typically, module files instruct the module command to alter or
|
|
|
|
set shell environment variables, such as PATH or MANPATH. Module files
|
|
|
|
may be shared by many users on a system and users may have their own
|
|
|
|
collection to supplement or replace the shared module files. The
|
|
|
|
modules environment is common on SGI/Crays and many workstation farms.
|
2007-01-15 23:49:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
John L. Furlan <jlf@behere.com>
|
|
|
|
Peter W. Osel <pwo@Osel.DE>
|
|
|
|
Jens Hamisch <Jens.Hamisch@Strawberry.COM>
|
|
|
|
R.K. Owen <rk@owen.sj.ca.us>
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n modules-%{version}
|
2012-09-04 10:01:11 +02:00
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
2007-01-15 23:49:24 +01:00
|
|
|
|
|
|
|
%build
|
2014-08-26 13:08:49 +02:00
|
|
|
# Remove overzealous use of "dnl" (+++), which caused
|
|
|
|
# a broken "configure" (---) being generated.
|
|
|
|
#@@ -3004,7 +3004,8 @@ to "yes", and re-run configure.
|
|
|
|
# END
|
|
|
|
# as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
|
|
|
|
# fi
|
|
|
|
#-fiac_config_headers="$ac_config_headers config.h"
|
|
|
|
#+fi
|
|
|
|
#+ac_config_headers="$ac_config_headers config.h"
|
|
|
|
#
|
|
|
|
# # Check whether --enable-versioning was given.
|
|
|
|
# if test "${enable_versioning+set}" = set; then :
|
|
|
|
#
|
|
|
|
perl -i -pe 's{dnl\n}{\n}gs' configure.ac
|
|
|
|
|
2011-11-17 11:04:50 +01:00
|
|
|
aclocal --force -I config
|
|
|
|
autoreconf --force --install
|
2013-08-02 08:28:05 +02:00
|
|
|
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DUSE_INTERP_RESULT -DUSE_INTERP_ERRORLINE" \
|
|
|
|
./configure \
|
2014-08-26 13:08:49 +02:00
|
|
|
--prefix="%_prefix" \
|
|
|
|
--with-version-path="%_datadir/modules" \
|
|
|
|
--with-module-path="%_datadir/modules/modulefiles" \
|
2007-01-15 23:49:24 +01:00
|
|
|
--mandir=%{_mandir} \
|
2014-08-26 13:08:49 +02:00
|
|
|
--with-etc-path="%_sysconfdir" \
|
|
|
|
--with-skel-path="%_sysconfdir/skel" \
|
2011-11-17 11:04:50 +01:00
|
|
|
--with-tcl=%{_libdir} \
|
|
|
|
--without-x
|
2007-01-15 23:49:24 +01:00
|
|
|
make
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -d $RPM_BUILD_ROOT/usr/share/modules
|
|
|
|
install -d $RPM_BUILD_ROOT/etc/profile.d
|
|
|
|
install -m 644 etc/global/profile.modules $RPM_BUILD_ROOT/etc/profile.d/modules.sh
|
|
|
|
install -m 644 etc/global/csh.modules $RPM_BUILD_ROOT/etc/profile.d/modules.csh
|
2012-09-04 10:01:11 +02:00
|
|
|
sed -i "s;/default/;/%{version}/;g" $RPM_BUILD_ROOT/etc/profile.d/modules.sh
|
|
|
|
sed -i "s;/default/;/%{version}/;g" $RPM_BUILD_ROOT/etc/profile.d/modules.csh
|
|
|
|
|
2007-01-15 23:49:24 +01:00
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
2011-11-17 11:04:50 +01:00
|
|
|
install -d $RPM_BUILD_ROOT/usr/bin
|
|
|
|
pushd $RPM_BUILD_ROOT/usr/bin
|
|
|
|
ln -s ../share/Modules/%{version}/bin/add.modules .
|
|
|
|
ln -s ../share/Modules/%{version}/bin/mkroot .
|
|
|
|
ln -s ../share/Modules/%{version}/bin/modulecmd .
|
|
|
|
popd
|
2007-01-15 23:49:24 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2011-11-17 11:04:50 +01:00
|
|
|
%doc ChangeLog LICENSE.GPL NEWS README TODO
|
|
|
|
%dir %{_prefix}/share/Modules
|
|
|
|
%{_prefix}/share/Modules/*
|
2007-01-15 23:49:24 +01:00
|
|
|
%dir /usr/share/modules
|
|
|
|
/usr/share/modules/*
|
2011-11-17 11:04:50 +01:00
|
|
|
%{_bindir}/*
|
2012-09-04 10:01:11 +02:00
|
|
|
%config /etc/profile.d/modules.*
|
2007-01-15 23:49:24 +01:00
|
|
|
%doc %{_mandir}/man4/*
|
|
|
|
%doc %{_mandir}/man1/*
|
|
|
|
|
2009-06-18 00:06:45 +02:00
|
|
|
%changelog
|