require 'formula' class Nexus < Formula homepage 'http://www.sonatype.org/' url 'http://download.sonatype.com/nexus/oss/nexus-2.3.1-01-bundle.tar.gz' version '2.3.1-01' sha1 'f064052500223e7af3e3323b6bc9fb7c047ac0e1' def install rm_f Dir['bin/*.bat'] libexec.install Dir["nexus-#{version}/*"] bin.install_symlink libexec/'bin/nexus' end plist_options :manual => "#{HOMEBREW_PREFIX}/opt/nexus/libexec/bin/nexus { console | start | stop | restart | status | dump }" def plist; <<-EOS.undent Label com.sonatype.nexus ProgramArguments /usr/local/opt/nexus/bin/nexus start RunAtLoad EOS end end