forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenBLAS.spec
32 lines (26 loc) · 820 Bytes
/
OpenBLAS.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
### RPM external OpenBLAS 0.3.15
## INCLUDE compilation_flags
Source: https://github.com/xianyi/OpenBLAS/archive/v%{realversion}.tar.gz
Patch0: OpenBLAS-fix-dynamic-arch
Patch1: OpenBLAS-disable-tests
# Will be part of future release
%prep
%setup -n %{n}-%{realversion}
%patch0 -p1
%patch1 -p1
%build
# PRESCOTT is a generic x86-64 target https://github.com/xianyi/OpenBLAS/issues/685
%define build_opts FC=gfortran BINARY=64 NUM_THREADS=256 DYNAMIC_ARCH=0 MAKE_NB_JOBS=%{compiling_processes}
%ifarch x86_64
make %{build_opts} TARGET=CORE2
%endif
%ifarch aarch64
make %{build_opts} TARGET=ARMV8 CFLAGS="%{arch_build_flags}"
%endif
%ifarch ppc64le
make %{build_opts} CFLAGS="%{arch_build_flags}"
%endif
%install
make install PREFIX=%i MAKE_NB_JOBS=%{compiling_processes}
%post
%relocateConfigAll lib/cmake *.cmake