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
|
|
|
#
|
2018-04-17 08:18:16 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX 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
|
2018-04-17 08:18:16 +02:00
|
|
|
BuildRequires: less
|
|
|
|
BuildRequires: procps
|
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/
|
2018-04-17 08:18:16 +02:00
|
|
|
Version: 4.1.2
|
2011-12-01 13:45:20 +01:00
|
|
|
Release: 0
|
2018-04-17 08:18:16 +02:00
|
|
|
Summary: Change environment at runtime
|
|
|
|
License: BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later
|
2009-06-18 00:06:45 +02:00
|
|
|
Group: System/Management
|
2012-09-04 10:01:11 +02:00
|
|
|
Requires: tcl
|
2018-04-17 08:18:16 +02:00
|
|
|
Source: https://download.sourceforge.net/project/modules/Modules/modules-%{version}/modules-%{version}.tar.gz
|
|
|
|
# PATCH-FIX-UPSTREAM modules-4.1.2-return.patch
|
|
|
|
Patch1: modules-4.1.2-return.patch
|
|
|
|
# PATCH-FIX-UPSTREAM modules-4.1.2-fix-bashisms.patch
|
|
|
|
Patch2: modules-4.1.2-fix-bashisms.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}
|
2018-04-17 08:18:16 +02:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
Recommends: %{name}-doc
|
|
|
|
%endif
|
|
|
|
|
2018-04-17 13:40:51 +02:00
|
|
|
%if 0%{?rhel_version} || 0%{?fedora_version}
|
2018-04-17 08:18:16 +02:00
|
|
|
BuildRequires: perl(Digest::MD5)
|
2018-04-17 13:40:51 +02:00
|
|
|
BuildRequires: perl(Exporter)
|
2018-04-17 08:18:16 +02:00
|
|
|
%endif
|
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
|
|
|
|
2018-04-17 08:18:16 +02:00
|
|
|
%package doc
|
|
|
|
Summary: Documentation for Change environment at runtime
|
2018-04-17 13:40:51 +02:00
|
|
|
Group: Documentation/Other
|
|
|
|
BuildArch: noarch
|
2007-01-15 23:49:24 +01:00
|
|
|
|
2018-04-17 08:18:16 +02:00
|
|
|
%description doc
|
|
|
|
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
|
|
|
|
package is initialized, the environment can be modified dynamically on
|
|
|
|
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
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n modules-%{version}
|
2018-04-17 08:18:16 +02:00
|
|
|
%patch1
|
|
|
|
%patch2
|
|
|
|
sed -i 's@/usr/bin/env bash@/bin/bash@' contrib/envml
|
2007-01-15 23:49:24 +01:00
|
|
|
|
|
|
|
%build
|
2013-08-02 08:28:05 +02:00
|
|
|
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DUSE_INTERP_RESULT -DUSE_INTERP_ERRORLINE" \
|
|
|
|
./configure \
|
2018-04-17 08:18:16 +02:00
|
|
|
--initdir="%{_datadir}/%name/init" \
|
|
|
|
--libexecdir="%{_prefix}/%_lib/%{name}/" \
|
2014-08-26 13:08:49 +02:00
|
|
|
--prefix="%_prefix" \
|
2018-04-17 08:18:16 +02:00
|
|
|
--with-version-path="%_datadir/%{name}" \
|
2018-04-17 13:40:51 +02:00
|
|
|
--modulefilesdir="%{_datadir}/modules" \
|
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
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
2011-11-17 11:04:50 +01:00
|
|
|
install -d $RPM_BUILD_ROOT/usr/bin
|
2018-04-17 08:18:16 +02:00
|
|
|
mv $RPM_BUILD_ROOT/usr/share/doc doc_dir
|
2007-01-15 23:49:24 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2018-04-17 08:18:16 +02:00
|
|
|
%doc doc_dir/README
|
|
|
|
%dir %{_libdir}/%{name}
|
|
|
|
%dir %{_datadir}/%{name}
|
2018-04-17 13:40:51 +02:00
|
|
|
%dir %{_datadir}/modules
|
2018-04-17 08:18:16 +02:00
|
|
|
%{_bindir}/add.modules
|
|
|
|
%{_bindir}/envml
|
|
|
|
%{_bindir}/mkroot
|
|
|
|
%{_bindir}/modulecmd
|
|
|
|
%{_datadir}/%{name}/init
|
|
|
|
%{_libdir}/%{name}/modulecmd-compat
|
|
|
|
%{_libdir}/%{name}/modulecmd.tcl
|
2018-04-17 13:40:51 +02:00
|
|
|
%{_datadir}/modules/*
|
2018-04-17 08:18:16 +02:00
|
|
|
%{_mandir}/man1/module-compat.1*
|
|
|
|
%{_mandir}/man1/module.1*
|
|
|
|
%{_mandir}/man4/modulefile-compat.4*
|
|
|
|
%{_mandir}/man4/modulefile.4*
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc doc_dir/COPYING.GPLv2 doc_dir/ChangeLog doc_dir/ChangeLog-compat doc_dir/INSTALL.txt doc_dir/example.txt
|
|
|
|
%doc doc_dir/MIGRATING.txt doc_dir/NEWS-compat doc_dir/NEWS.txt doc_dir/README doc_dir/diff_v3_v4.txt
|
2007-01-15 23:49:24 +01:00
|
|
|
|
2009-06-18 00:06:45 +02:00
|
|
|
%changelog
|