Add script for building packages from tarball or git checkout