Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:nuklly
amdgpu-pro-opencl
amdgpu-pro-opencl.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File amdgpu-pro-opencl.spec of Package amdgpu-pro-opencl
%define amdver 2.4.100 %define majorv 20.45 %define releasev 1188099 # amd64 debs %define rocr_deb opencl-rocr-amdgpu-pro_%{majorv}-%{releasev}_amd64.deb %define rocr_dev_deb opencl-rocr-amdgpu-pro-dev_%{majorv}-%{releasev}_amd64.deb %define hip_deb hip-rocr-amdgpu-pro_%{majorv}-%{releasev}_amd64.deb %define hsa_deb hsa-runtime-rocr-amdgpu_1.2.0-%{releasev}_amd64.deb %define hsa_dev_deb hsa-runtime-rocr-amdgpu-dev_1.2.0-%{releasev}_amd64.deb %define hsakmt_deb hsakmt-roct-amdgpu_1.0.9-%{releasev}_amd64.deb %define hsakmt_dev_deb hsakmt-roct-amdgpu-dev_1.0.9-%{releasev}_amd64.deb %define comgr_deb comgr-amdgpu-pro_1.7.0-%{releasev}_amd64.deb %define comgr_dev_deb comgr-amdgpu-pro-dev_1.7.0-%{releasev}_amd64.deb %define orca_deb opencl-orca-amdgpu-pro-icd_%{majorv}-%{releasev}_amd64.deb %define libdrm_deb libdrm-amdgpu-amdgpu1_%{amdver}-%{releasev}_amd64.deb %define libdrm_common_deb libdrm-amdgpu-common_1.0.0-%{releasev}_all.deb %define rocm_deb rocm-device-libs-amdgpu-pro_1.0.0-%{releasev}_amd64.deb # i386 debs %define orca_32bit_deb opencl-orca-amdgpu-pro-icd_%{majorv}-%{releasev}_i386.deb %define libdrm_32bit_deb libdrm-amdgpu-amdgpu1_%{amdver}-%{releasev}_i386.deb Name: amdgpu-pro-opencl Summary: OpenCL userspace driver in amdgpu-pro driver stack Version: %{majorv} Release: %{releasev} # License: https://www.amd.com/en/support/radeon-eula License: SUSE-NonFree URL: https://amdgpu-install.readthedocs.io/en/latest/ Group: System/Libraries Source0: %{name}-%{version}-ubuntu.20.04.tar.xz BuildRequires: fdupes %description The OpenCL userspace driver in the AMD proprietary amdgpu-pro driver stack. It should work with the open-source amdgpu kernel module and Mesa libraries. This is not full amdgpu-pro stack, and does not include proprietary OpenGL and Vulkan implementation. %package devel Summary: Libraries to develop OpenCL in amdgpu-pro driver stack Group: Development/Libraries/Other Requires: amdgpu-pro-opencl == %{majorv} %description devel The OpenCL userspace driver in the AMD proprietary amdgpu-pro driver stack. It should work with the open-source amdgpu kernel module and Mesa libraries. This is not full amdgpu-pro stack, and does not include proprietary OpenGL and Vulkan implementation. This package includes the development files of AMD OpenCL, including header files, libraries, and cmake files. %prep %setup -q -n %{name}-%{version}-ubuntu.20.04 AMDGPU_PRO_DEBS=( %{rocr_deb} %{rocr_dev_deb} %{hip_deb} %{hsa_deb} %{hsa_dev_deb} %{hsakmt_deb} %{hsakmt_dev_deb} %{comgr_deb} %{comgr_dev_deb} %{orca_deb} %{rocm_deb} ) # Unpack all debs except libdrm for deb in "${AMDGPU_PRO_DEBS[@]}"; do ar x $deb tar xJf data.tar.xz done # Unpack libdrm AMDGPU_PRO_DRM_DEBS=( %{libdrm_deb} %{libdrm_common_deb} ) # Unpack libdrm packages mkdir libdrm; pushd libdrm for deb in "${AMDGPU_PRO_DRM_DEBS[@]}"; do ar x ../$deb tar xJf data.tar.xz done %build # rename libdrm_amdgpo.so to libdrm_amdgpo.so pushd libdrm/opt/amdgpu/lib/x86_64-linux-gnu/ rm libdrm_amdgpu.so.1 mv libdrm_amdgpu.so.1.0.0 libdrm_amdgpo.so.1.0.0 ln -s libdrm_amdgpo.so.1.0.0 libdrm_amdgpo.so.1 popd orca_path=$(find . -name "libamdocl-orca64.so") sed -i "s|libdrm_amdgpu|libdrm_amdgpo|g" $orca_path %install # Install the libraries mkdir -p %{buildroot}%{_libdir} AMD_LIBRARIES=( libamdocl64.so libamdhip64.so.1.5.19245 libamdhip64.so.1 libhsa-runtime64.so.1.2.0 libhsa-runtime64.so.1 libhsakmt.so.1.0.6 libhsakmt.so.1 libamd_comgr.so.1.7.0 libamd_comgr.so.1 libamdocl-orca64.so libamdocl12cl64.so libdrm_amdgpo.so.1.0.0 libdrm_amdgpo.so.1 libamdhip64.so libhsa-runtime64.so libamd_comgr.so libhsakmt.so ) # Copy all so files for lib in "${AMD_LIBRARIES[@]}"; do fpath=$(find . -name $lib) mv $fpath %{buildroot}%{_libdir} echo $lib done # copy the headers mkdir -p %{buildroot}%{_includedir} cp -r opt/amdgpu-pro/include/* %{buildroot}%{_includedir} # copy the cmake configs mkdir -p %{buildroot}%{_libdir}/cmake cp -r opt/amdgpu-pro/lib/cmake/* %{buildroot}%{_libdir}/cmake/ cp -r opt/amdgpu-pro/lib/x86_64-linux-gnu/cmake/* %{buildroot}%{_libdir}/cmake/ cp -r opt/amdgpu/lib/x86_64-linux-gnu/cmake/* %{buildroot}%{_libdir}/cmake/ # copy the pkgconfig mkdir -p %{buildroot}%{_datadir}/pkgconfig cp -r opt/amdgpu-pro/lib/x86_64-linux-gnu/pkgconfig/* %{buildroot}%{_datadir}/pkgconfig/ cp -r opt/amdgpu/share/pkgconfig/* %{buildroot}%{_datadir}/pkgconfig/ # copy the /etc/OpenCL/vendors cp -r etc %{buildroot} # copy amdgpu.ids to /opt/amdgpu/share/libdrm install -Dm644 -t %{buildroot}/opt/amdgpu/share/libdrm libdrm/opt/amdgpu/share/libdrm/amdgpu.ids # copy the amdgcn directory mkdir -p %{buildroot}/opt/amdgpu-pro cp -r opt/amdgpu-pro/amdgcn %{buildroot}/opt/amdgpu-pro/ %fdupes %{buildroot}%{_libdir} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %{_libdir}/*.so.* %{_libdir}/*.so %{_sysconfdir}/OpenCL %config %{_sysconfdir}/OpenCL/vendors/amdocl64.icd %config %{_sysconfdir}/OpenCL/vendors/amdocl-orca64.icd /opt/amdgpu /opt/amdgpu-pro %files devel %{_includedir}/* %{_libdir}/cmake %{_datadir}/pkgconfig/* %changelog
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