Skip to content

Instantly share code, notes, and snippets.

@ntalbott
Last active August 29, 2015 14:12
Show Gist options
  • Save ntalbott/44eb145cb29d96975a3d to your computer and use it in GitHub Desktop.
Save ntalbott/44eb145cb29d96975a3d to your computer and use it in GitHub Desktop.
gpgme formula using gpg1
require "formula"
class Gpgme < Formula
homepage "https://www.gnupg.org/related_software/gpgme/"
url "ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.5.1.tar.bz2"
mirror "https://mirrors.kernel.org/debian/pool/main/g/gpgme1.0/gpgme1.0_1.5.1.orig.tar.bz2"
sha1 "a91c258e79acf30ec86a667e07f835e5e79342d8"
depends_on "gnupg"
depends_on "libgpg-error"
depends_on "libassuan"
depends_on "pth"
fails_with :llvm do
build 2334
end
def install
# Check these inreplaces with each release.
# At some point GnuPG will pull the trigger on moving to GPG2 by default.
# inreplace "tests/gpg/Makefile.in", "GPG = gpg", "GPG = gpg2"
# inreplace "src/gpgme-config.in", "@GPG@", "#{Formula["gnupg2"].opt_prefix}/bin/gpg2"
# inreplace "src/gpgme-config.in", "@GPGSM@", "#{Formula["gnupg2"].opt_prefix}/bin/gpgsm"
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--disable-gpgsm-test",
"--enable-static"
system "make"
system "make", "check"
system "make", "install"
end
test do
# assert_equal "#{Formula["gnupg2"].opt_prefix}/bin/gpg2", shell_output("#{bin}/gpgme-config --get-gpg").strip
assert_equal "#{Formula["gnupg"].opt_prefix}/bin/gpg", shell_output("#{bin}/gpgme-config --get-gpg").strip
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment