aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorRyan T. Dean2015-03-12 00:33:02 -0700
committerMike McQuaid2015-03-12 12:18:30 +0000
commit65457c4a825060e4014ebe6606bb4689c0052625 (patch)
tree33a8e2b987fdf258cbea29a7a142394b7141e559 /Library
parent7bdb551906fa5c697d07ddabfd8dbdc9b7c86621 (diff)
downloadhomebrew-65457c4a825060e4014ebe6606bb4689c0052625.tar.bz2
gpg-agent: add plist
add plist to enable gpg-agent as a launch agent. Closes #37628. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/gpg-agent.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/Library/Formula/gpg-agent.rb b/Library/Formula/gpg-agent.rb
index eec6be840..517b465a9 100644
--- a/Library/Formula/gpg-agent.rb
+++ b/Library/Formula/gpg-agent.rb
@@ -33,9 +33,41 @@ class GpgAgent < Formula
system "make", "install"
end
+ def caveats; <<-EOS.undent
+ Remember to set a graphical pinentry program (such as pinentry-mac) in your
+ ~/.gnupg/gpg-agent.conf if you configure launchd to start gpg-agent at login.
+ EOS
+ end
+
test do
system "#{bin}/gpg-agent", "--help"
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>/bin/sh</string>
+ <string>-c</string>
+ <string>#{opt_prefix}/bin/gpg-agent -c --daemon | /bin/launchctl</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+ <key>StandardErrorPath</key>
+ <string>/dev/null</string>
+ <key>StandardOutPath</key>
+ <string>/dev/null</string>
+ <key>ServiceDescription</key>
+ <string>Run gpg-agent at login</string>
+ </dict>
+ </plist>
+ EOS
+ end
end
__END__