Compare commits

1 Commits
1.1 ... main

2 changed files with 24 additions and 5 deletions

View File

@@ -1,3 +1,20 @@
-------------------------------------------------------------------
Mon Feb 3 16:19:09 UTC 2025 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Make use of %configure macro to build with distro flags
-------------------------------------------------------------------
Tue Aug 27 10:03:05 UTC 2024 - pgajdos@suse.com
- remove dependency on /usr/bin/python3 using
%python3_fix_shebang macro, [bsc#1212476]
-------------------------------------------------------------------
Tue May 21 10:40:16 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %autosetup macro: allows us to eliminate usage of deprecated
%patchN syntax.
-------------------------------------------------------------------
Sat Jul 31 16:52:07 UTC 2021 - Philipp Wagner <mail@philipp-wagner.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package Modules
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -32,6 +32,7 @@ Requires: python3
Requires: tcl
Source: https://download.sourceforge.net/project/modules/Modules/modules-%{version}/modules-%{version}.tar.gz
Patch1: Remove-empty-unused-static-function.patch
BuildRequires: python-rpm-macros
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: environment-modules
%if 0%{?suse_version}
@@ -93,15 +94,15 @@ applications.
%define vimdatadir %{_datadir}/vim/site
%prep
%setup -q -n modules-%{version}
%patch1 -p1
%autosetup -p1 -n modules-%{version}
# 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
%build
./configure \
%configure \
--initdir="%{_datadir}/%name/init" \
--libexecdir="%{_prefix}/%_lib/%{name}/" \
--prefix="%_prefix" \
@@ -117,7 +118,7 @@ sed -i 's@/usr/bin/env bash@/bin/bash@' script/envml
--libdir=%{_libdir}/%{name} \
--enable-compat-version \
--with-python=/usr/bin/python3
make %{?_smp_mflags}
%make_build
%install
install -d %{buildroot}/usr/share/modules
@@ -126,6 +127,7 @@ make DESTDIR=%{buildroot} install
install -d %{buildroot}/usr/bin
mv %{buildroot}/usr/share/doc doc_dir
%fdupes -s %{buildroot}%{_datadir}
%python3_fix_shebang
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