class Pincaster < Formula desc "Nosql database with a HTTP/JSON interface" homepage "https://github.com/jedisct1/Pincaster" url "http://download.pureftpd.org/pincaster/releases/pincaster-0.6.tar.bz2" sha256 "c88be055ecf357b50b965afe70b5fc15dff295fbe2b6f0c473cf7e4a795a9f97" def install system "./configure", "--prefix=#{prefix}" system "make", "install" inreplace "pincaster.conf" do |s| s.gsub! "/var/db/pincaster/pincaster.db", "#{var}/db/pincaster/pincaster.db" s.gsub! "# LogFileName /tmp/pincaster.log", "LogFileName #{var}/log/pincaster.log" end etc.install "pincaster.conf" (var+"db/pincaster/").mkpath end plist_options :manual => "pincaster #{HOMEBREW_PREFIX}/etc/pincaster.conf" def plist; <<-EOS.undent KeepAlive Label #{plist_name} ProgramArguments #{opt_bin}/pincaster #{etc}/pincaster.conf RunAtLoad WorkingDirectory #{var} StandardErrorPath #{var}/log/pincaster.log StandardOutPath #{var}/log/pincaster.log EOS end end