2012-08-27 06:55:31 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Darner < Formula
|
|
|
|
homepage 'https://github.com/wavii/darner'
|
2013-03-29 01:03:20 +00:00
|
|
|
url 'https://github.com/wavii/darner/archive/v0.1.4.tar.gz'
|
|
|
|
sha1 '3ed9df0db551243cc0811e525cc3b604203fd53a'
|
2012-08-27 06:55:31 +00:00
|
|
|
|
|
|
|
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"
|
2012-11-26 13:25:34 +00:00
|
|
|
|
|
|
|
(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
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
<plist version="1.0">
|
|
|
|
<dict>
|
|
|
|
<key>KeepAlive</key>
|
|
|
|
<true/>
|
|
|
|
<key>Label</key>
|
|
|
|
<string>#{plist_name}</string>
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
|
|
|
<string>#{opt_prefix}/bin/darner</string>
|
|
|
|
<string>-d</string>
|
|
|
|
<string>#{var}/darner</string>
|
|
|
|
</array>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
<key>WorkingDirectory</key>
|
|
|
|
<string>#{var}</string>
|
|
|
|
<key>StandardErrorPath</key>
|
|
|
|
<string>#{var}/log/darner/darner.log</string>
|
|
|
|
<key>StandardOutPath</key>
|
|
|
|
<string>#{var}/log/darner/darner.log</string>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
|
|
|
EOS
|
2012-08-27 06:55:31 +00:00
|
|
|
end
|
|
|
|
end
|