The build environment requires a case sensitive volume.
I don't have one on my computer.
The next best thing would be to have a temp volume for that.
What better option than to use a RAM drive, formatted as a case sensitive volume?
Here's the script.
It installs the required homebrew packages, mounts the volume, runs the package build script, copies the DMG file and then ejects the RAM drive.
Works for me one macOS Sequoia 15.6, Apple Silicon.
Hope you find it useful.
https://gist.github.com/moshegottlieb/b21fa414c2f3d5c992c1a1bc9ed5d1e6
Thank you, a nice idea to reduce SSD wear. BTW, I am surprised that 3 GiB suffice.
Just one detail: the source tree doesn't have to reside on a case-sensitive filesystem. Only the build root must be case-sensitive. Additionally, the build root doesn't need to be inside the top source directory, this is neither required nor recommended. Therefore repeated cloning on each build can be avoided.
I started out with a 6gb volume for testing, and found that 3gb is enough for the time being.
I know the source directory doesn't have to be case sensitive, it's just a script for me to build the latest, everyone should adjust to their own need, including replacing the ARM specific build as appropriate.