Compare commits

3 Commits

Author SHA1 Message Date
30b7395c5d Add Fedora copyright
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-27 16:05:24 -07:00
75986e27a6 Simplify file removal
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-25 15:54:08 -07:00
3ddf6ddd7d Fix build --with check on SUSE
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-19 07:51:26 -07:00

View File

@@ -1,3 +1,24 @@
#
# Copyright Fedora Project Authors.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
%if 0%{?suse_version} %if 0%{?suse_version}
%global rocdecode_name librocdecode0 %global rocdecode_name librocdecode0
%else %else
@@ -38,7 +59,7 @@
Name: %{rocdecode_name} Name: %{rocdecode_name}
Version: %{rocm_version} Version: %{rocm_version}
Release: 6%{?dist} Release: 8%{?dist}
Summary: High-performance video decode SDK for AMD GPUs Summary: High-performance video decode SDK for AMD GPUs
Url: https://github.com/ROCm/rocDecode Url: https://github.com/ROCm/rocDecode
@@ -64,7 +85,7 @@ BuildRequires: libavcodec-devel
BuildRequires: libavformat-devel BuildRequires: libavformat-devel
BuildRequires: libavutil-devel BuildRequires: libavutil-devel
BuildRequires: Mesa-libva BuildRequires: Mesa-libva
%else %else
BuildRequires: ffmpeg-free BuildRequires: ffmpeg-free
BuildRequires: libavcodec-free-devel BuildRequires: libavcodec-free-devel
BuildRequires: libavformat-free-devel BuildRequires: libavformat-free-devel
@@ -98,8 +119,8 @@ rocDecode API, you can access the video decoding features available on your GPU.
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%package devel %package devel
Summary: The rocDecode development package Summary: The rocDecode development package
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: rocdecode-devel = %{version}-%{release} Provides: rocdecode-devel = %{version}-%{release}
%description devel %description devel
@@ -128,26 +149,18 @@ sed -i -e 's@${LINK_LIBRARY_LIST} ${LIBVA_DRM_LIBRARY}@${LINK_LIBRARY_LIST} ${LI
%build %build
%cmake %{cmake_generator} \ %cmake %{cmake_generator} \
-DCMAKE_CXX_COMPILER=hipcc \ -DCMAKE_CXX_COMPILER=hipcc \
-DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_LIBDIR=%{_lib}
-DROCM_PATH=%{_prefix}
%cmake_build %cmake_build
%install %install
%cmake_install %cmake_install
if [ -f %{buildroot}%{_prefix}/share/doc/rocdecode/LICENSE ]; then rm -f %{buildroot}%{_prefix}/share/doc/rocdecode/LICENSE
rm %{buildroot}%{_prefix}/share/doc/rocdecode/LICENSE rm -f %{buildroot}%{_prefix}/share/doc/rocdecode-asan/LICENSE
fi rm -f %{buildroot}%{_prefix}/share/doc/packages/%{name}/LICENSE
if [ -f %{buildroot}%{_prefix}/share/doc/rocdecode-asan/LICENSE ]; then rm -f %{buildroot}%{_prefix}/share/doc/packages/%{name}-asan/LICENSE
rm %{buildroot}%{_prefix}/share/doc/rocdecode-asan/LICENSE
fi
if [ -f %{buildroot}%{_prefix}/share/doc/packages/%{name}/LICENSE ]; then
rm %{buildroot}%{_prefix}/share/doc/packages/%{name}/LICENSE
fi
if [ -f %{buildroot}%{_prefix}/share/doc/packages/%{name}-asan/LICENSE ]; then
rm %{buildroot}%{_prefix}/share/doc/packages/%{name}-asan/LICENSE
fi
# Need to install the sample first
%if %{with check} %if %{with check}
%check %check
%ctest %ctest
@@ -164,10 +177,15 @@ fi
%exclude %{_datadir}/rocdecode/samples %exclude %{_datadir}/rocdecode/samples
%changelog %changelog
* Wed Aug 27 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.0-8
- Add Fedora copyright
* Mon Aug 25 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.0-7
- Simplify file removal
* Sat Aug 16 2025 Egbert Eich <eich@suse.com> - 6.4.0-6 * Sat Aug 16 2025 Egbert Eich <eich@suse.com> - 6.4.0-6
- Fix dependencies on SUSE when 'check' is enabled. - Fix dependencies on SUSE when 'check' is enabled.
- Set ROCM_PATH.
* Thu Aug 14 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.0-5 * Thu Aug 14 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.0-5
- change --with test to --with check - change --with test to --with check