[#1548] use generic build script, eventually a submodule if possible