Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:alsoft:non-free
amdgpupro-opencl-orca
amdgpupro-opencl-orca.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File amdgpupro-opencl-orca.spec of Package amdgpupro-opencl-orca
%define debug_package %{nil} %define AMDGPU_VER 1646757 %define opencl_libdir %{_sysconfdir}/OpenCL/vendors %define warn_on_missing_files 1 %define rel 3 Summary: AMD OpenCL proprietary driver Name: amdgpupro-opencl-orca Version: 23.20 Release: %mkrel -c %{AMDGPU_VER}0 %rel License: Proprietary Group: System/Kernel and hardware URL: https://www.amd.com/en/support/linux-drivers Source1: rocm.gpg.key ExclusiveArch: x86_64 # package fetching Requires(pre): curl Requires: rpm # squidf: to ensure the installation of only one AMD OpenCL driver Conflicts: amdgpupro-opencl-pal Conflicts: rocm-amd-opencl Recommends: clinfo %description It is recommended to try the package rocm-amd-opencl first. If it does not work, this package provides the AMD OpenCL proprietary driver for graphic cards prior Vega generation. Not being able to list all compatible models, a GPU architecture more recent than GCN 2nd generation might be required, with at least OpenCL 2.0 support. Arctic Islands/Polaris series have worked, so far. This package does not contain the AMD OpenCL library itself. The software is automatically downloaded from AMD official website during package installation. Installing this package indicates acceptance of the AMD License Agreement, available at https://www.amd.com/en/support/linux-eula and at %{_defaultlicensedir}/%{name}/AMDGPUPROEULA after installation. %prep %setup -q -c -T %define downurl https://repo.radeon.com/amdgpu/%{version}/amdgpu/rhel/9.2/proprietary/x86_64/opencl-legacy-amdgpu-pro-icd-%{version}-%{AMDGPU_VER}.el9.x86_64.rpm %define tarname amdgpu-pro.rpm %define tmpdir /tmp/%{name} %define file %{tmpdir}/%{tarname} cat > README.%_real_vendor <<EOF This package does not contain the AMD OpenCL library itself. The software is automatically downloaded from AMD official website during package installation. = Be Patient While Downloading... It implies your acceptance of the AMD License Agreement, available at https://www.amd.com/en/support/linux-eula and at %{_defaultlicensedir}/%{name}/AMDGPUPROEULA after installation. EOF %build %install install -m644 README.%_real_vendor README.urpmi install -d -m755 %{buildroot}/%{tmpdir} install -d -m755 %{buildroot}%{opencl_libdir} install -d -m755 %{buildroot}%{_defaultlicensedir}/%{name} install -m644 %{SOURCE1} %{buildroot}%{_defaultlicensedir}/%{name}/rocm.gpg.key install -d -m755 %{buildroot}%{_datadir}/%{name} cat > %{buildroot}%{_datadir}/%{name}/functions << EOF next_file() { FILENUM=\$((FILENUM+1)) eval FILE_SRC="\\\$FILE\${FILENUM}_SRC" eval FILE_DST="\\\$FILE\${FILENUM}_DST" eval FILE_PRM="\\\$FILE\${FILENUM}_PRM" [ -n "\$FILE_SRC" ] } check_sig() { rpmkeys --quiet --dbpath=%{_defaultlicensedir}/%{name} --import %{_defaultlicensedir}/%{name}/rocm.gpg.key (rpmkeys --quiet --dbpath=%{_defaultlicensedir}/%{name} --checksig %{file} || (echo "---AMD package signature check failed---" ; rm -f %{file} ; exit 1)) && echo "Valid signature and Installation can continue" } tar_extract() { extractdir="%tmpdir"/extract mkdir "\$extractdir" if [ -z "\$extractdir" ]; then echo "Error during extraction." >&2 exit 1 fi cd "\$extractdir" || exit 1 rpm2cpio ../%{tarname} | cpio -idmv # Avoid leaving old files in case of failure below FILENUM=0 while next_file; do rm -f "\$FILE_DST" done FILENUM=0 while next_file; do if [ ! -f "\$FILE_SRC" ]; then %if %warn_on_missing_files echo "Warning: \$FILE_SRC not found in the AMDGPUPRO archive," >&2 echo " skipping installation of \$FILE_DST." >&2 echo " Please file a bug report at https://bugs.mageia.org/ ." >&2 %endif continue fi chmod "\$FILE_PRM" "\$FILE_SRC" mv -f "\$FILE_SRC" "\$FILE_DST" done cd ../.. rm -rf "%{name}" } EOF %pre get_proxy_from_urpmi() { if [ -e /etc/urpmi/proxy.cfg ]; then proxy="$(grep ^http_proxy= /etc/urpmi/proxy.cfg 2>/dev/null)" proxy_user="$(grep ^proxy_user= /etc/urpmi/proxy.cfg 2>/dev/null)" proxy="${proxy#http_proxy=}" proxy_user="${proxy_user#proxy_user=}" [ -n "$proxy" ] && echo "--proxy $proxy" [ -n "$proxy_user" ] && echo "--proxy-user $proxy_user" fi } URL="%{downurl}" install -d -m 0755 /tmp/%{name} echo "" echo "###############################################################################" echo "Note that by downloading the AMD OpenCL library you indicate your acceptance of" echo "the AMD License Agreement, available at https://www.amd.com/en/support/linux-eula" echo "###############################################################################" if [ -z "$URL" ]; then echo "Error: Unable to download library. This is likely due to this package" >&2 echo " Please file a bug report at https://bugs.mageia.org" >&2 echo " so that the package gets updated. Thank you." >&2 rm -f "%file" [ "$(ls -A "/tmp/%{name}")" ] && rm -rf "/tmp/%{name}" [[ -n $DURING_INSTALL ]] && exit 0 || exit 1 fi echo "Downloading from $URL. Be patient...." curl --connect-timeout 20 -m 10800 -L $(get_proxy_from_urpmi) "$URL" > "%{file}" %post FILE1_SRC="opt/amdgpu-pro/%{_lib}/libamdocl-orca64.so" FILE1_DST="%{_libdir}/libamdocl-orca64.so" FILE1_PRM="0755" FILE2_SRC="opt/amdgpu-pro/share/licenses/opencl-legacy-amdgpu-pro-icd/AMDGPUPROEULA" FILE2_DST="%{_defaultlicensedir}/%{name}/AMDGPUPROEULA" FILE2_PRM="0644" FILE3_SRC="etc/OpenCL/vendors/amdocl-orca64.icd" FILE3_DST="%{opencl_libdir}/amdocl-orca64.icd" FILE3_PRM="0644" FILE4_SRC= echo "" . %{_datadir}/%{name}/functions echo "Check downloaded package signature...." check_sig echo "Extract libraries" tar_extract #apply configuration echo "Run ldconfig" ldconfig #confirm the configuration echo "clinfo -l" clinfo -l %files %doc README.urpmi %dir %{_defaultlicensedir}/%{name} %ghost %{_defaultlicensedir}/%{name}/AMDGPUPROEULA %{_defaultlicensedir}/%{name}/rocm.gpg.key %dir %{_datadir}/%{name} %{_datadir}/%{name}/functions %dir %{_sysconfdir}/OpenCL %dir %{opencl_libdir} %ghost %{opencl_libdir}/amdocl-orca64.icd %ghost %{_libdir}/libamdocl-orca64.so %changelog * Sat Jan 06 2024 squidf <squidf> 23.20-0.16467570.3.mga10 + Revision: 2028287 - Update description - Add conflict with any other AMD OpenCL driver * Sun Dec 24 2023 squidf <squidf> 23.20-0.16467570.1.mga10.nonfree + Revision: 2021033 - Update url for download - Update description to recommend rocm-amd-opencl first * Sat Oct 21 2023 squidf <squidf> 23.20-0.1654522.2.mga10.nonfree + Revision: 1999948 - Add signature check of downloaded package * Thu Oct 12 2023 squidf <squidf> 23.20-0.1654522.1.3.mga10.nonfree + Revision: 1995356 -AMD OpenCL proprietary driver orca
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor