localbuild setup

Replaces pull #206 that got closed