2012-02-04 03:06:41 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class PerforceProxy < Formula
|
|
|
|
homepage 'http://www.perforce.com/'
|
2012-05-21 20:06:23 +00:00
|
|
|
|
|
|
|
if MacOS.prefer_64_bit?
|
2012-11-05 17:45:51 +00:00
|
|
|
url 'http://filehost.perforce.com/perforce/r12.2/bin.darwin90x86_64/p4p'
|
2012-11-13 20:04:40 +00:00
|
|
|
version '2012.2.551823-x86_64'
|
|
|
|
sha1 '7acece4dfafa72df8f71138b9e9965fe241dfa35'
|
2012-05-21 20:06:23 +00:00
|
|
|
else
|
2012-11-05 17:45:51 +00:00
|
|
|
url 'http://filehost.perforce.com/perforce/r12.2/bin.darwin90x86/p4p'
|
2012-11-13 20:04:40 +00:00
|
|
|
version '2012.2.551823-x86'
|
|
|
|
sha1 '8161e83bc4c55061bd73876331823c2f8e44da8e'
|
2012-05-21 20:06:23 +00:00
|
|
|
end
|
2012-02-04 03:06:41 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
sbin.install 'p4p'
|
|
|
|
(var+"p4p").mkpath
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
To use the Perforce proxy to access your Perforce server, set your P4PORT
|
|
|
|
environment variable to "localhost:1666".
|
|
|
|
|
|
|
|
Before starting the proxy server, you probably need to edit the plist to use
|
|
|
|
the correct host and port for your Perforce server (replacing the default
|
|
|
|
perforce:1666).
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2012-11-25 15:06:41 +00:00
|
|
|
def plist; <<-EOS.undent
|
2012-02-04 03:06:41 +00:00
|
|
|
<?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>
|
2012-11-25 15:06:41 +00:00
|
|
|
<string>#{opt_prefix}/sbin/p4p</string>
|
2012-02-04 03:06:41 +00:00
|
|
|
<string>-p</string>
|
|
|
|
<string>1666</string>
|
|
|
|
<string>-r</string>
|
|
|
|
<string>#{var}/p4p</string>
|
|
|
|
<string>-t</string>
|
|
|
|
<string>perforce:1666</string>
|
|
|
|
</array>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
<key>KeepAlive</key>
|
|
|
|
<true/>
|
|
|
|
<key>UserName</key>
|
|
|
|
<string>#{`whoami`.chomp}</string>
|
|
|
|
<key>WorkingDirectory</key>
|
|
|
|
<string>#{var}/p4p</string>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
2012-11-25 15:06:41 +00:00
|
|
|
EOS
|
2012-02-04 03:06:41 +00:00
|
|
|
end
|
|
|
|
end
|