Name: amdgpu-pro-shims Summary: RPM %%provide shims for amdgpu-pro to make it use Mesa libraries License: MIT Version: 1.1.1 Release: 1%{?dist} # libdrm-amdgpu shim Requires: libdrm_amdgpu.so.1()(64bit) Requires: libdrm_radeon.so.1()(64bit) Requires: libdrm.so.2()(64bit) Requires: libdrm%{_isa} Requires: libdrm Provides: libdrm-amdgpu # %description RPM %%provide shims for amdgpu-pro %prep # libdrm-amdgpu shim mkdir -p libdrm-amdgpu %build # libdrm-amdgpu shim pushd libdrm-amdgpu ln -nvfs %{_libdir}/libdrm.so.2.4.0 libdrm.so.2.4.0 ln -nvfs %{_libdir}/libdrm_amdgpu.so.1.0.0 libdrm_amdgpu.so.1.0.0 ln -nvfs %{_libdir}/libdrm_radeon.so.1.0.1 libdrm_radeon.so.1.0.1 ln -nvfs %{_libdir}/libkms.so.1.0.0 libkms.so.1.0.0 ln -nvfs /usr/lib/udev/rules.d/91-drm-modeset.rules 91-amdgpu-pro-modeset.rules ln -nvfs %{_datadir}/doc/libdrm/README.rst README.rst popd %install mkdir -p %{buildroot}/opt/amdgpu # libdrm-amdgpu shim mkdir -p %{buildroot}/%{_prefix}/lib/udev/rules.d mkdir -p %{buildroot}/opt/amdgpu/lib64 mkdir -p %{buildroot}/opt/amdgpu/share/doc/libdrm-amdgpu # copy the symlinks, and then create a soname symlink again cp -avx libdrm-amdgpu/libdrm.so.2.4.0 %{buildroot}/opt/amdgpu/lib64/ ln -nvfs libdrm.so.2.4.0 %{buildroot}/opt/amdgpu/lib64/libdrm.so.2 cp -avx libdrm-amdgpu/libdrm_amdgpu.so.1.0.0 %{buildroot}/opt/amdgpu/lib64/ ln -nvfs libdrm_amdgpu.so.1.0.0 %{buildroot}/opt/amdgpu/lib64/libdrm_amdgpu.so.1 cp -avx libdrm-amdgpu/libdrm_radeon.so.1.0.1 %{buildroot}/opt/amdgpu/lib64/ ln -nvfs libdrm_radeon.so.1.0.1 %{buildroot}/opt/amdgpu/lib64/libdrm_radeon.so.1 cp -avx libdrm-amdgpu/libkms.so.1.0.0 %{buildroot}/opt/amdgpu/lib64/ ln -nvfs libkms.so.1.0.0 %{buildroot}/opt/amdgpu/lib64/libkms.so.1 cp -avx libdrm-amdgpu/README.rst %{buildroot}/opt/amdgpu/share/doc/libdrm-amdgpu/ cp -avx libdrm-amdgpu/91-amdgpu-pro-modeset.rules %{buildroot}/%{_prefix}/lib/udev/rules.d/ %post /sbin/ldconfig %postun /sbin/ldconfig %files # libdrm-amdgpu shim /opt/amdgpu/lib64/libdrm.so* /opt/amdgpu/lib64/libdrm_amdgpu.so* /opt/amdgpu/lib64/libdrm_radeon.so* /opt/amdgpu/lib64/libkms.so* %{_prefix}/lib/udev/rules.d/91-amdgpu-pro-modeset.rules %dir /opt/amdgpu/share/doc/libdrm-amdgpu /opt/amdgpu/share/doc/libdrm-amdgpu/README.rst