- Update to gcc v.7 for SLES-12 builds.
- Set the 'granularity' for selection to the granularity of GNU toolchain versions we distinguish: For major versions until 4, this is 2 versions, for anything above it is just the major version. - On TW/Factory add explicit dependency to the compiler major version package. This is to make sure package gets rebuilt when this versions changes. OBS-URL: https://build.opensuse.org/package/show/science:HPC/gnu-compilers-hpc?expand=0&rev=12
This commit is contained in:
parent
67b1447856
commit
68d32df380
@ -1,9 +1,16 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 29 21:22:16 UTC 2018 - eich@suse.com
|
Tue Jan 30 10:11:45 UTC 2018 - eich@suse.com
|
||||||
|
|
||||||
- Create separate compiler version dependent packages
|
- Update to gcc v.7 for SLES-12 builds.
|
||||||
to make sure the correct compiler version is installed.
|
- Set the 'granularity' for selection to the
|
||||||
- Update to gcc version 7 for SLE-12 HPC.
|
granularity of GNU toolchain versions we
|
||||||
|
distinguish: For major versions until 4,
|
||||||
|
this is 2 versions, for anything above it
|
||||||
|
is just the major version.
|
||||||
|
- On TW/Factory add explicit dependency to the
|
||||||
|
compiler major version package. This is to make
|
||||||
|
sure package gets rebuilt when this versions
|
||||||
|
changes.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 10 20:17:48 UTC 2017 - eich@suse.com
|
Fri Nov 10 20:17:48 UTC 2017 - eich@suse.com
|
||||||
|
@ -41,10 +41,14 @@ ExclusiveArch: do_not_build
|
|||||||
%global hpc_gnu_full_version %( gcc%{hpc_gnu_bin_version} --version |\
|
%global hpc_gnu_full_version %( gcc%{hpc_gnu_bin_version} --version |\
|
||||||
head -1 |\
|
head -1 |\
|
||||||
sed -e "s#.* \\([0-9]\\+\\.[0-9.]\\+\\)\\(\$\\| .*\\)#\\1#" )
|
sed -e "s#.* \\([0-9]\\+\\.[0-9.]\\+\\)\\(\$\\| .*\\)#\\1#" )
|
||||||
%global _hpc_gnu_full_version %(echo %hpc_gnu_full_version | tr "." "_")
|
|
||||||
%global hpc_gnu_dep_version %(HPC_CF_FULL_VERSION=%hpc_gnu_full_version; \
|
%global hpc_gnu_dep_version %(HPC_CF_FULL_VERSION=%hpc_gnu_full_version; \
|
||||||
echo ${HPC_CF_FULL_VERSION%.*})
|
[ ${HPC_CF_FULL_VERSION%%%%.*} -lt 5 ] && \
|
||||||
|
echo ${HPC_CF_FULL_VERSION%%.*} || \
|
||||||
|
echo ${HPC_CF_FULL_VERSION%%%%.*} )
|
||||||
%global hpc_gnu_pack_version %{?c_f_ver}
|
%global hpc_gnu_pack_version %{?c_f_ver}
|
||||||
|
%if 0%{!?leap_version:1} && 0%{!?sle_version:1}
|
||||||
|
%global hpc_rolling_release_version %(echo %hpc_gnu_dep_version | tr -d '.')
|
||||||
|
%endif
|
||||||
%global hpc_gnu_dir gnu%{hpc_gnu_dep_version}
|
%global hpc_gnu_dir gnu%{hpc_gnu_dep_version}
|
||||||
%hpc_init -C -c %compiler_family %{?c_f_ver:-v %{c_f_ver}}
|
%hpc_init -C -c %compiler_family %{?c_f_ver:-v %{c_f_ver}}
|
||||||
|
|
||||||
@ -60,47 +64,33 @@ Source0: https://raw.githubusercontent.com/openSUSE/hpc/master/compiler/m
|
|||||||
Source1: LICENSE
|
Source1: LICENSE
|
||||||
Source2: gnu-compilers-hpc-rpmlintrc
|
Source2: gnu-compilers-hpc-rpmlintrc
|
||||||
Source3: _multibuild
|
Source3: _multibuild
|
||||||
|
BuildRequires: gcc%{?c_f_ver}
|
||||||
|
BuildRequires: lua-lmod
|
||||||
|
BuildRequires: suse-hpc
|
||||||
|
Requires: lua-lmod
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Requires: gnu-compilers_%{_hpc_gnu_full_version} = %{version}
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Provides HPC-compatible setup and configuration for the GNU compiler toolchain.
|
Provides HPC-compatible setup and configuration for the GNU compiler toolchain.
|
||||||
|
|
||||||
%define meta README.meta
|
%define meta README.meta
|
||||||
%define meta_devel README.meta-devel
|
|
||||||
|
|
||||||
%package -n gnu-compilers_%{_hpc_gnu_full_version}
|
|
||||||
Summary: SUSE HPC GNU Compiler Toolchain environment
|
|
||||||
Group: Development/Tools/Other
|
|
||||||
BuildArch: noarch
|
|
||||||
BuildRequires: gcc%{?c_f_ver}
|
|
||||||
BuildRequires: lua-lmod
|
|
||||||
BuildRequires: suse-hpc
|
|
||||||
Requires: lua-lmod
|
|
||||||
|
|
||||||
%description -n gnu-compilers_%{_hpc_gnu_full_version}
|
|
||||||
Package for environment modules for the GNU toolchain version %{hpc_gnu_full_version}.
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Devel package for HPC GNU compiler environment
|
Summary: Devel package for HPC GNU compiler environment
|
||||||
Group: Development/Tools/Other
|
Group: Development/Tools/Other
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: gnu-compilers_%{_hpc_gnu_full_version}-devel = %{version}
|
Requires: gcc%{hpc_cf_pack_version}
|
||||||
|
Requires: gcc%{hpc_cf_pack_version}-c++
|
||||||
|
Requires: gcc%{hpc_cf_pack_version}-fortran
|
||||||
|
%if 0%{hpc_rolling_release_version:1}
|
||||||
|
Requires: gcc%{hpc_rolling_release_version}
|
||||||
|
Requires: gcc%{hpc_rolling_release_version}-c++
|
||||||
|
Requires: gcc%{hpc_rolling_release_version}-fortran
|
||||||
|
%endif
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Provides master dependency package for building with the GNU compiler toolchain.
|
|
||||||
|
|
||||||
%package -n gnu-compilers_%{_hpc_gnu_full_version}-devel
|
|
||||||
Summary: Devel package for HPC GNU compiler environment
|
|
||||||
Group: Development/Tools/Other
|
|
||||||
BuildArch: noarch
|
|
||||||
Requires: gcc%{hpc_cf_pack_version} = %{hpc_gnu_full_version}
|
|
||||||
Requires: gcc%{hpc_cf_pack_version}-c++ = %{hpc_gnu_full_version}
|
|
||||||
Requires: gcc%{hpc_cf_pack_version}-fortran = %{hpc_gnu_full_version}
|
|
||||||
|
|
||||||
%description -n gnu-compilers_%{_hpc_gnu_full_version}-devel
|
|
||||||
Provides package dependencies for building with the GNU compiler toolchain.
|
Provides package dependencies for building with the GNU compiler toolchain.
|
||||||
|
|
||||||
%package macros-devel
|
%package macros-devel
|
||||||
@ -119,17 +109,7 @@ Provides macros for building HPC compliant RPM with the GNU compiler toolchain.
|
|||||||
%build
|
%build
|
||||||
|
|
||||||
%{__cat} <<EOF > %{meta}
|
%{__cat} <<EOF > %{meta}
|
||||||
%{name} is a dependency package to ensure installation of the
|
%{name}-devel is a meta package to ensure installation of the
|
||||||
gnu toolchain.
|
|
||||||
EOF
|
|
||||||
|
|
||||||
%{__cat} <<EOF > %{meta_devel}
|
|
||||||
%{name}-devel is a dependency package to ensure installation of the
|
|
||||||
gnu toolchain.
|
|
||||||
EOF
|
|
||||||
|
|
||||||
%{__cat} <<EOF > %{meta_devel}_%{_hpc_gnu_full_version}
|
|
||||||
%{name}_%{_hpc_gnu_full_version}-devel is a meta package to ensure installation of the
|
|
||||||
gnu toolchain.
|
gnu toolchain.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -142,7 +122,7 @@ mkdir -p %{buildroot}%{hpc_cf_install_path}
|
|||||||
mkdir -p %{buildroot}%{hpc_install_base}
|
mkdir -p %{buildroot}%{hpc_install_base}
|
||||||
mkdir -p %{buildroot}%{hpc_modulepath}
|
mkdir -p %{buildroot}%{hpc_modulepath}
|
||||||
mkdir -p %{buildroot}%{lua_lmod_modulesdir}/%pname
|
mkdir -p %{buildroot}%{lua_lmod_modulesdir}/%pname
|
||||||
%{__cat} <<"EOF" > %{buildroot}/%{lmod_base}/%{hpc_cf_full_version}
|
%{__cat} <<"EOF" > %{buildroot}/%{lmod_base}/%{hpc_cf_dep_version}
|
||||||
#%%Module1.0#####################################################################
|
#%%Module1.0#####################################################################
|
||||||
|
|
||||||
proc ModulesHelp { } {
|
proc ModulesHelp { } {
|
||||||
@ -154,7 +134,7 @@ puts stderr "Consult the man pages for detailed information"
|
|||||||
puts stderr "on the commandline syntax and compiler options."
|
puts stderr "on the commandline syntax and compiler options."
|
||||||
puts stderr " "
|
puts stderr " "
|
||||||
|
|
||||||
puts stderr "\nVersion %{hpc_cf_full_version}\n"
|
puts stderr "\nVersion %{hpc_cf_dep_version}\n"
|
||||||
|
|
||||||
}
|
}
|
||||||
module-whatis "Name: GNU Compiler Collection"
|
module-whatis "Name: GNU Compiler Collection"
|
||||||
@ -163,7 +143,7 @@ module-whatis "Category: compiler, runtime support"
|
|||||||
module-whatis "Description: GNU Compiler Family (C/C++/Fortran for %_arch)"
|
module-whatis "Description: GNU Compiler Family (C/C++/Fortran for %_arch)"
|
||||||
module-whatis "URL: http://gcc.gnu.org"
|
module-whatis "URL: http://gcc.gnu.org"
|
||||||
|
|
||||||
set version %{hpc_cf_full_version}
|
set version %{hpc_cf_dep_version}
|
||||||
prepend-path MODULEPATH %{hpc_modulepath}
|
prepend-path MODULEPATH %{hpc_modulepath}
|
||||||
%if 0%{?c_f_ver:1} > 0
|
%if 0%{?c_f_ver:1} > 0
|
||||||
prepend-path MANPATH %{hpc_cf_install_path}/man
|
prepend-path MANPATH %{hpc_cf_install_path}/man
|
||||||
@ -180,13 +160,13 @@ family "compiler"
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
export hpc_cf_full_version=%{hpc_cf_full_version}
|
export hpc_cf_dep_version=%{hpc_cf_dep_version}
|
||||||
%{__cat} <<"EOF" > %{buildroot}/%{lmod_base}/.version.%{hpc_cf_full_version}
|
%{__cat} <<"EOF" > %{buildroot}/%{lmod_base}/.version.%{hpc_cf_dep_version}
|
||||||
#%%Module1.0#####################################################################
|
#%%Module1.0#####################################################################
|
||||||
##
|
##
|
||||||
## version file for GNU-compilers-${hpc_cf_full_version}
|
## version file for GNU-compilers-${hpc_cf_dep_version}
|
||||||
##
|
##
|
||||||
set ModulesVersion "%{hpc_cf_full_version}"
|
set ModulesVersion "%{hpc_cf_dep_version}"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -205,6 +185,7 @@ do
|
|||||||
dir=$(dirname $i)
|
dir=$(dirname $i)
|
||||||
base=$(basename $i)
|
base=$(basename $i)
|
||||||
base=${base/%{hpc_gnu_bin_version}/}
|
base=${base/%{hpc_gnu_bin_version}/}
|
||||||
|
base=${base/.././}
|
||||||
case $dir in
|
case $dir in
|
||||||
/usr/share/man*)
|
/usr/share/man*)
|
||||||
mandir=$(basename $dir)
|
mandir=$(basename $dir)
|
||||||
@ -220,25 +201,18 @@ done
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc %{meta}
|
|
||||||
|
|
||||||
%files -n gnu-compilers_%{_hpc_gnu_full_version}
|
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
%dir %{lua_lmod_modulesdir}/%{pname}
|
%dir %{lua_lmod_modulesdir}/%{pname}
|
||||||
%dir %{hpc_modulepath}
|
%dir %{hpc_modulepath}
|
||||||
%dir %{hpc_base}
|
%dir %{hpc_base}
|
||||||
%dir %hpc_install_base
|
%dir %hpc_install_base
|
||||||
%hpc_cf_dirs
|
%hpc_cf_dirs
|
||||||
%{lua_lmod_modulesdir}/%{pname}/%{hpc_cf_full_version}
|
%{lua_lmod_modulesdir}/%{pname}/%{hpc_cf_dep_version}
|
||||||
%{lua_lmod_modulesdir}/%{pname}/.version.%{hpc_cf_full_version}
|
%{lua_lmod_modulesdir}/%{pname}/.version.%{hpc_cf_dep_version}
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc %{meta_devel}
|
%doc %{meta}
|
||||||
|
|
||||||
%files -n gnu-compilers_%{_hpc_gnu_full_version}-devel
|
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%doc %{meta_devel}_%{_hpc_gnu_full_version}
|
|
||||||
|
|
||||||
%files macros-devel
|
%files macros-devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
@ -16,10 +16,11 @@
|
|||||||
gcc%{hpc_gnu_bin_version} --version |\\\
|
gcc%{hpc_gnu_bin_version} --version |\\\
|
||||||
head -1 |\\\
|
head -1 |\\\
|
||||||
sed -e "s#.* \\([0-9]\\+\\.[0-9.]\\+\\)\\(\$\\| .*\\)#\\1#")}\
|
sed -e "s#.* \\([0-9]\\+\\.[0-9.]\\+\\)\\(\$\\| .*\\)#\\1#")}\
|
||||||
# FIXME: We may just want to pick the major.minor or major version only \
|
|
||||||
%{expand: %%global hpc_gnu_dep_version %(\\\
|
%{expand: %%global hpc_gnu_dep_version %(\\\
|
||||||
FULL_VERSION=%hpc_gnu_full_version; \\\
|
FULL_VERSION=%hpc_gnu_full_version; \\\
|
||||||
echo ${FULL_VERSION%.*})} \
|
[ ${HPC_CF_FULL_VERSION%%%%.*} -lt 5 ] && \\\
|
||||||
|
echo ${FULL_VERSION%%.*} || \\\
|
||||||
|
echo ${HPC_CF_FULL_VERSION%%%%.*})} \
|
||||||
%{expand: %%global hpc_gnu_pack_version %{?_cf_ver}%{!?_cf_ver:%%{nil}}} \
|
%{expand: %%global hpc_gnu_pack_version %{?_cf_ver}%{!?_cf_ver:%%{nil}}} \
|
||||||
%{expand: %%global hpc_gnu_dir gnu%{hpc_gnu_dep_version}}
|
%{expand: %%global hpc_gnu_dir gnu%{hpc_gnu_dep_version}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user