To generate a debian from fedora. 1. Prepare the big patch On fedora do > rpmbuild -bp rocclr.spec This will produce something like ~/rpmbuild/BUILD/rocclr-6.4.0-build/clr-rocm-6.4.0/ Go to the dir and untar the original source > cd ~/rpmbuild/BUILD/rocclr-6.4.0-build/ > mkdir a > cd a > tar xf ../../../SOURCES/rocclr-6.4.0.tar.gz Now also untar HIP > cd clr-rocm-6.4.0/ > tar xf ../../../../SOURCES/HIP-6.4.0.tar.gz This is the unmodified source, rename the dir > cd .. > mv clr-rocm-6.4.0 clr-rocm-6.4.0.orig copy the prep-ed source to same dir > cp -r ../clr-rocm-6.4.0 . Make the patch Ingored the removed opencl bits > diff -rup clr-rocm-6.4.0.orig clr-rocm-6.4.0 > patch.diff Copy this patch to debian/patches