%global upstreamname rocDecode %global rocm_release 6.2 %global rocm_patch 0 %global rocm_version %{rocm_release}.%{rocm_patch} %global toolchain rocm # hipcc does not support some clang flags %global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong/-Xarch_host -fstack-protector-strong/' -e 's/-fcf-protection/-Xarch_host -fcf-protection/') Name: rocdecode Version: %{rocm_version} Release: %autorelease Summary: High-performance video decode SDK for AMD GPUs Url: https://github.com/ROCm/rocDecode License: MIT and BSD Source0: %{url}/archive/refs/tags/rocm-%{version}.tar.gz#/%{upstreamname}-%{version}.tar.gz Patch0: 0001-Allow-overriding-CMAKE_CXX_COMPILER.patch BuildRequires: cmake BuildRequires: libva-devel BuildRequires: rocm-cmake BuildRequires: rocm-comgr-devel BuildRequires: rocm-hip-devel BuildRequires: rocm-runtime-devel BuildRequires: rocm-rpm-macros # Rocdecode isn't useful without AMD's mesa va drivers: Requires: mesa-va-drivers # Only x86_64 works right now: ExclusiveArch: x86_64 %description rocDecode is a high-performance video decode SDK for AMD GPUs. Using the rocDecode API, you can access the video decoding features available on your GPU. %package devel Summary: The rocDecode development package Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The rocDecode development package. %prep %autosetup -p1 -n %{upstreamname}-rocm-%{version} %build %cmake \ -DCMAKE_CXX_COMPILER=hipcc \ -DCMAKE_INSTALL_LIBDIR=%{_lib} %cmake_build %install %cmake_install %files %license /usr/share/doc/%{name}/LICENSE %exclude /usr/share/doc/%{name}-*/LICENSE %dir %{_docdir}/%{name} %{_libdir}/lib%{name}.so.0{,.*} %files devel %{_libdir}/lib%{name}.so %{_includedir}/%{name} %{_datadir}/%{name} %changelog %autochangelog