spm init and build