You can use the "subformula". You stick to this class definition in the Nginx formula file:
class NginxUploadModule < Formula
url 'http://www.grid.net.ru/nginx/download/nginx_upload_module-2.2.0.tar.gz'
md5 '2681a6167551830a23336fa41bc539a1'
end
and then in installthe Nginx formula method you will do something like
NginxUploadModule.new.brew do
(buildpath/'where/you/want/the/files').install Dir['*']
end
adjust the path accordingly.
There are several examples of this in the Homebrew base repository; grepping for "new.brew" should give you a lot.
source
share