11Vendor: Microsoft Corporation
22Distribution: Azure Linux
33%global genname superlu
4- %global libver 5
54
65## The RPM macro for the linker flags does not exist on EPEL
76%if 0%{?rhel } && 0%{?rhel } < 7
87%{! ?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
98%endif
109
1110Name: SuperLU
12- Version: 5.2.1
13- Release: 10 %{?dist }
11+ Version: 7.0.0
12+ Release: 1 %{?dist }
1413Summary: Subroutines to solve sparse linear systems
15- License: BSD and GPLv2+
14+ License: BSD-2-Clause AND GPL-2.0 -or-later
1615URL: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/
17- Source0: http://crd-legacy.lbl.gov/~xiaoye/SuperLU/%{genname }_%{version }.tar.gz#/%{genname}-%{version}.tar.gz
18- Patch0: %{genname }-cmake-includedir.patch
19- Patch1: %{genname }-removemc64.patch
2016
21- # Patch soname (5 -> 5.2) of shared library
22- Patch2: %{name }-%{version }-set_soname.patch
17+ Source0: https://github.com/xiaoyeli/%{genname }/archive/refs/tags/v%{version }.tar.gz#/%{genname}-%{version}.tar.gz
2318
24- BuildRequires: openblas-devel, openblas-srpm-macros
25- BuildRequires: gcc
19+ # Use a pre-made configuration file for Make
20+ Source1: %{name }-fedora-make.inc.in
21+ Patch0: %{genname }-removemc64.patch
22+
23+ # Fix ldflags of example files
24+ Patch1: %{name }-fix_example_builds.patch
25+
26+ BuildRequires: openblas-devel, openblas-srpm-macros
27+ BuildRequires: metis-devel
28+ BuildRequires: gcc
2629%if 0%{?rhel }
27- BuildRequires: epel-rpm-macros
30+ BuildRequires: epel-rpm-macros
2831%endif
29- BuildRequires: cmake3
30- BuildRequires: gcc-gfortran
31- BuildRequires: csh
32+ BuildRequires: make
33+ BuildRequires: cmake
34+ BuildRequires: gcc-gfortran
35+ BuildRequires: csh
3236
3337%description
3438SuperLU contains a set of subroutines to solve a sparse linear system
@@ -53,49 +57,68 @@ The %{name}-doc package contains all the help documentation along with C
5357and FORTRAN examples.
5458
5559%prep
56- %autosetup -n %{name }_%{version } -p1
60+ %autosetup -n %{genname }-%{version } -p1
61+
62+ rm -f make.inc
63+ cp -pf %{SOURCE1 } make.inc.in
64+
65+ # Remove bundled BLAS
66+ rm -rf CBLAS
5767
5868rm -fr SRC/mc64ad.f.bak
5969find . -type f | sed -e "/TESTING/d" | xargs chmod a-x
70+
6071# Remove the shippped executables from EXAMPLE
6172find EXAMPLE -type f | while read file
6273do
6374 [ "$(file $file | awk '{print $2}')" = ELF ] && rm $file || :
6475done
6576
6677# Change optimization level
67- sed -i.bak '/NOOPTS/d' make.inc.in
6878sed -e 's|-O0|-O2|g' -i SRC/CMakeLists.txt
6979
7080%build
71- mkdir -p build; cd build
72-
73- # Do not use bundled CBLAS code
74- %cmake3 -Denable_blaslib:BOOL= OFF -DCMAKE_BUILD_TYPE:STRING= Release ..
75- %make_build
81+ %cmake \
82+ -Denable_internal_blaslib:BOOL=NO \
83+ -DXSDK_ENABLE_Fortran:BOOL=OFF \
84+ -DCMAKE_Fortran_FLAGS_RELEASE:STRING=" %{__global_fflags}" \
85+ -DTPL_BLAS_LIBRARIES=" ` pkg-config --libs flexiblas` " \
86+ -DTPL_ENABLE_METISLIB:BOOL=ON \
87+ -DTPL_METIS_INCLUDE_DIRS:PATH=%{_includedir } \
88+ -DTPL_METIS_LIBRARIES:FILEPATH=%{_libdir }/libmetis.so \
89+ -DCMAKE_BUILD_TYPE:STRING=Release \
90+ -DCMAKE_INSTALL_INCLUDEDIR:PATH=include/%{name } \
91+ -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib } \
92+ -DCMAKE_SKIP_RPATH:BOOL=YES -DCMAKE_SKIP_INSTALL_RPATH:BOOL=YES
93+ %cmake_build
7694
7795%install
78- %make_install -C build
96+ %cmake_install
7997
8098%check
81- pushd build
82- ctest3 -V %{?_smp_mflags }
83- popd
84-
85- %ldconfig_scriptlets
99+ export LD_LIBRARY_PATH=%{buildroot }%{_libdir }:MATGEN
100+ %ctest
86101
87102%files
88103%license License.txt
89- %{_libdir }/libsuperlu.so.%{libver }*
104+ %{_libdir }/libsuperlu.so.7
105+ %{_libdir }/libsuperlu.so.%{version }
90106
91107%files devel
92- %{_includedir }/%{ name }/
108+ %{_includedir }/
93109%{_libdir }/libsuperlu.so
110+ %{_libdir }/cmake/%{genname }/
111+ %{_libdir }/pkgconfig/%{genname }.pc
94112
95113%files doc
114+ %license License.txt
96115%doc DOC EXAMPLE FORTRAN
97116
98117%changelog
118+ * Tue Oct 15 2024 Jyoti Kanase <v-jykanase@microsoft.com> - 7.0.0-1
119+ - Update to 7.0.0
120+ -License verified
121+
99122* Sat Jul 24 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 5.2.1-10
100123- Removing unused BR on "atlas".
101124
0 commit comments