aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/gnu-tar.rb
blob: 83b3725f43161b7015d1edf4734642852c6143c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'formula'

class GnuTar < Formula
  homepage 'http://www.gnu.org/software/tar/'
  url 'http://ftpmirror.gnu.org/tar/tar-1.27.1.tar.gz'
  mirror 'http://ftp.gnu.org/gnu/tar/tar-1.27.1.tar.gz'
  sha1 '192f480cac95b1fbaff11c87a64f7092045b411b'

  bottle do
    sha1 "ecc6fc62b93bee896a2bd6e604c934bdb9bdc2dd" => :mavericks
    sha1 "ac457284fa432dc49d5f8166c050421cb6561102" => :mountain_lion
    sha1 "33c07152ade47e3b3c7bfa2d66346a0acc5ff3ef" => :lion
  end

  def install
    args = ["--prefix=#{prefix}", "--mandir=#{man}"]
    args << "--program-prefix=g"

    system "./configure", *args
    system "make install"

    # Symlink the executable into libexec/gnubin as "tar"
    (libexec/'gnubin').install_symlink bin/"gtar" => "tar"
  end

  def caveats; <<-EOS.undent
    gnu-tar has been installed as 'gtar'.

    If you really need to use it as 'tar', you can add a 'gnubin' directory
    to your PATH from your bashrc like:

        PATH="#{opt_libexec}/gnubin:$PATH"
    EOS
  end
end