spec files added
This commit is contained in:
+157
@@ -0,0 +1,157 @@
|
||||
#
|
||||
# File hierarchy:
|
||||
#
|
||||
# /etc/Pmodules
|
||||
# /etc/profile.d
|
||||
# /usr/bin/
|
||||
# /usr/share/Pmodules/bin
|
||||
# /usr/share/Pmodules/libexec
|
||||
# /usr/share/Pmodules/lib
|
||||
# /usr/share/Pmodules/init
|
||||
# /usr/share/doc/Pmodules
|
||||
# /usr/share/licenses/Pmodules
|
||||
|
||||
Name: Pmodules
|
||||
Version: 2.0.1
|
||||
Release: 1%{?dist}
|
||||
|
||||
Summary: PSI module system
|
||||
Group: System Environment/Daemons
|
||||
License: GPL
|
||||
URL: https://pmodules.gitpages.psi.ch
|
||||
Packager: Achim Gsell <achim.gsell@psi.ch>
|
||||
Vendor: Paul Scherrer Institut
|
||||
|
||||
%define modules_version 3.2.10.2
|
||||
Requires: lua
|
||||
Requires: luarocks
|
||||
Requires: lua-posix
|
||||
Requires: tcl
|
||||
Requires: tcllib
|
||||
Requires: Lmod
|
||||
Requires: p7zip
|
||||
Requires: patchelf
|
||||
Requires: Pmodules_bash
|
||||
Requires: Pmodules_modules = 3.2.10.2
|
||||
Provides: Pmodules
|
||||
conflicts: environment_modules
|
||||
|
||||
Source0: https://gitlab.psi.ch/Pmodules/Pmodules/-/archive/%{version}/Pmodules-%{version}.tar.gz
|
||||
|
||||
%description
|
||||
Pmodules
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# d e f i n i t i o n s
|
||||
#
|
||||
%define debug_package %nil
|
||||
%define _prefix /usr
|
||||
|
||||
%define prefix %{buildroot}/%{_prefix}
|
||||
%define builddir %{_builddir}/%{name}-%{version}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# p r e p
|
||||
%prep
|
||||
%setup -b 0 -q -n Pmodules-%{version}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# b u i l d
|
||||
%build
|
||||
sed_cmd=''
|
||||
sed_cmd+="s:@PMODULES_VERSION@:%{version}:g;"
|
||||
sed_cmd+="s:@MODULES_VERSION@:%{modules_version}:g;"
|
||||
sed_cmd+="s:@TCL_VERSION@:8.6:g;"
|
||||
sed_cmd+="s:@PMODULES_TMPDIR@:/var/tmp/${USER}:g;"
|
||||
sed_cmd+="s:@PMODULES_DISTFILESDIR@:/var/cache/Pmodules/distfiles:g;"
|
||||
sed_cmd+="s:@INSTALL_ROOT@:/opt/psi:g;"
|
||||
|
||||
libexec_dir='/usr/share/Pmodules/libexec'
|
||||
sed_cmd+="s:@BASH@:${libexec_dir}/bash:g;"
|
||||
sed_cmd+="s:@MODULECMD@:${libexec_dir}/modulecmd.bash:g;"
|
||||
|
||||
sed "${sed_cmd}" "%{builddir}/Pmodules/modulecmd.in" > "%{builddir}/Pmodules/modulecmd"
|
||||
sed "${sed_cmd}" "%{builddir}/Pmodules/modulecmd.bash.in" > "%{builddir}/Pmodules/modulecmd.bash"
|
||||
sed "${sed_cmd}" "%{builddir}/Pmodules/libpmodules.bash.in" > "%{builddir}/Pmodules/libpmodules.bash"
|
||||
sed "${sed_cmd}" "%{builddir}/Pmodules/modbuild.in" > "%{builddir}/Pmodules/modbuild"
|
||||
sed "${sed_cmd}" "%{builddir}/config/Pmodules.yaml.in" > "%{builddir}/config/Pmodules.yaml"
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# i n s t a l l
|
||||
%install
|
||||
mkdir -p %{prefix}/share/Pmodules/bin
|
||||
mkdir -p %{prefix}/share/Pmodules/config
|
||||
mkdir -p %{prefix}/share/Pmodules/libexec
|
||||
mkdir -p %{prefix}/share/Pmodules/lib/Pmodules
|
||||
mkdir -p %{prefix}/share/Pmodules/init
|
||||
mkdir -p %{prefix}/share/doc/Pmodules
|
||||
mkdir -p %{prefix}/share/licenses/Pmodules
|
||||
|
||||
install -m 0644 %{builddir}/LICENSE %{prefix}/share/licenses/Pmodules
|
||||
install -m 0644 %{builddir}/CHANGELOG.md %{prefix}/share/doc/Pmodules
|
||||
install -m 0644 %{builddir}/config/Pmodules.yaml %{prefix}/share/Pmodules/config
|
||||
install -m 0755 %{builddir}/Pmodules/modulecmd %{prefix}/share/Pmodules/bin
|
||||
install -m 0755 %{builddir}/Pmodules/modbuild %{prefix}/share/Pmodules/bin
|
||||
install -m 0644 %{builddir}/Pmodules/libpmodules.bash %{prefix}/share/Pmodules/lib
|
||||
install -m 0644 %{builddir}/Pmodules/libpbuild.bash %{prefix}/share/Pmodules/lib
|
||||
install -m 0644 %{builddir}/Pmodules/libstd.bash %{prefix}/share/Pmodules/lib
|
||||
install -m 0644 %{builddir}/Pmodules/libmodules.tcl %{prefix}/share/Pmodules/lib/Pmodules
|
||||
install -m 0644 %{builddir}/tclIndex %{prefix}/share/Pmodules/lib/Pmodules
|
||||
install -m 0755 %{builddir}/Pmodules/modulecmd.bash %{prefix}/share/Pmodules/libexec
|
||||
install -m 0755 %{builddir}/Pmodules/yq.x86_64_Linux %{prefix}/share/Pmodules/libexec/yq
|
||||
install -m 0644 %{builddir}/Pmodules/bash %{prefix}/share/Pmodules/init
|
||||
install -m 0644 %{builddir}/Pmodules/bash_completion %{prefix}/share/Pmodules/init
|
||||
install -m 0644 %{builddir}/Pmodules/csh %{prefix}/share/Pmodules/init
|
||||
install -m 0644 %{builddir}/Pmodules/zsh %{prefix}/share/Pmodules/init
|
||||
ln -sf /usr/bin/7za %{prefix}/share/Pmodules/libexec/sevenz
|
||||
|
||||
echo -e "#!/bin/sh\n\n" > %{prefix}/share/Pmodules/init/profile
|
||||
echo -e "source %{_prefix}/share/Pmodules/init/bash\n" > %{prefix}/share/Pmodules/init/profile
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# f i l e s
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir %_prefix/share/Pmodules
|
||||
%dir %_prefix/share/Pmodules/config
|
||||
%config(noreplace) %_prefix/share/Pmodules/config/Pmodules.yaml
|
||||
%_prefix/share/Pmodules/bin
|
||||
%_prefix/share/Pmodules/lib
|
||||
%_prefix/share/Pmodules/libexec
|
||||
%_prefix/share/Pmodules/init
|
||||
%doc CHANGELOG.md
|
||||
%{_prefix}/share/licenses/Pmodules
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# c l e a n u p
|
||||
%clean
|
||||
%__rm -rf %buildroot
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# p o s t - i n s t a l l
|
||||
%post
|
||||
# Cleanup from pre-alternatives
|
||||
[ ! -L /etc/profile.d/modules.sh ] && rm -f /etc/profile.d/modules.sh
|
||||
/usr/sbin/update-alternatives --install /etc/profile.d/modules.sh modules.sh \
|
||||
/usr/share/Pmodules/init/profile 30
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# t r i g g e r i n
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# p o s t - u n i n s t a l l
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
/usr/sbin/update-alternatives --remove modules.sh /usr/share/Pmodules/init/profile
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# p r e - u n i n s t a l l
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# c h a n g e l o g
|
||||
%changelog
|
||||
* Wed Aug 6 2025 Achim Gsell <achim.gsell@psi.ch - 5.2.37
|
||||
initial version
|
||||
|
||||
# vim: ts=8 ft=spec
|
||||
@@ -0,0 +1,55 @@
|
||||
#% define beta_tag rc1
|
||||
|
||||
Version: 5.2.37
|
||||
Name: Pmodules_bash
|
||||
Summary: The GNU Bourne Again shell
|
||||
Release: 1%{?dist}
|
||||
Group: System Environment/Shells
|
||||
License: GPLv3+
|
||||
Url: http://www.gnu.org/software/bash
|
||||
Source0: https://ftp.gnu.org/gnu/bash/bash-%{version}.tar.gz
|
||||
|
||||
BuildRequires: texinfo
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: autoconf, gettext
|
||||
|
||||
%define _prefix /usr/share/Pmodules/libexec
|
||||
%define _bindir %{_prefix}
|
||||
|
||||
%description
|
||||
The GNU Bourne Again shell (Bash) is a shell or command language
|
||||
interpreter that is compatible with the Bourne shell (sh). Bash
|
||||
incorporates useful features from the Korn shell (ksh) and the C shell
|
||||
(csh). Most sh scripts can be run by bash without modification.
|
||||
|
||||
%prep
|
||||
%setup -q -n bash-%{version}
|
||||
|
||||
%build
|
||||
#autoconf
|
||||
%configure --with-afs loadablesdir=%{_prefix}/builtins
|
||||
make
|
||||
|
||||
%check
|
||||
#make check
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
rm -f $RPM_BUILD_ROOT%{_bindir}/bashbug
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/include
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/lib64
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/share/info
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/share/locale
|
||||
rm -rf $RPM_BUILD_ROOT%{_prefix}/share/man
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_prefix}
|
||||
|
||||
%changelog
|
||||
* Wed Aug 6 2025 Achim Gsell <achim.gsell@psi.ch - 5.2.37
|
||||
initial version
|
||||
@@ -0,0 +1,47 @@
|
||||
#% define beta_tag rc1
|
||||
|
||||
Version: 3.2.10.2
|
||||
Name: Pmodules_modules
|
||||
Summary: Environment Modules
|
||||
Release: 1%{?dist}
|
||||
Group: System Environment
|
||||
License: GPLv2
|
||||
Url: https://modules.readthedocs.io/h
|
||||
Source0: https://amas.web.psi.ch/Downloads/modules/modules-%{version}.tar.bz2
|
||||
|
||||
BuildRequires: autoconf, gcc, tcl-devel
|
||||
|
||||
%define _prefix /usr/share/Pmodules/libexec
|
||||
%define _bindir %{_prefix}
|
||||
%global debug_package %{nil}
|
||||
|
||||
%description
|
||||
Environment Modules
|
||||
|
||||
%prep
|
||||
%setup -q -n Modules-%{version}
|
||||
|
||||
%build
|
||||
%configure \
|
||||
--exec-prefix="%{_prefix}" \
|
||||
--with-module-path="/opt/psi/Tools/modulefiles" \
|
||||
--without-x \
|
||||
--disable-versioning
|
||||
make CFLAGS='-DUSE_INTERP_ERRORLINE=1 -fPIC'
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
mkdir -p %{buildroot}/%{_prefix}
|
||||
install -m 0755 %{_builddir}/Modules-%{version}/modulecmd %{buildroot}/%{_prefix}/modulecmd.bin
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_prefix}/*
|
||||
|
||||
%changelog
|
||||
* Wed Aug 6 2025 Achim Gsell <achim.gsell@psi.ch - 5.2.37
|
||||
initial version
|
||||
Reference in New Issue
Block a user