An EPUB is just a ZIP container, but using a ZIP tool directly on a directory with content documents won't usually result in a valid EPUB. This is because the standard requires that:
- The mimetype resource must appear as the first file in the container
- The mimetype resource must be uncompressed
So to meet these requirements we must ZIP the files in a special way. This gist describes how to do this with InfoZip (which is the default ZIP tool on most Linux systems).
Let's suppose all content files are in a directory called /home/johan/epubPolicyTests/content/epub20_minimal/
.