Initial Formula was setup like this
brew create https://github.com/jkitchin/scimax/archive/refs/heads/master.zip
this created /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/scimax.rb
I moved it to ./Formula/scimax.rb, and have edited it extensively.
See the ./makefile for useful build commands.
I figured out how to get the git repo, working. it requires head, and might make versioning trickier later. Maybe I can do something with tags.
This /usr/local/Cellar/scimax/HEAD-7c147b0
These should be moved to something like ~/.emacs.d/scimax or ~/.config/scimax, or some user-defined space (I guess by env-var?).
https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap
Check out https://github.com/d12frosted/homebrew-emacs-plus
especially https://github.com/d12frosted/homebrew-emacs-plus/blob/master/build (a build script)
https://github.com/d12frosted/homebrew-emacs-plus/blob/master/Formula/emacs-plus%4028.rb
brew --repository
brew variables https://docs.brew.sh/Formula-Cookbook#variables-for-directory-locations