%global commit ae8c52e5603d2afdcf33a75d9bfe42914541d9be %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global debug_package %{nil} Name: rocm-cmake Version: 0.1 Release: 0.4%{?dist} Summary: rocm cmake modules License: MIT URL: https://github.com/RadeonOpenCompute/rocm-cmake Source0: https://github.com/RadeonOpenCompute/rocm-cmake/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz BuildArch: noarch BuildRequires: cmake %{!?enable_llvmtoolset7: %define enable_llvmtoolset7 %{nil}} %if 0%{?epel} == 7 # We still the original cmake package on epel, because it provides the # %%cmake macro. BuildRequires: cmake3 %global __cmake %{_bindir}/cmake3 %endif %if !0%{?epel} && 0%{?rhel} == 7 BuildRequires: llvm-toolset-7-cmake BuildRequires: llvm-toolset-7-runtime %enable_llvmtoolset7 %global __cmake cmake %endif %description rocm cmake modules %prep %autosetup -n rocm-cmake-%{commit} -p1 %build mkdir build cd build %cmake .. -DCMAKE_INSTALL_PREFIX=%{buildroot}/usr %install cd build cmake --build . --target install mkdir -p %{buildroot}/%{_libdir}/cmake/rocm # Move cmake files to standard location. mv %{buildroot}/%{_datadir}/rocm/cmake/* %{buildroot}%{_libdir}/cmake/rocm %files %doc README.md %{_libdir}/cmake/rocm %changelog * Mon Mar 05 2018 Tom Stellard - 0.1-0.4 - Add epel support * Fri Feb 16 2018 Tom Stellard - 0.1-0.3 - Install cmake files to _libdir/cmake/rocm * Thu Feb 15 2018 Tom Stellard - 0.1-0.2 - Initial version