Accepting request 674838 from home:eeich:branches:science

- Fix dependencies.
- Fix %%post and %%postun scripts for HPC.
- Fix HPC modulefile.
- Fix package groups.
- Generate and add pkgconfig files.

OBS-URL: https://build.opensuse.org/request/show/674838
OBS-URL: https://build.opensuse.org/package/show/science/superlu?expand=0&rev=19
This commit is contained in:
Egbert Eich 2019-02-14 06:49:09 +00:00 committed by Git OBS Bridge
parent da7747d229
commit fd120cba19
2 changed files with 41 additions and 14 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sun Feb 10 23:11:37 UTC 2019 - Egbert Eich <eich@suse.com>
- Fix dependencies.
- Fix %%post and %%postun scripts for HPC.
- Fix HPC modulefile.
- Fix package groups.
- Generate and add pkgconfig files.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Feb 8 10:50:43 UTC 2019 - eich@suse.com Fri Feb 8 10:50:43 UTC 2019 - eich@suse.com

View File

@ -50,18 +50,20 @@ ExclusiveArch: do_not_build
%define p_includedir %_includedir %define p_includedir %_includedir
%define p_libdir %_libdir %define p_libdir %_libdir
%define _sover 5 %define _sover 5
%define libname lib%{name}%{?_sover}
%else %else
%{hpc_init -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} %{?ext:-e %{ext}}} %{hpc_init -c %compiler_family %{?c_f_ver:-v %{c_f_ver}} %{?ext:-e %{ext}}}
%define package_name %{hpc_package_name %_ver} %define package_name %{hpc_package_name %_ver}
%define p_prefix %hpc_prefix %define p_prefix %hpc_prefix
%define p_includedir %hpc_includedir %define p_includedir %hpc_includedir
%define p_libdir %hpc_libdir %define p_libdir %hpc_libdir
%define libname lib%{name}
%endif %endif
Name: %{package_name} Name: %{package_name}
Summary: A general purpose library for the direct solution of linear equations Summary: A general purpose library for the direct solution of linear equations
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Libraries/C and C++ Group: Productivity/Scientific/Math
Version: %{ver} Version: %{ver}
Release: 0 Release: 0
Source: http://crd-legacy.lbl.gov/%7Exiaoye/SuperLU/%{pname}_%{version}.tar.gz Source: http://crd-legacy.lbl.gov/%7Exiaoye/SuperLU/%{pname}_%{version}.tar.gz
@ -92,8 +94,6 @@ Requires: %{compiler_family}%{?c_f_ver}-compilers-hpc
BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel BuildRequires: %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
BuildRequires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel BuildRequires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
BuildRequires: suse-hpc >= 0.3 BuildRequires: suse-hpc >= 0.3
%hpc_requires
%hpc_requires_devel
%endif %endif
%description %description
@ -103,18 +103,27 @@ decomposition of sparse matrices.
Documentation can be found in the %{name}-doc package or on Documentation can be found in the %{name}-doc package or on
http://www.netlib.org. http://www.netlib.org.
%package -n lib%{name}%{?_sover} %package -n %libname
Summary: SuperLU matrix solver Summary: SuperLU matrix solver
Group: System/Libraries Group: Productivity/Scientific/Math
%if %{with hpc}
Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc
Requires: lua-lmod >= 7.6.1
%hpc_requires
%endif
%description -n lib%{name}%{?_sover} %description -n %libname
SuperLU is an algorithm that uses group theory to optimize LU SuperLU is an algorithm that uses group theory to optimize LU
decomposition of sparse matrices. decomposition of sparse matrices.
%package devel %package devel
Summary: Headers and development library for lib%{name}%{?_sover} Summary: Headers and development library for lib%{name}%{?_sover}
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: lib%{name}%{?_sover} = %version Requires: %libname = %version
%if %{with hpc}
Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel
%hpc_requires_devel
%endif
Recommends: %name-doc Recommends: %name-doc
%description devel %description devel
@ -191,6 +200,8 @@ cp FORTRAN/README README.fortran
%fdupes -s examples %fdupes -s examples
%if %{with hpc} %if %{with hpc}
%{hpc_write_pkgconfig}
# TODO: is there any path to add for Matlab files? # TODO: is there any path to add for Matlab files?
%hpc_write_modules_files %hpc_write_modules_files
#%Module1.0##################################################################### #%Module1.0#####################################################################
@ -210,42 +221,49 @@ puts stderr "\nVersion %{version}\n"
module-whatis "Name: %{pname} built with %{compiler_family} compiler" module-whatis "Name: %{pname} built with %{compiler_family} compiler"
module-whatis "Version: %{version}" module-whatis "Version: %{version}"
module-whatis "Category: runtime library" module-whatis "Category: runtime library"
module-whatis "Description: %{SUMMARY}"
module-whatis "%{url}" module-whatis "%{url}"
set version %{version} set version %{version}
depends-on openblas depends-on openblas
if {[file isdirectory %{hpc_includedir}]} {
prepend-path INCLUDE %{hpc_includedir} prepend-path INCLUDE %{hpc_includedir}
}
prepend-path LD_LIBRARY_PATH %{hpc_libdir} prepend-path LD_LIBRARY_PATH %{hpc_libdir}
setenv %{hpc_PNAME %pname}_DIR %{hpc_prefix} setenv %{hpc_PNAME %pname}_DIR %{hpc_prefix}
if {[file isdirectory %{hpc_includedir}]} {
setenv %{hpc_PNAME %pname}_INC %{hpc_includedir} setenv %{hpc_PNAME %pname}_INC %{hpc_includedir}
%hpc_modulefile_add_pkgconfig_path
}
setenv %{hpc_PNAME %pname}_LIB %{hpc_libdir} setenv %{hpc_PNAME %pname}_LIB %{hpc_libdir}
EOF EOF
%endif %endif
%if %{without hpc} %if %{without hpc}
%post -n lib%{name}%{?_sover} -p /sbin/ldconfig %post -n %libname -p /sbin/ldconfig
%postun -n lib%{name}%{?_sover} -p /sbin/ldconfig %postun -n %libname -p /sbin/ldconfig
%else %else
%post -n lib%{name}%{?_sover} %post -n %libname
/sbin/ldconfig -N %hpc_libdir /sbin/ldconfig -N %hpc_libdir
%postun -n lib%{name}%{?_sover} %postun -n %libname
/sbin/ldconfig -N %hpc_libdir /sbin/ldconfig -N %hpc_libdir
%hpc_module_delete_if_default %hpc_module_delete_if_default
%endif %endif
%files -n lib%{name}%{?_sover} %files -n %libname
%doc README MATLAB README.SUSE %doc README MATLAB README.SUSE
%{?hpc_dirs} %{?with_hpc:%hpc_dirs}
%{?hpc_modules_files} %{?with_hpc:%hpc_modules_files}
%{p_libdir}/*.so.* %{p_libdir}/*.so.*
%files devel %files devel
%doc README.fortran %doc README.fortran
%{?with_hpc:%{hpc_pkgconfig_file}}
%{p_includedir}/%{!?with_hpc:*} %{p_includedir}/%{!?with_hpc:*}
%{p_libdir}/*.so %{p_libdir}/*.so