What I used when I started with ePUB: http://www.jedisaber.com/eBooks/tutorial.asp
And little by little I've added some tweaks to my ePUB files. You can unzip one of them ("The Prince and the Pauper" is a good one, since it has embedded fonts too) and see how it's done. They are all hand-written, so everything there is is there because I added it (not because it's the default of some program).
The only thing missing is creating the final zip file. I pack the mimetype file without compression (zip mybook.epub -0 mimetype) and then add the rest of the files (zip mybook.epub -rDX9 META-INF OEPBS).