homebrew-core/Formula/gpgme.rb
2018-04-19 00:04:57 -07:00

36 lines
1.3 KiB
Ruby

class Gpgme < Formula
desc "Library access to GnuPG"
homepage "https://www.gnupg.org/related_software/gpgme/"
url "https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.11.0.tar.bz2"
mirror "https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/gpgme/gpgme-1.11.0.tar.bz2"
sha256 "5b03adbafadab74474ded30b74c882de28d3c5c3b9ee3016ef24023d4c35d492"
bottle do
cellar :any
sha256 "c1861b16662ef573f7b03eb805a72ec6273190e145bf4bf7a8d1ad00d073af63" => :high_sierra
sha256 "06ed9f78cf26c74a86bcc893a253d44d196095c97bac8e242cbd2f10dca7966c" => :sierra
sha256 "fc47b92bce0b95574c97f0edfe3c8852507189cf734cd15f35c9d1ec1f0fca84" => :el_capitan
end
depends_on "swig" => :build
depends_on "gnupg"
depends_on "libgpg-error"
depends_on "libassuan"
def install
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--enable-static"
system "make"
system "make", "install"
# avoid triggering mandatory rebuilds of software that hard-codes this path
inreplace bin/"gpgme-config", prefix, opt_prefix
end
test do
assert_match version.to_s, shell_output("#{bin}/gpgme-tool --lib-version")
system "python2.7", "-c", "import gpg; print gpg.version.versionstr"
end
end