Minor spec fixes

- Adjustments to build on EPEL 8 with RHEL 8.4+
- Minor cleanup of Source0 and use newer autosetup macro
This commit is contained in:
Neal Gompa 2021-05-22 09:51:56 -04:00
parent 0cc35d3bf0
commit 6e70885b85

View File

@ -1,3 +1,6 @@
# Needed for EPEL8
%undefine __cmake_in_source_build
Name: kokkos
Version: 3.4.00
%global sover 3.4
@ -8,10 +11,10 @@ ExcludeArch: i686 armv7hl
License: BSD
URL: https://github.com/kokkos/kokkos
Source0: https://github.com/kokkos/kokkos/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: cmake3 >= 3.0
BuildRequires: cmake >= 3.16
BuildRequires: hwloc-devel
%global kokkos_desc \
@ -35,10 +38,10 @@ Requires: hwloc-devel
This package contains the development files of %{name}.
%prep
%setup -q
%autosetup -p1
%build
%{cmake3} \
%cmake \
-DKokkos_ENABLE_TESTS=On \
%ifarch ppc64le
-DKokkos_ARCH_POWER8=ON \
@ -50,17 +53,17 @@ This package contains the development files of %{name}.
-DKokkos_ENABLE_SERIAL=ON \
-DKokkos_ENABLE_HWLOC=ON \
%{nil}
%cmake3_build
%cmake_build
%install
%cmake3_install
%cmake_install
%check
# https://github.com/kokkos/kokkos/issues/2959 - unstable test
%ifarch s390x
%global testargs --exclude-regex KokkosCore_UnitTest_StackTraceTest
%endif
%ctest3 %{?testargs}
%ctest %{?testargs}
%files
%doc README.md