Take Debian's diff Extract the 'Configure' patch Remove any modification to /usr/lib/engines (Debian uses /usr/lib/ssl/engines). Only copy the main arch type section that contains debian-arm debian-mips and so on. The rest causes trouble and is not required. Save the resulting patch file into 'arm/Configure.opts.diff'