Backported buildscript

Nothing else.