After exploring options similar to you, my process for the METAscripta project was to build a custom PHP script that interfaced with a SQL database. I'd like to find time to generalize this and share it with the community, as I was unable to find a LAMP-stack solution at the time I was researching. My script currently only generates 2.1 spec manifests, but we are looking at updating the generation code to produce 3.0 spec over the summer.
Table #1
Image sizes and filenames which fill in the canvas/sequence portion of each manifest
The data comes from batch running ImageMagick command line tool "identify" across all image directories, then gets cleaned up and imported into an image size table that stores filename, width, and height.
Table #2
Item metadata
As long as you can get your metadata into a row format, you can then create a corresponding SQL table from CSV, Excel, Omeka export, etc.
Image server / repository
All of our images are stored in a single S3 bucket, which the Cantaloupe image server points to. So the server base and directory path is known and appended to the filenames stored in table #1.
PHP script
Constructs the shell of the manifest
Populates the metadata portion of the manifest
Generates the image sequence portion of the manifest (this is the complicated part)
I found no good way around needing a middleware layer with a "copy" of item metadata. But, we are now considering our Omeka records as the "display copy" and the SQL tables as the authoritative source.
-- Ben Bakelaar