homebrew-core/Formula/perforce-server.rb
Luke Petre 408349bff9 perforce-server: add plist
Closes Homebrew/homebrew#19673.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-05-09 17:01:38 -05:00

50 lines
1.3 KiB
Ruby

require 'formula'
class PerforceServer < Formula
homepage 'http://www.perforce.com/'
if MacOS.prefer_64_bit?
url 'http://filehost.perforce.com/perforce/r12.2/bin.darwin90x86_64/p4d'
version '2012.2.631250-x86_64'
sha1 '21d5a904321a95026fe65890b9d9cb4043eaf84c'
else
url 'http://filehost.perforce.com/perforce/r12.2/bin.darwin90x86/p4d'
version '2012.2.631250-x86'
sha1 '97fae79520e2801f18600362e24eaee6d47497c0'
end
def install
bin.install 'p4d'
(var+"p4root").mkpath
end
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>ProgramArguments</key>
<array>
<string>#{opt_prefix}/bin/p4d</string>
<string>-p</string>
<string>1666</string>
<string>-r</string>
<string>#{var}/p4root</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>WorkingDirectory</key>
<string>#{var}/p4root</string>
<key>StandardErrorPath</key>
<string>#{var}/log/p4d.log</string>
<key>StandardOutPath</key>
<string>#{var}/log/p4d.log</string>
</dict>
</plist>
EOS
end
end