Skip to content

Commit

Permalink
gnupg2: add option to symlink 'gpg' to 'gpg2'
Browse files Browse the repository at this point in the history
So it turns out this is a better way to get bin/gpg, as the
program-transform-name option apparently doesn't touch everything and
results in some functional breakage.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information
jacknagel committed Oct 9, 2011
1 parent ef020e7 commit d7fe613
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions versions/gnupg2.rb
Expand Up @@ -14,18 +14,17 @@ class Gnupg2 < Formula
depends_on 'dirmngr' => :optional

def options
[['--without-suffix', 'Install the program as "gpg" instead of "gpg2"']]
[['--with-gpg-link', 'Create a symlink from "gpg" to "gpg2"']]
end

def install
inreplace 'common/homedir.c', '/var/run', '#{var}/run'

args = ["--prefix=#{prefix}", "--disable-dependency-tracking"]
args << "--program-transform-name='s/gpg2/gpg/'" if ARGV.include? '--without-suffix'

system "./configure", *args
system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"
system "make"
system "make check"
system "make install"

ln_s bin+'gpg2', bin+'gpg' if ARGV.include? '--with-gpg-link'
end
end

0 comments on commit d7fe613

Please sign in to comment.