First make sure you have a filestructure that fits for your need. I usually use the OEBPS structure (see
jedisaber for more details).
Get Info-zip (also mentioned in the link above). After you're book is complete, first zip the mimetype into a zip file uncompressed. After that, add the rest of the files to the zip.
I do not know the command options by heart, will try to look them up tonight.
I also remember reading that just zip everything up and drop it in Calibre will take care of it also. Could try that.