2013-10-11 08:01:23 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Clipper < Formula
|
|
|
|
homepage 'https://wincent.com/products/clipper'
|
2013-11-03 03:33:29 +00:00
|
|
|
url 'https://github.com/wincent/clipper/archive/0.2.zip'
|
|
|
|
sha1 'dbc037d4d60b73ff0f99959adb0c3a94a45761cd'
|
2013-10-11 08:01:23 +00:00
|
|
|
|
|
|
|
depends_on 'go' => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV['GOPATH'] = buildpath
|
|
|
|
system 'go', 'build', 'clipper.go'
|
|
|
|
bin.install 'clipper'
|
|
|
|
end
|
|
|
|
|
|
|
|
plist_options :manual => 'clipper'
|
|
|
|
|
|
|
|
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>Label</key>
|
|
|
|
<string>#{plist_name}</string>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
<key>KeepAlive</key>
|
|
|
|
<true/>
|
|
|
|
<key>WorkingDirectory</key>
|
|
|
|
<string>#{HOMEBREW_PREFIX}</string>
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
|
|
|
<string>#{opt_prefix}/bin/clipper</string>
|
|
|
|
<string>--address</string>
|
|
|
|
<string>127.0.0.1</string>
|
|
|
|
<string>--port</string>
|
|
|
|
<string>8377</string>
|
|
|
|
</array>
|
2013-11-03 03:33:29 +00:00
|
|
|
<key>EnvironmentVariables</key>
|
|
|
|
<dict>
|
|
|
|
<key>LANG</key>
|
|
|
|
<string>en_US.UTF-8</string>
|
|
|
|
</dict>
|
2013-10-11 08:01:23 +00:00
|
|
|
</dict>
|
|
|
|
</plist>
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|