Fix SRCINFO output for nginx dependency
Change the package() function to generate dynamic data only when in the build environment.
When generating SRCINFO files, we are not in the same environment as when creating the package file.
Relying on dynamically generated data has unwanted side-effects (e.g. a broken keyword definition depends = nginx=
).