Export more build-related env for hooks
Pass stats into 'run_hook bulk done'
Use PACKAGES for packages directory