diff options
| author | Xu Cheng | 2015-01-18 21:57:54 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-22 17:15:29 +0100 |
| commit | dd5ba29d3e98accc15f20b4fea3ea676f9aabafe (patch) | |
| tree | 1e3fff3604c66a252a2e0161a8f5c6c25e9300dd | |
| parent | 58d34ff32e0f6ad26339f9c52251934bc141a652 (diff) | |
| download | homebrew-dd5ba29d3e98accc15f20b4fea3ea676f9aabafe.tar.bz2 | |
pius: modernize and add caveats and test
Closes #35996.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Formula/pius.rb | 44 |
1 files changed, 18 insertions, 26 deletions
diff --git a/Library/Formula/pius.rb b/Library/Formula/pius.rb index c906a7d5b..07151e263 100644 --- a/Library/Formula/pius.rb +++ b/Library/Formula/pius.rb @@ -1,34 +1,26 @@ -require 'formula' -class GnupgInstalled < Requirement - fatal true - - satisfy { which('gpg') || which('gpg2') } +class Pius < Formula + homepage "http://www.phildev.net/pius/" + url "https://downloads.sourceforge.net/project/pgpius/pius/2.0.11/pius-2.0.11.tar.bz2" + sha1 "0c9b74f271bf195d8636d8406fbb56cc024195ad" - def message; <<-EOS.undent - Gnupg is required to use these tools. + depends_on :gpg - You can install Gnupg or Gnupg2 with Homebrew: - brew install gnupg - brew install gnupg2 + def install + # Replace hardcoded gpg path: https://sourceforge.net/p/pgpius/bugs/12/ + inreplace "pius", "/usr/bin/gpg", HOMEBREW_PREFIX/"bin/gpg" + bin.install "pius" + bin.install "pius-keyring-mgr" + bin.install "pius-party-worksheet" + end - Or you can use one of several different - prepackaged installers that are available. + def caveats; <<-EOS.undent + The gpg path is hardcoded in pius. You can specific your own gpg path + by adding follow line into ~/.pius file: + gpg-path=/path/to/gpg EOS end -end -class Pius < Formula - homepage 'http://www.phildev.net/pius/' - url 'https://downloads.sourceforge.net/project/pgpius/pius/2.0.11/pius-2.0.11.tar.bz2' - sha1 '0c9b74f271bf195d8636d8406fbb56cc024195ad' - - depends_on GnupgInstalled - - def install - # Replace hardcoded gpg path: https://sourceforge.net/p/pgpius/bugs/12/ - inreplace 'pius', '/usr/bin/gpg', HOMEBREW_PREFIX/'bin/gpg' - bin.install 'pius' - bin.install 'pius-keyring-mgr' - bin.install 'pius-party-worksheet' + test do + system "#{bin}/pius", "-T" end end |
