# Part of ROCM Stack, see rocm-llvm for build order # rocm-cmake # rocm-llvm # rocm-runtime # rocm-core # rocminfo # rocm-amd-opencl #Build Time of this package ~ 0 minutes 31 seconds %global rocm_release 6.4 %global rocm_patch 3 %global rocm_version %{rocm_release}.%{rocm_patch} Name: rocminfo #The numeric version is necesary for the package-source.sh script Version: 6.4.3 Release: %mkrel 1 Summary: ROCm system info utility Group: System/Configuration License: NCSA URL: https://github.com/ROCm/rocminfo #Run the package-source.sh script from the SPECS folder #and move the tarball to SOURCES folder Source0: rocminfo-rocm-%{version}.tar.xz Source1: package-source.sh #From Fedora Patch0: 0001-adjust-CMAKE_CXX_FLAGS.patch Patch1: remove-wflags.patch #aarch64 might be useful but neither ROCm-OpenCL nor HIP support it #If the above is true we must build all the stack just for x86_64? ExclusiveArch: x86_64 aarch64 BuildRequires: cmake BuildRequires: python3-devel BuildRequires: rocm%{rocm_release}-macros #BuildRequires: rocm%{rocm_release}-cmake = %{version} BuildRequires: %{_lib}rocm%{rocm_release}-runtime-devel = %{version} BuildRequires: rocm%{rocm_release}-lld BuildRequires: rocm%{rocm_release}-llvm-devel BuildRequires: rocm%{rocm_release}-clang-devel %description ROCm Application for Reporting System Info %package -n rocm%{rocm_release}-rocminfo Summary: ROCm system info utility # rocminfo calls lsmod to check the kernel mode driver status Requires: kmod Requires: pciutils Requires: %{_lib}rocm%{rocm_release}-runtime = %{version} %description -n rocm%{rocm_release}-rocminfo ROCm Application for Reporting System Info %prep %autosetup -n %{name}-rocm-%{version} -p1 %{__python3} %{_rpmconfigdir}/redhat/pathfix.py -i %{__python3} rocm_agent_enumerator # Fix build unrecognized command-line option '-m64' %ifarch aarch64 sed -i "/m64/d" CMakeLists.txt %endif %build %cmake \ -B build \ -S "." \ -DROCRTST_BLD_TYPE=Release \ -DROCM_PATH=%{rocm_prefix} \ -DCMAKE_INSTALL_PREFIX=%{rocm_prefix} \ -DCMAKE_AR=%rocmllvm_bindir/llvm-ar \ -DCMAKE_C_COMPILER=%rocmllvm_bindir/clang \ -DCMAKE_CXX_COMPILER=%rocmllvm_bindir/clang++ \ -DCMAKE_LINKER=%rocmllvm_bindir/ld.lld \ -DCMAKE_RANLIB=%rocmllvm_bindir/llvm-ranlib \ -DCMAKE_PREFIX_PATH=%{rocmllvm_cmakedir}/.. %cmake_build %install %cmake_install rm -rf %{buildroot}/%{rocm_prefix}/share/doc/rocminfo/License.txt %files -n rocm%{rocm_release}-rocminfo %doc README.md %license License.txt %{rocm_prefix}/bin/rocm_agent_enumerator %{rocm_prefix}/bin/rocminfo