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
|
|
|
#
|
2021-02-25 21:40:49 +01:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
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.
|
|
|
|
|
2020-05-20 10:37:38 +02:00
|
|
|
# Please submit bugfixes or comments via https://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
|
2021-03-29 14:02:18 +02:00
|
|
|
BuildRequires: fdupes
|
2018-04-17 08:18:16 +02:00
|
|
|
BuildRequires: less
|
|
|
|
BuildRequires: procps
|
2011-11-17 11:04:50 +01:00
|
|
|
BuildRequires: tcl-devel
|
2020-05-20 10:37:38 +02:00
|
|
|
URL: http://modules.sourceforge.net/
|
2021-02-25 21:40:49 +01:00
|
|
|
Version: 4.7.0
|
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
|
2021-03-29 14:02:18 +02:00
|
|
|
Requires: python3
|
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
|
2020-05-20 10:37:38 +02:00
|
|
|
Patch1: Remove-empty-unused-static-function.patch
|
2009-06-18 00:06:45 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
Provides: environment-modules
|
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
|
2021-02-25 21:40:49 +01:00
|
|
|
The Modules package is a tool that simplify shell initialization and lets
|
|
|
|
users easily modify their environment during the session with 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, fish, as well as some scripting languages such as tcl, perl, python,
|
|
|
|
ruby, cmake and r.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2018-04-17 08:18:16 +02:00
|
|
|
%package doc
|
2021-02-25 21:40:49 +01:00
|
|
|
Summary: Documentation for Environment Modules
|
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
|
2021-02-25 21:40:49 +01:00
|
|
|
The Modules package is a tool that simplify shell initialization and lets
|
|
|
|
users easily modify their environment during the session with 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, fish, as well as some scripting languages such as tcl, perl, python,
|
|
|
|
ruby, cmake and r.
|
|
|
|
|
|
|
|
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.
|
2007-01-15 23:49:24 +01:00
|
|
|
|
2020-05-20 10:37:38 +02:00
|
|
|
%define vimdatadir %{_datadir}/vim/site
|
|
|
|
|
2007-01-15 23:49:24 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -n modules-%{version}
|
2020-05-20 10:37:38 +02:00
|
|
|
%patch1 -p1
|
|
|
|
# This is debatable:
|
|
|
|
# if the replace 'bash' consecutive calls to 'modules' would still
|
|
|
|
# run with the original bash. Maybe not intended.
|
|
|
|
sed -i 's@/usr/bin/env bash@/bin/bash@' script/envml
|
2007-01-15 23:49:24 +01:00
|
|
|
|
|
|
|
%build
|
2013-08-02 08:28:05 +02:00
|
|
|
./configure \
|
2021-02-25 21:40:49 +01:00
|
|
|
--initdir="%{_datadir}/%name/init" \
|
|
|
|
--libexecdir="%{_prefix}/%_lib/%{name}/" \
|
|
|
|
--prefix="%_prefix" \
|
|
|
|
--with-version-path="%_datadir/%{name}" \
|
|
|
|
--modulefilesdir="%{_datadir}/modules" \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--with-etc-path="%_sysconfdir" \
|
|
|
|
--with-skel-path="%_sysconfdir/skel" \
|
|
|
|
--with-tcl=%{_libdir} \
|
|
|
|
%{?!vimdatadir: --disable-vim-addons} \
|
|
|
|
%{?vimdatadir: --vimdatadir=%{vimdatadir}} \
|
|
|
|
--etcdir=%{_sysconfdir}/%{name} \
|
|
|
|
--libdir=%{_libdir}/%{name} \
|
2021-03-29 14:02:18 +02:00
|
|
|
--enable-compat-version \
|
|
|
|
--with-python=/usr/bin/python3
|
2020-05-20 10:37:38 +02:00
|
|
|
make %{?_smp_mflags}
|
2007-01-15 23:49:24 +01:00
|
|
|
|
|
|
|
%install
|
2020-05-20 10:37:38 +02:00
|
|
|
install -d %{buildroot}/usr/share/modules
|
|
|
|
install -d %{buildroot}/etc/profile.d
|
|
|
|
make DESTDIR=%{buildroot} install
|
|
|
|
install -d %{buildroot}/usr/bin
|
|
|
|
mv %{buildroot}/usr/share/doc doc_dir
|
2021-03-29 14:02:18 +02:00
|
|
|
%fdupes -s %{buildroot}%{_datadir}
|
2020-05-20 10:37:38 +02:00
|
|
|
|
2021-02-25 21:40:49 +01:00
|
|
|
ln -sf %{_datadir}/Modules/init/profile.sh %{buildroot}%{_sysconfdir}/profile.d/modules.sh
|
|
|
|
ln -sf %{_datadir}/Modules/init/profile.csh %{buildroot}%{_sysconfdir}/profile.d/modules.csh
|
2020-05-20 10:37:38 +02:00
|
|
|
|
2021-02-25 21:40:49 +01:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/fish/{vendor_completions.d,vendor_functions.d}
|
|
|
|
ln -sf %{_datadir}/Modules/init/fish_completion %{buildroot}%{_datadir}/fish/vendor_completions.d/module.fish
|
|
|
|
ln -sf %{_datadir}/Modules/init/fish %{buildroot}%{_datadir}/fish/vendor_functions.d/module.fish
|
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
|
2020-05-20 10:37:38 +02:00
|
|
|
%config %{_sysconfdir}/%{name}
|
2018-04-17 08:18:16 +02:00
|
|
|
%{_bindir}/add.modules
|
|
|
|
%{_bindir}/envml
|
|
|
|
%{_bindir}/mkroot
|
|
|
|
%{_bindir}/modulecmd
|
2020-05-20 10:37:38 +02:00
|
|
|
%{_bindir}/createmodule.py
|
2018-04-17 08:18:16 +02:00
|
|
|
%{_datadir}/%{name}/init
|
2020-05-20 10:37:38 +02:00
|
|
|
%{?vimdatadir:%dir %{dirname:%{?vimdatadir}}}
|
|
|
|
%{?vimdatadir}
|
2018-04-17 08:18:16 +02:00
|
|
|
%{_libdir}/%{name}/modulecmd-compat
|
|
|
|
%{_libdir}/%{name}/modulecmd.tcl
|
2020-05-20 10:37:38 +02:00
|
|
|
%{_libdir}/%{name}/libtclenvmodules.so
|
2018-04-17 13:40:51 +02:00
|
|
|
%{_datadir}/modules/*
|
2018-04-17 08:18:16 +02:00
|
|
|
%{_mandir}/man1/module-compat.1*
|
2020-05-20 10:37:38 +02:00
|
|
|
%{_mandir}/man1/ml.1*
|
2018-04-17 08:18:16 +02:00
|
|
|
%{_mandir}/man1/module.1*
|
|
|
|
%{_mandir}/man4/modulefile-compat.4*
|
|
|
|
%{_mandir}/man4/modulefile.4*
|
2021-02-25 21:40:49 +01:00
|
|
|
%{_sysconfdir}/profile.d/modules.sh
|
|
|
|
%{_sysconfdir}/profile.d/modules.csh
|
|
|
|
%dir %{_datadir}/fish/
|
|
|
|
%dir %{_datadir}/fish/vendor_completions.d/
|
|
|
|
%{_datadir}/fish/vendor_completions.d/module.fish
|
|
|
|
%dir %{_datadir}/fish/vendor_functions.d/
|
|
|
|
%{_datadir}/fish/vendor_functions.d/module.fish
|
2018-04-17 08:18:16 +02:00
|
|
|
|
|
|
|
%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
|