aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorXu Cheng2015-01-18 21:40:51 +0800
committerMike McQuaid2015-01-22 17:15:28 +0100
commit58d34ff32e0f6ad26339f9c52251934bc141a652 (patch)
treedf1d3d99fb7966d81292a1ab608bb5e09b9549d8 /Library/Formula
parent6c5a6e6308e9d0e6658bc45070bb66264972e3a8 (diff)
downloadhomebrew-58d34ff32e0f6ad26339f9c52251934bc141a652.tar.bz2
pass: modernize
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/pass.rb37
1 files changed, 9 insertions, 28 deletions
diff --git a/Library/Formula/pass.rb b/Library/Formula/pass.rb
index 23bf0abc7..255cce4b9 100644
--- a/Library/Formula/pass.rb
+++ b/Library/Formula/pass.rb
@@ -1,26 +1,7 @@
-require 'formula'
-
-class GpgRequirement < Requirement
- fatal true
- default_formula 'gnupg2'
-
- satisfy do
- %w(gpg gpg2).any? { |gpg| which gpg }
- end
-
- def message; <<-EOS.undent
- pass requires GPG to be installed. Please install GPG in one of three ways:
- - Install the gnupg2 package through Homebrew
- - Install the gpgtools package through Homebrew Cask
- - Download and install gpgtools from https://gpgtools.org/
- EOS
- end
-end
-
class Pass < Formula
- homepage 'http://www.passwordstore.org/'
- url 'http://git.zx2c4.com/password-store/snapshot/password-store-1.6.3.tar.xz'
- sha256 'd419d40aa165c1f893e994dd706733374a9db8cf5314124702a061e70e0340f7'
+ homepage "http://www.passwordstore.org/"
+ url "http://git.zx2c4.com/password-store/snapshot/password-store-1.6.3.tar.xz"
+ sha256 "d419d40aa165c1f893e994dd706733374a9db8cf5314124702a061e70e0340f7"
bottle do
cellar :any
@@ -29,15 +10,15 @@ class Pass < Formula
sha1 "289089c797ae46fe7ef93e4755f3847ecd38098c" => :lion
end
- head 'http://git.zx2c4.com/password-store', :using => :git
+ head "http://git.zx2c4.com/password-store", :using => :git
- depends_on 'pwgen'
- depends_on 'tree'
- depends_on 'gnu-getopt'
- depends_on GpgRequirement
+ depends_on "pwgen"
+ depends_on "tree"
+ depends_on "gnu-getopt"
+ depends_on :gpg
def install
- system "make DESTDIR=#{prefix} PREFIX=/ install"
+ system "make", "PREFIX=#{prefix}", "install"
share.install "contrib"
zsh_completion.install "src/completion/pass.zsh-completion" => "_pass"
bash_completion.install "src/completion/pass.bash-completion" => "password-store"