|
|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
|
#
|
|
|
|
|
# spec file
|
|
|
|
|
# spec file for package hypre
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2023 SUSE LLC
|
|
|
|
|
# Copyright (c) 2025 SUSE LLC
|
|
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
@@ -17,8 +17,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global flavor @BUILD_FLAVOR@%{?nil}
|
|
|
|
|
%define ver 2.20.0
|
|
|
|
|
%define _ver 2_20_0
|
|
|
|
|
%define somver %{_ver}
|
|
|
|
|
%define sover %{ver}
|
|
|
|
|
|
|
|
|
|
@@ -43,204 +41,27 @@ ExclusiveArch: do_not_build
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "serial"
|
|
|
|
|
%undefine mpi_family
|
|
|
|
|
%bcond_with hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "openmpi4"
|
|
|
|
|
%global mpi_family openmpi
|
|
|
|
|
%define mpi_vers 4
|
|
|
|
|
%bcond_with hpc
|
|
|
|
|
%{?DisOMPI4}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "openmpi5"
|
|
|
|
|
%global mpi_family openmpi
|
|
|
|
|
%define mpi_vers 5
|
|
|
|
|
%bcond_with hpc
|
|
|
|
|
%{?DisOMPI5}
|
|
|
|
|
ExcludeArch: i586 %arm s390
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "mvapich2"
|
|
|
|
|
%global mpi_family mvapich2
|
|
|
|
|
%bcond_with hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "mpich"
|
|
|
|
|
%global mpi_family mpich
|
|
|
|
|
%bcond_with hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "doc-hpc"
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%bcond_without install_doc
|
|
|
|
|
%bcond_with build_all
|
|
|
|
|
%else
|
|
|
|
|
%bcond_without build_all
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu-mvapich2-hpc"
|
|
|
|
|
%undefine c_f_ver
|
|
|
|
|
%define mpi_family mvapich2
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu-mpich-hpc"
|
|
|
|
|
%undefine c_f_ver
|
|
|
|
|
%define mpi_family mpich
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu-openmpi4-hpc"
|
|
|
|
|
%undefine c_f_ver
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%define mpi_family openmpi
|
|
|
|
|
%define mpi_vers 4
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%{?DisOMPI4}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu-openmpi5-hpc"
|
|
|
|
|
%undefine c_f_ver
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%define mpi_family openmpi
|
|
|
|
|
%define mpi_vers 5
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%{?DisOMPI5}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu7-mvapich2-hpc"
|
|
|
|
|
%define c_f_ver 7
|
|
|
|
|
%define mpi_family mvapich2
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu7-mpich-hpc"
|
|
|
|
|
%define c_f_ver 7
|
|
|
|
|
%define mpi_family mpich
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu7-openmpi4-hpc"
|
|
|
|
|
%define c_f_ver 7
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%define mpi_family openmpi
|
|
|
|
|
%define mpi_vers 4
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%{?DisOMPI4}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu7-openmpi5-hpc"
|
|
|
|
|
%define c_f_ver 7
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%define mpi_family openmpi
|
|
|
|
|
%define mpi_vers 5
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%{?DisOMPI5}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu8-mvapich2-hpc"
|
|
|
|
|
%define c_f_ver 8
|
|
|
|
|
%define mpi_family mvapich2
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu8-mpich-hpc"
|
|
|
|
|
%define c_f_ver 8
|
|
|
|
|
%define mpi_family mpich
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu8-openmpi4-hpc"
|
|
|
|
|
%define c_f_ver 8
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%define mpi_family openmpi
|
|
|
|
|
%define mpi_vers 4
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%{?DisOMPI4}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu8-openmpi5-hpc"
|
|
|
|
|
%define c_f_ver 8
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%define mpi_family openmpi
|
|
|
|
|
%define mpi_vers 5
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%{?DisOMPI5}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu9-mvapich2-hpc"
|
|
|
|
|
%define c_f_ver 9
|
|
|
|
|
%define mpi_family mvapich2
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu9-mpich-hpc"
|
|
|
|
|
%define c_f_ver 9
|
|
|
|
|
%define mpi_family mpich
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu9-openmpi4-hpc"
|
|
|
|
|
%define c_f_ver 9
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%define mpi_family openmpi
|
|
|
|
|
%define mpi_vers 4
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%{?DisOMPI4}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu9-openmpi5-hpc"
|
|
|
|
|
%define c_f_ver 9
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%define mpi_family openmpi
|
|
|
|
|
%define mpi_vers 5
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%{?DisOMPI5}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu10-mvapich2-hpc"
|
|
|
|
|
%define c_f_ver 10
|
|
|
|
|
%define mpi_family mvapich2
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu10-mpich-hpc"
|
|
|
|
|
%define c_f_ver 10
|
|
|
|
|
%define mpi_family mpich
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu10-openmpi4-hpc"
|
|
|
|
|
%define c_f_ver 10
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%define mpi_family openmpi
|
|
|
|
|
%define mpi_vers 4
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%{?DisOMPI4}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if "%{flavor}" == "gnu10-openmpi5-hpc"
|
|
|
|
|
%define c_f_ver 10
|
|
|
|
|
%define compiler_family gnu
|
|
|
|
|
%define mpi_family openmpi
|
|
|
|
|
%define mpi_vers 5
|
|
|
|
|
%bcond_without hpc
|
|
|
|
|
%{?DisOMPI5}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Don't build non-HPC on SLE
|
|
|
|
|
%if !0%{?is_opensuse} && !0%{?with_hpc:1}
|
|
|
|
|
ExclusiveArch: do_not_build
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%{?mpi_family:%{bcond_without mpi}}%{!?mpi_family:%{bcond_with mpi}}
|
|
|
|
|
@@ -250,40 +71,26 @@ ExclusiveArch: do_not_build
|
|
|
|
|
%define mpi_ext %{?mpi_vers}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{without hpc}
|
|
|
|
|
%if %{without mpi}
|
|
|
|
|
%global my_bindir %_bindir
|
|
|
|
|
%global _incdir %{_prefix}/include/
|
|
|
|
|
%else
|
|
|
|
|
%global _bindir %_bindir
|
|
|
|
|
%global _defaultlicensedir %_defaultlicensedir
|
|
|
|
|
%global _prefix %{_libdir}/mpi/gcc/%{mpi_family}%{?mpi_ext}
|
|
|
|
|
%global _suffix -%{?mpi_family}%{?mpi_ext}
|
|
|
|
|
%global my_bindir %{_prefix}/bin
|
|
|
|
|
%global _libdir %{_prefix}/%{_lib}/
|
|
|
|
|
%global _incdir %{_prefix}/include/
|
|
|
|
|
%endif
|
|
|
|
|
%if 0%{!?package_name:1}
|
|
|
|
|
%define package_name %pname%{?_suffix}
|
|
|
|
|
%endif
|
|
|
|
|
%define libname lib%{PNAME}%{somver}%{?_suffix}
|
|
|
|
|
%else # with hpc
|
|
|
|
|
ExcludeArch: %ix86
|
|
|
|
|
%{hpc_init %{?compiler_family:-c %compiler_family %{?c_f_ver:-v %{c_f_ver}}} %{?with_mpi:-m {%mpi_family}} %{?mpi_vers:-V %{mpi_vers}} %{?ext:-e %{ext}}}
|
|
|
|
|
# Nail these down before changing _prefix
|
|
|
|
|
%global hpc_base %hpc_base
|
|
|
|
|
%if %{without mpi}
|
|
|
|
|
%global my_bindir %_bindir
|
|
|
|
|
%global _incdir %{_prefix}/include/
|
|
|
|
|
%else
|
|
|
|
|
%global _bindir %_bindir
|
|
|
|
|
%global _defaultlicensedir %_defaultlicensedir
|
|
|
|
|
%define _prefix %hpc_prefix
|
|
|
|
|
%define my_bindir %hpc_bindir
|
|
|
|
|
%define _libdir %hpc_libdir
|
|
|
|
|
%define _incdir %hpc_includedir
|
|
|
|
|
%define package_name %{hpc_package_name %_ver}
|
|
|
|
|
%define libname lib%{PNAME}%{hpc_package_name_tail %{?_ver}}
|
|
|
|
|
%global _prefix %{_libdir}/mpi/gcc/%{mpi_family}%{?mpi_ext}
|
|
|
|
|
%global _suffix -%{?mpi_family}%{?mpi_ext}
|
|
|
|
|
%global my_bindir %{_prefix}/bin
|
|
|
|
|
%global _libdir %{_prefix}/%{_lib}/
|
|
|
|
|
%global _incdir %{_prefix}/include/
|
|
|
|
|
%endif
|
|
|
|
|
%if 0%{!?package_name:1}
|
|
|
|
|
%define package_name %pname%{?_suffix}
|
|
|
|
|
%endif
|
|
|
|
|
%define libname lib%{PNAME}%{somver}%{?_suffix}
|
|
|
|
|
|
|
|
|
|
Name: %package_name
|
|
|
|
|
Version: %{ver}
|
|
|
|
|
Version: 2.20.0
|
|
|
|
|
%define somver 2_20_0
|
|
|
|
|
Release: 0
|
|
|
|
|
Summary: Scalable algorithms for solving linear systems of equations
|
|
|
|
|
License: Apache-2.0 OR MIT
|
|
|
|
|
@@ -295,26 +102,14 @@ Patch1: Add-library-version.patch
|
|
|
|
|
|
|
|
|
|
# TODO : add babel
|
|
|
|
|
#BuildRequires: babel-devel
|
|
|
|
|
%if %{with build_all}
|
|
|
|
|
%if %{without hpc}
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: gcc-fortran
|
|
|
|
|
BuildRequires: lapack-devel
|
|
|
|
|
BuildRequires: superlu-devel
|
|
|
|
|
%if 0%{?with mpi}
|
|
|
|
|
%if 0%{?with mpi}
|
|
|
|
|
BuildRequires: %{mpi_family}%{?mpi_ext}-devel
|
|
|
|
|
%endif
|
|
|
|
|
%else
|
|
|
|
|
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
|
|
|
|
|
BuildRequires: %{mpi_family}%{?mpi_vers}-%{compiler_family}%{?c_f_ver}-hpc-macros-devel
|
|
|
|
|
BuildRequires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
|
|
|
|
|
BuildRequires: superlu%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
%endif # build_all
|
|
|
|
|
%if %{with hpc}
|
|
|
|
|
BuildRequires: suse-hpc
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
# Default library install path
|
|
|
|
|
|
|
|
|
|
@@ -328,12 +123,6 @@ sciences.
|
|
|
|
|
%package -n %{libname}
|
|
|
|
|
Summary: Scalable algorithms for solving linear systems of equations
|
|
|
|
|
Group: System/Libraries
|
|
|
|
|
%if %{with hpc}
|
|
|
|
|
%hpc_requires
|
|
|
|
|
%{requires_eq libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc}
|
|
|
|
|
%{requires_eq libsuperlu%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc}
|
|
|
|
|
Requires: lua-lmod >= 7.6.1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description -n %{libname}
|
|
|
|
|
Hypre is a library of preconditioners that feature parallel multigrid
|
|
|
|
|
@@ -348,14 +137,8 @@ This package contains %{?mpi_family}%{?mpi_vers}%{!?mpi_family:serial} shared li
|
|
|
|
|
Summary: Headers and library links for %{libname}
|
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
|
Requires: %{libname} = %version
|
|
|
|
|
%if %{without hpc}
|
|
|
|
|
Requires: lapack-devel
|
|
|
|
|
Requires: superlu-devel
|
|
|
|
|
%else
|
|
|
|
|
%{requires_eq libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel}
|
|
|
|
|
%{requires_eq superlu%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel}
|
|
|
|
|
%hpc_requires_devel
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
%{PNAME} headers and libraries files needed for development
|
|
|
|
|
@@ -369,7 +152,6 @@ BuildArch: noarch
|
|
|
|
|
%description examples
|
|
|
|
|
This package contains examples for Hypre.
|
|
|
|
|
|
|
|
|
|
%if %{with install_doc}
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Development documentation for Hypre
|
|
|
|
|
Group: Documentation/Other
|
|
|
|
|
@@ -380,44 +162,24 @@ BuildRequires: texlive-xypic
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
This package contains development documentation for Hypre.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with build_all}
|
|
|
|
|
%{?with_hpc:%{hpc_master_package -L -l -N %PNAME -n lib%{PNAME}%{hpc_package_name_tail}}}
|
|
|
|
|
%{?with_hpc:%{hpc_master_package -L devel}}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p0 -n %{pname}-%{version}
|
|
|
|
|
|
|
|
|
|
%if %{without hpc}
|
|
|
|
|
cat > %{_sourcedir}/baselibs.conf <<EOF
|
|
|
|
|
%{libname}
|
|
|
|
|
%{libname}-devel
|
|
|
|
|
requires %{?_suffix}-<targettype>
|
|
|
|
|
requires "%{libname}-<targettype> = <version>"
|
|
|
|
|
EOF
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%if %{with build_all}
|
|
|
|
|
%if %{without hpc}
|
|
|
|
|
%{?with_mpi: . %{my_bindir}/mpivars.sh}
|
|
|
|
|
%else
|
|
|
|
|
%hpc_setup
|
|
|
|
|
|
|
|
|
|
module load openblas
|
|
|
|
|
module load superlu
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
export LDFLAGS="-lm"
|
|
|
|
|
|
|
|
|
|
cd src/
|
|
|
|
|
%if %{without hpc}
|
|
|
|
|
%cmake \
|
|
|
|
|
%else
|
|
|
|
|
%hpc_cmake \
|
|
|
|
|
%endif
|
|
|
|
|
-DHYPRE_SHARED=ON \
|
|
|
|
|
%if %{without mpi}
|
|
|
|
|
-DHYPRE_WITH_MPI=OFF \
|
|
|
|
|
@@ -426,111 +188,36 @@ cd src/
|
|
|
|
|
%endif
|
|
|
|
|
-DHYPRE_USING_HYPRE_BLAS=OFF \
|
|
|
|
|
-DHYPRE_USING_HYPRE_LAPACK=OFF \
|
|
|
|
|
-DCMAKE_SHARED_LINKER_FLAGS="-lm" \
|
|
|
|
|
-DCMAKE_SHARED_LINKER_FLAGS="-lm"
|
|
|
|
|
|
|
|
|
|
%make_jobs
|
|
|
|
|
%endif # build_all
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%if %{with install_doc}
|
|
|
|
|
install -m 644 -D docs/*pdf -t %{buildroot}%{_docdir}/%{package_name}/
|
|
|
|
|
%fdupes -s src/examples
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with build_all}
|
|
|
|
|
pushd .
|
|
|
|
|
cd src/
|
|
|
|
|
install -m 644 -D docs/usr-manual/*pdf -t %{buildroot}%{_docdir}/%{package_name}/
|
|
|
|
|
%fdupes -s examples
|
|
|
|
|
|
|
|
|
|
%cmake_install
|
|
|
|
|
|
|
|
|
|
%if %{with hpc}
|
|
|
|
|
%{hpc_write_pkgconfig -n %{pname} -l %{PNAME}}
|
|
|
|
|
|
|
|
|
|
%hpc_write_modules_files
|
|
|
|
|
#%%Module1.0#####################################################################
|
|
|
|
|
|
|
|
|
|
proc ModulesHelp { } {
|
|
|
|
|
|
|
|
|
|
puts stderr " "
|
|
|
|
|
puts stderr "This module loads the hypre library built with the %{compiler_family} compiler"
|
|
|
|
|
puts stderr "toolchain and the %{mpi_family}%{?mpi_vers} MPI stack."
|
|
|
|
|
puts stderr " "
|
|
|
|
|
puts stderr "Note that this build of hypre leverages the superlu and MKL libraries."
|
|
|
|
|
puts stderr "Consequently, these packages are loaded automatically with this module."
|
|
|
|
|
|
|
|
|
|
puts stderr "\nVersion %{version}\n"
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
module-whatis "Name: %{pname} built with %{compiler_family} compiler and %{mpi_family}%{?mpi_vers} MPI"
|
|
|
|
|
module-whatis "Description: %{SUMMARY}"
|
|
|
|
|
module-whatis "Version: %{version}"
|
|
|
|
|
module-whatis "Category: runtime library"
|
|
|
|
|
module-whatis "%{url}"
|
|
|
|
|
|
|
|
|
|
set version %{version}
|
|
|
|
|
|
|
|
|
|
depends-on openblas
|
|
|
|
|
depends-on superlu
|
|
|
|
|
|
|
|
|
|
prepend-path PATH %{hpc_bindir}
|
|
|
|
|
if {[file isdirectory %{hpc_includedir}]} {
|
|
|
|
|
prepend-path INCLUDE %{hpc_includedir}
|
|
|
|
|
|
|
|
|
|
%hpc_modulefile_add_pkgconfig_path
|
|
|
|
|
}
|
|
|
|
|
prepend-path LD_LIBRARY_PATH %{hpc_libdir}
|
|
|
|
|
|
|
|
|
|
setenv %{PNAME}_DIR %{hpc_prefix}
|
|
|
|
|
setenv %{PNAME}_BIN %{hpc_bindir}
|
|
|
|
|
if {[file isdirectory %{hpc_includedir}]} {
|
|
|
|
|
setenv %{PNAME}_INC %{hpc_includedir}
|
|
|
|
|
prepend-path CPATH %{hpc_includedir}
|
|
|
|
|
prepend-path C_INCLUDE_PATH %{hpc_includedir}
|
|
|
|
|
prepend-path CPLUS_INCLUDE_PATH %{hpc_includedir}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
setenv %{PNAME}_LIB %{hpc_libdir}
|
|
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
%endif
|
|
|
|
|
%fdupes -s %{buildroot}%{_prefix}
|
|
|
|
|
%endif # build_all
|
|
|
|
|
|
|
|
|
|
%if %{without hpc} && %{without mpi}
|
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
|
|
%post -n %{libname}
|
|
|
|
|
/sbin/ldconfig -N %{_libdir}
|
|
|
|
|
|
|
|
|
|
%postun -n %{libname}
|
|
|
|
|
/sbin/ldconfig -N %{_libdir}
|
|
|
|
|
%{?with_hpc:%hpc_module_delete_if_default}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with build_all}
|
|
|
|
|
%files -n %{libname}
|
|
|
|
|
%{?hpc_dirs}
|
|
|
|
|
%{?hpc_modules_files}
|
|
|
|
|
%{_libdir}/*.so.*
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%if %{with hpc}
|
|
|
|
|
%{?hpc_dirs}
|
|
|
|
|
%{hpc_pkgconfig_file}
|
|
|
|
|
%endif
|
|
|
|
|
%{_libdir}/cmake
|
|
|
|
|
%license COPYRIGHT LICENSE-APACHE LICENSE-MIT NOTICE
|
|
|
|
|
%doc CHANGELOG README.md INSTALL.md
|
|
|
|
|
%{_incdir}%{?!with_hpc:/%{pname}}
|
|
|
|
|
%{_incdir}/%{pname}
|
|
|
|
|
%{_libdir}/*.so
|
|
|
|
|
%endif # build_all
|
|
|
|
|
|
|
|
|
|
%if %{with install_doc}
|
|
|
|
|
%files doc
|
|
|
|
|
%{_docdir}/%{package_name}
|
|
|
|
|
|
|
|
|
|
%files examples
|
|
|
|
|
%doc src/examples
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
|