@seph CPack always uses pkgbuild and productbuild to create the final package, the script is simply detecting which calls it is CPack is expecting to be calling... so when it's the productbuild step, the script won't call it, and simply copy the pkg from the previous step