File plasma.spec of Package plasma
#
# spec file for package plasma
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: plasma
Version: 21.8.29
Release: 0
Summary: Parallel Linear Algebra Software for Multicore Architectures
License: BSD-3-Clause
Group: System/Libraries
URL: https://icl.utk.edu/plasma/overview/index.html
Source0: https://github.com/icl-utk-edu/plasma/releases/download/%{version}/plasma-%{version}.tar.gz
BuildRequires: blas-devel
BuildRequires: cblas-devel
BuildRequires: cmake
BuildRequires: gcc-fortran
BuildRequires: lapack-devel
BuildRequires: lapacke-devel
BuildRequires: pkgconfig
BuildRequires: hwloc-devel
# python is nedded for the tests procedure
# BuildRequires: python
%description
The Parallel Linear Algebra for Scalable Multi-core Architectures (PLASMA)
project aims to address the critical and highly disruptive situation that
is facing the Linear Algebra and High Performance Computing community due
to the introduction of multi-core architectures.
PLASMA's ultimate goal is to create software frameworks that enable
programmers to simplify the process of developing applications that
can achieve both high performance and portability across a range of
new architectures.
The development of programming models that enforce asynchronous, out
of order scheduling of operations is the concept used as the basis
for the definition of a scalable yet highly efficient software framework
for Computational Linear Algebra applications.
%package -n libplasma2
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
%description -n libplasma2
The %{name}-devel package contains shared libraries for %{name}.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: lib%{name}2 = %{version}-%{release}
Requires: blas-devel
Requires: cblas-devel
Requires: lapack-devel
Requires: lapacke-devel
Requires: pkgconfig
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q -n plasma-%{version}
sed -i -e "s/DESTINATION lib/DESTINATION ${CMAKE_INSTALL_LIBDIR}/" CMakeLists.txt
echo "set_target_properties(plasma plasma_core_blas
PROPERTIES SOVERSION 2
)" >> CMakeLists.txt
%build
export CFLAGS="%{optflags} -Wno-error=return-type"
%cmake \
-DCMAKE_SKIP_RPATH=OFF \
-DCMAKE_SKIP_INSTALL_RPATH=ON \
%{nil}
%cmake_build
%install
%cmake_install
rm %{buildroot}%{_bindir}/plasmatest
install -m644 -D lib/pkgconfig/plasma.pc.in %{buildroot}%{_libdir}/pkgconfig/plasma.pc
sed -i -e 's,@INSTALL_PREFIX@,%{_prefix},g' \
-e 's,libdir=.*,libdir=%{_libdir},g' \
-e 's,-lcoreblas,-lplasma_core_blas,g' \
-e 's,@CFLAGS@,,g' \
-e 's,@LIBS@,,g' \
-e 's,@REQUIRES@,,g' \
%{buildroot}%{_libdir}/pkgconfig/plasma.pc
%check
ln -sf ../build/plasmatest test/test
sed -i -e 's/print \(.*\)$/print(\1)/' -e 's/ "pass"/ b"pass"/' -e 's/str(line)/line.decode()/' tools/plasma_testing.py
cd tools; python3 plasma_testing.py
%post -n libplasma2 -p /sbin/ldconfig
%postun -n libplasma2 -p /sbin/ldconfig
%files -n libplasma2
%license LICENSE
%doc README.md ChangeLog
%{_libdir}/*.so.*
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc
%changelog