aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/yaws.rb
blob: 902b9b7677f6b1a3e1600f6f646ff7e4f9c68cb4 (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
require 'formula'

class Yaws < Formula
  homepage 'http://yaws.hyber.org'
  url 'http://yaws.hyber.org/download/yaws-1.90.tar.gz'
  md5 'c2aae5a4e01ad47d44955551c9a67333'

  depends_on 'erlang'

  def options
    [["--with-yapp", "Build and install yaws applications"]]
  end

  def install
    Dir.chdir 'yaws' do
      system "./configure", "--prefix=#{prefix}"
      system "make install"

      if ARGV.include? '--with-yapp'
        Dir.chdir 'applications/yapp' do
          system "make"
          system "make install"
        end
      end
    end
  end

  def caveats; <<-EOS.undent
    Usually you want to build yapp (yaws applications) as well.
    To do so, use:
      brew install yaws --with-yapp
    EOS
  end
end