aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/putty.rb
blob: 9c807d72fc00bab4ab560a938abbc88b6f80a764 (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
require 'formula'

class Putty < Formula
  homepage 'http://www.chiark.greenend.org.uk/~sgtatham/putty/'
  url 'http://the.earth.li/~sgtatham/putty/0.62/putty-0.62.tar.gz'
  sha1 '5898438614117ee7e3704fc3f30a3c4bf2041380'

  depends_on 'pkg-config' => :build
  depends_on 'gtk+' => :optional

  def install
    cd "unix" do
      system "./configure", "--prefix=#{prefix}", "--disable-gtktest"
      system "make", "VER=-DRELEASE=#{version}",
                     (build.with?('gtk+') ? "all" : "all-cli")

      bin.install %w{ putty puttytel pterm } if build.with? 'gtk+'
      bin.install %w{ plink pscp psftp puttygen }
    end

    cd "doc" do
      man1.install %w{ putty.1 puttytel.1 pterm.1 } if build.with? 'gtk+'
      man1.install %w{ plink.1 pscp.1 psftp.1 puttygen.1 }
    end
  end
end