I have been using this build script on Debian Bullseye and targeting Debian Bullseye. The docs should give an up-to-date and supported example.