aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/perforce-server.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/Library/Formula/perforce-server.rb b/Library/Formula/perforce-server.rb
index df7114206..19a905fbf 100644
--- a/Library/Formula/perforce-server.rb
+++ b/Library/Formula/perforce-server.rb
@@ -15,5 +15,36 @@ class PerforceServer < Formula
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