aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/dynamips.rb
blob: 6c73f592123482cee98e75561cf9c4a0f2853a0d (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
require 'formula'

class Dynamips < Formula
  homepage 'http://www.gns3.net/dynamips/'
  url 'http://downloads.sourceforge.net/project/gns-3/Dynamips/0.2.8-RC3-community/dynamips-0.2.8-RC3-community.tar.gz'
  sha1 'ed7138859e6bc381ae0cf0d2620b32099845847c'
  version '0.2.8-RC3'

  depends_on 'libelf'

  def install
    # Install man pages to the standard Homebrew location
    inreplace 'Makefile' do |s|
      s.gsub! %r|\$\(DESTDIR\)/man|, man
    end

    arch = Hardware.is_64_bit? ? 'amd64' : 'x86'

    ENV.j1
    system "make", "DYNAMIPS_CODE=stable",
                   "DYNAMIPS_ARCH=#{arch}",
                   "DESTDIR=#{prefix}",
                   "install"
  end
end