2011-03-10 05:11:03 +00:00
|
|
|
class Gnupg < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "GNU Pretty Good Privacy (PGP) package"
|
2015-02-27 20:37:37 +00:00
|
|
|
homepage "https://www.gnupg.org/"
|
2015-11-08 22:32:28 +00:00
|
|
|
url "https://gnupg.org/ftp/gcrypt/gnupg/gnupg-1.4.19.tar.bz2"
|
2015-04-09 12:35:19 +00:00
|
|
|
mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.19.tar.bz2"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "7f09319d044b0f6ee71fe3587bb873be701723ac0952cff5069046a78de8fd86"
|
2010-11-01 18:26:00 +00:00
|
|
|
|
2014-02-22 22:42:59 +00:00
|
|
|
bottle do
|
2015-09-13 10:03:54 +00:00
|
|
|
sha256 "eba128a335d51a62017be92586669cacbf80ed88c77fe61ba2b85bce855ae6f1" => :el_capitan
|
2015-11-19 15:45:31 +00:00
|
|
|
sha256 "a24328a0ca8abc2979328d95cc2a6ea1b6f10877dd62938ae00653047cf03537" => :yosemite
|
|
|
|
sha256 "0532a2034dbb40798975ed7aa3c5b6e3985c6b03c51eb91f8e132e8f2341104c" => :mavericks
|
|
|
|
sha256 "23beb78882a472faff36d237e028b34749da9315b81249beed8b4305bf1d393f" => :mountain_lion
|
2014-02-22 22:42:59 +00:00
|
|
|
end
|
|
|
|
|
2014-10-22 01:27:55 +00:00
|
|
|
depends_on "curl" if MacOS.version <= :mavericks
|
|
|
|
|
2012-10-23 21:32:53 +00:00
|
|
|
def install
|
2010-10-18 17:40:01 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2015-02-27 20:37:37 +00:00
|
|
|
"--disable-silent-rules",
|
2010-07-01 05:02:09 +00:00
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--disable-asm"
|
2014-05-14 00:10:11 +00:00
|
|
|
system "make"
|
2015-01-19 05:55:11 +00:00
|
|
|
system "make", "check"
|
2009-09-01 00:33:33 +00:00
|
|
|
|
2010-07-01 05:02:09 +00:00
|
|
|
# we need to create these directories because the install target has the
|
2009-09-09 14:11:58 +00:00
|
|
|
# dependency order wrong
|
2014-07-01 03:17:58 +00:00
|
|
|
[bin, libexec/"gnupg"].each(&:mkpath)
|
2015-01-19 05:55:11 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"gen-key-script").write <<-EOS.undent
|
|
|
|
Key-Type: RSA
|
|
|
|
Key-Length: 4096
|
|
|
|
Subkey-Type: RSA
|
|
|
|
Subkey-Length: 4096
|
|
|
|
Name-Real: Homebrew Test
|
|
|
|
Name-Email: test@example.com
|
|
|
|
Expire-Date: 0
|
|
|
|
EOS
|
2015-02-27 20:37:37 +00:00
|
|
|
system bin/"gpg", "--batch", "--gen-key", "gen-key-script"
|
2015-01-19 05:55:11 +00:00
|
|
|
(testpath/"test.txt").write ("Hello World!")
|
2015-02-27 20:37:37 +00:00
|
|
|
system bin/"gpg", "--armor", "--sign", "test.txt"
|
|
|
|
system bin/"gpg", "--verify", "test.txt.asc"
|
2009-09-01 00:33:33 +00:00
|
|
|
end
|
|
|
|
end
|