aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/perforce-server.rb
diff options
context:
space:
mode:
authorLuke Petre2013-05-08 05:10:05 +0100
committerJack Nagel2013-05-09 17:01:38 -0500
commit1c82a6a184f7aff224dbc98ed88f358e48c4d2cc (patch)
treefe3c560521032b3f4de07b9dc1a610d02d2991b2 /Library/Formula/perforce-server.rb
parente33b2f06b3b6c45ec889f14be38b6b213a3e2e35 (diff)
downloadhomebrew-1c82a6a184f7aff224dbc98ed88f358e48c4d2cc.tar.bz2
perforce-server: add plist
Closes #19673. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula/perforce-server.rb')
-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