require 'formula' class Darner < Formula homepage 'https://github.com/wavii/darner' url 'https://github.com/wavii/darner/tarball/v0.1.4' sha1 '721e31ea843047536fb265eaca70ddc592d14f43' head 'https://github.com/wavii/darner.git' depends_on 'cmake' => :build depends_on 'boost' depends_on 'snappy' depends_on 'leveldb' def install system "cmake", ".", *std_cmake_args system "make install" (var/'darner').mkpath (var/'log/darner').mkpath end def caveats; <<-EOS.undent When started via launchd you'll find the darner log here: open #{var}/log/darner/darner.log EOS end plist_options :manual => "darner" def plist; <<-EOS.undent KeepAlive Label #{plist_name} ProgramArguments #{opt_prefix}/bin/darner -d #{var}/darner RunAtLoad WorkingDirectory #{var} StandardErrorPath #{var}/log/darner/darner.log StandardOutPath #{var}/log/darner/darner.log EOS end end