core: add script to build the source distribution