2010-10-02 14:59:34 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Putty < Formula
|
2010-10-02 14:59:34 +00:00
|
|
|
homepage 'http://www.chiark.greenend.org.uk/~sgtatham/putty/'
|
2014-05-01 02:07:03 +00:00
|
|
|
head 'svn://svn.tartarus.org/sgt/putty'
|
2013-08-13 04:28:49 +00:00
|
|
|
url 'http://the.earth.li/~sgtatham/putty/0.63/putty-0.63.tar.gz'
|
2013-08-13 08:03:39 +00:00
|
|
|
sha1 '195c0603ef61082b91276faa8d4246ea472bba3b'
|
2010-10-02 14:59:34 +00:00
|
|
|
|
2013-02-10 05:53:28 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2013-02-02 15:58:47 +00:00
|
|
|
depends_on 'gtk+' => :optional
|
|
|
|
|
2014-04-28 23:12:36 +00:00
|
|
|
if build.head?
|
|
|
|
depends_on "halibut" => :build
|
|
|
|
depends_on :automake
|
|
|
|
depends_on :autoconf
|
|
|
|
end
|
|
|
|
|
2010-10-02 14:59:34 +00:00
|
|
|
def install
|
2013-02-02 15:58:47 +00:00
|
|
|
|
2014-04-28 23:12:36 +00:00
|
|
|
if build.head?
|
|
|
|
system "./mkfiles.pl"
|
|
|
|
system "./mkauto.sh"
|
|
|
|
|
|
|
|
cd "doc" do
|
|
|
|
system "make"
|
|
|
|
end
|
2012-03-11 21:51:23 +00:00
|
|
|
end
|
2013-02-02 15:58:47 +00:00
|
|
|
|
2014-04-28 23:12:36 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--disable-gtktest"
|
|
|
|
|
|
|
|
build_version = build.head? ? "svn-#{version}" : version
|
|
|
|
system "make", "VER=-DRELEASE=#{build_version}"
|
|
|
|
|
|
|
|
bin.install %w{ putty puttytel pterm } if build.with? 'gtk+'
|
|
|
|
bin.install %w{ plink pscp psftp puttygen }
|
|
|
|
|
2012-03-11 21:51:23 +00:00
|
|
|
cd "doc" do
|
2013-02-02 15:58:47 +00:00
|
|
|
man1.install %w{ putty.1 puttytel.1 pterm.1 } if build.with? 'gtk+'
|
2012-03-11 21:51:23 +00:00
|
|
|
man1.install %w{ plink.1 pscp.1 psftp.1 puttygen.1 }
|
|
|
|
end
|
2010-10-02 14:59:34 +00:00
|
|
|
end
|
|
|
|
end
|