Is it possible to set an env var for the build of a package? I’ve looked into Build Constraints and Build Configuration sections of the manual, but couldn’t find anything related…
Context:
I want to activate nodoc, noudeb and pkg.linux.nosource build profiles for my Debian kernel package as a workaround for disk space constraints. When building locally, this is done by setting DEB_BUILD_PROFILES env var.
The critical feature of build profiles is that activating does not break build reproducibility. Modifying a package obviously will, so it’s not really a good solution in general (if I’m to modify the package, I can as well throw out some parts completely, but that’s not the point).
What I mean is creating a package, whose only duty is adding a file containing the needed export to /etc/profile.d or somewhere appropriate. Then Require: it in the project config.