Reimplement the v2 build process

[merge]