fixed pkg building for "spkg", as well as global mfwver variable setup