First you should read: http://docs.meteor.com/#writingpackages and look at their packages source tree: https://github.com/meteor/meteor/tree/master/packages/ for examples.
Then if you want to publish your package you should package it as atmosphere package, the one-stop shop used by meteorite, more information about it can be found here: https://atmospherejs.com/docs/publishing