%global commit c1b678e1706cefbdd3b62e311203f3b492a0d17d %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global debug_package %{nil} Name: rocm-clang-ocl Version: 0.3.0 Release: 0.3.20180301git%{shortcommit}%{?dist} Summary: rocm OpenCL wrapper for clang License: NCSA URL: https://github.com/RadeonOpenCompute/clang-ocl Source0: https://github.com/RadeonOpenCompute/clang-ocl/archive/%{commit}/rocm-clang-ocl-%{shortcommit}.tar.gz Patch0: 0001-Build-fixes-for-Fedora-installs.patch BuildRequires: cmake BuildRequires: rocm-cmake BuildRequires: hcc Requires: hcc %{!?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 OpenCL wrapper for clang %prep %autosetup -n clang-ocl-%{commit} -p1 %build mkdir build cd build %cmake .. %install cd build mkdir -p %{buildroot}%{_libexecdir}/hcc/bin install -m 0755 clang-ocl %{buildroot}%{_libexecdir}/hcc/bin %files %doc README.md %{_libexecdir}/hcc/bin/clang-ocl %changelog * Fri Mar 09 2018 Tom Stellard - 0.3.0-0.3.20180301gitc1b678e - Add epel support * Fri Mar 02 2018 Tom Stellard - 0.3.0-0.2.20180301gitc1b678e - Add Requires: hcc * Fri Mar 02 2018 Tom Stellard - 0.3.0-0.1.20180301gitc1b678e - 0.3.0 snapshot