The format is really simple and powerful.
https://github.com/Homebrew/homebrew/blob/master/Library/For...
More complex example:
https://github.com/Homebrew/homebrew/blob/6a72fa26aa49ee5c2b...
Edit:
If that's the only reason you can't use homebrew just, you can just tap another cask with it in there(or whatever they are calling that process).
https://github.com/avalanche123/homebrew-rpmbuild