Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 522a8b219d | |||
| 39b86760c0 |
84
rocjpeg.spec
84
rocjpeg.spec
@@ -1,24 +1,3 @@
|
||||
#
|
||||
# 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}
|
||||
%global rocjpeg_name librocjpeg0
|
||||
%else
|
||||
@@ -59,7 +38,7 @@
|
||||
|
||||
Name: %{rocjpeg_name}
|
||||
Version: %{rocm_version}
|
||||
Release: 9%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: A high-performance jpeg decode library for AMD’s GPUs
|
||||
|
||||
Url: https://github.com/ROCm/rocJPEG
|
||||
@@ -82,7 +61,7 @@ BuildRequires: ffmpeg
|
||||
BuildRequires: libavcodec-devel
|
||||
BuildRequires: libavformat-devel
|
||||
BuildRequires: Mesa-libva
|
||||
%else
|
||||
%else
|
||||
BuildRequires: ffmpeg-free
|
||||
BuildRequires: libavcodec-free-devel
|
||||
BuildRequires: libavformat-free-devel
|
||||
@@ -101,11 +80,7 @@ BuildRequires: ninja
|
||||
%endif
|
||||
|
||||
# Rocjpeg isn't useful without AMD's mesa va drivers:
|
||||
%if 0%{?suse_version}
|
||||
Requires: Mesa-libva
|
||||
%else
|
||||
Requires: mesa-va-drivers
|
||||
%endif
|
||||
Provides: rocjpeg = %{version}-%{release}
|
||||
|
||||
# Only x86_64 works right now:
|
||||
@@ -120,8 +95,8 @@ on your GPU.
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%package devel
|
||||
Summary: The development package for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Summary: The development package for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Provides: rocjpeg-devel = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
@@ -138,12 +113,7 @@ sed -i "s|\(llvm/bin/clang++\)|\1 CACHE STRING \"ROCm Compiler path\"|" CMakeLis
|
||||
sed -i "s|/opt/amdgpu/include NO_DEFAULT_PATH|/usr/include|" cmake/FindLibva.cmake
|
||||
|
||||
# Fix up sample
|
||||
sed -i -e 's@${ROCM_PATH}/lib/llvm/bin/clang++@/usr/bin/hipcc@' samples/*/CMakeLists.txt
|
||||
sed -i -e 's@{ROCM_PATH}/lib@/usr/lib64@' samples/*/CMakeLists.txt test/CMakeLists.txt
|
||||
sed -i -e 's@{ROCM_PATH}/include/rocjpeg@/usr/include/rocjpeg@' samples/*/CMakeLists.txt test/CMakeLists.txt
|
||||
sed -i -e 's@set(ROCM_PATH /opt/rocm@set(__ROCM_PATH /opt/rocm@' samples/*/CMakeLists.txt test/CMakeLists.txt
|
||||
# Fix up test
|
||||
sed -i -e 's@{ROCM_PATH}/share@/usr/share@' test/CMakeLists.txt
|
||||
|
||||
# cpack cruft in the middle of the configure, this breaks TW
|
||||
sed -i -e 's@file(READ "/etc/os-release" OS_RELEASE)@#file(READ "/etc/os-release" OS_RELEASE)@' CMakeLists.txt
|
||||
@@ -159,20 +129,37 @@ sed -i -e 's@${LINK_LIBRARY_LIST} ${LIBVA_DRM_LIBRARY}@${LINK_LIBRARY_LIST} ${LI
|
||||
|
||||
%cmake %{cmake_generator} \
|
||||
-DCMAKE_CXX_COMPILER=hipcc \
|
||||
-DCMAKE_INSTALL_LIBDIR=%{_lib}
|
||||
-DCMAKE_INSTALL_LIBDIR=%{_lib} \
|
||||
-DROCM_PATH=%{_prefix}
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
rm -f %{buildroot}%{_prefix}/share/doc/rocjpeg/LICENSE
|
||||
rm -f %{buildroot}%{_prefix}/share/doc/rocjpeg-asan/LICENSE
|
||||
rm -f %{buildroot}%{_prefix}/share/doc/rocjpeg-dev/LICENSE
|
||||
rm -f %{buildroot}%{_prefix}/share/doc/rocjpeg-test/LICENSE
|
||||
rm -f %{buildroot}%{_prefix}/share/doc/packages/%{name}/LICENSE
|
||||
rm -f %{buildroot}%{_prefix}/share/doc/packages/%{name}-dev/LICENSE
|
||||
rm -f %{buildroot}%{_prefix}/share/doc/packages/%{name}-test/LICENSE
|
||||
rm -f %{buildroot}%{_prefix}/share/doc/packages/%{name}-asan/LICENSE
|
||||
if [ -f %{buildroot}%{_prefix}/share/doc/rocjpeg/LICENSE ]; then
|
||||
rm %{buildroot}%{_prefix}/share/doc/rocjpeg/LICENSE
|
||||
fi
|
||||
if [ -f %{buildroot}%{_prefix}/share/doc/rocjpeg-asan/LICENSE ]; then
|
||||
rm %{buildroot}%{_prefix}/share/doc/rocjpeg-asan/LICENSE
|
||||
fi
|
||||
if [ -f %{buildroot}%{_prefix}/share/doc/rocjpeg-dev/LICENSE ]; then
|
||||
rm %{buildroot}%{_prefix}/share/doc/rocjpeg-dev/LICENSE
|
||||
fi
|
||||
if [ -f %{buildroot}%{_prefix}/share/doc/rocjpeg-test/LICENSE ]; then
|
||||
rm %{buildroot}%{_prefix}/share/doc/rocjpeg-test/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}-dev/LICENSE ]; then
|
||||
rm %{buildroot}%{_prefix}/share/doc/packages/%{name}-dev/LICENSE
|
||||
fi
|
||||
if [ -f %{buildroot}%{_prefix}/share/doc/packages/%{name}-test/LICENSE ]; then
|
||||
rm %{buildroot}%{_prefix}/share/doc/packages/%{name}-test/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 first
|
||||
%if %{with check}
|
||||
@@ -190,15 +177,10 @@ rm -f %{buildroot}%{_prefix}/share/doc/packages/%{name}-asan/LICENSE
|
||||
%{_datadir}/rocjpeg
|
||||
|
||||
%changelog
|
||||
* Wed Aug 27 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.0-9
|
||||
- Add Fedora copyright
|
||||
|
||||
* Mon Aug 25 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.0-8
|
||||
- Simplify file removal
|
||||
|
||||
* Sat Aug 16 2025 Egbert Eich <eich@suse.com> - 6.4.0-7
|
||||
* Sat Aug 15 2025 Egbert Eich <eich@suse.com> - 6.4.0-7
|
||||
- Fix dependencies on SUSE when 'check' is enabled.
|
||||
|
||||
- Set ROCM_PATH instead of patching it.
|
||||
|
||||
* Thu Aug 14 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.0-6
|
||||
- change --with test to --with check
|
||||
|
||||
|
||||
Reference in New Issue
Block a user