You can move the metadata.db from LIBRARY_DIR into CalibreMetadata/ -- that should do it.
You are supposed to copy the contents of /opt/calibre into the BIN_DIR, of course.
On second thought, that is a good point, all these titlecased directories are copied verbatim from the batch script, where it is customary to title/uppercase things I believe.
...
OK, fixed. Now it will even print out the command to install the binaries in the right portable location (only if it couldn't find any).