aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/halibut.rb
blob: 3f5d28779c2bf457fa1abdf816784dbb551c9fda (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
class Halibut < Formula
  homepage "http://www.chiark.greenend.org.uk/~sgtatham/halibut/"
  url "http://www.chiark.greenend.org.uk/~sgtatham/halibut/halibut-1.1.tar.gz"
  sha256 "b964950d11ed09d3af28ac095da539613f6e50d650f01fe72b4ae752724c80a0"

  head "git://git.tartarus.org/simon/halibut.git"

  bottle do
    cellar :any
    revision 1
    sha1 "27a4552810abd6b9df1cf35d4f9b6b450de08dc9" => :yosemite
    sha1 "bfc2c0ca0bea4953fc0beea4f6dd009617b72f89" => :mavericks
    sha1 "8cfc5a662b31be69a88f92dd492c005db936e21e" => :mountain_lion
  end

  def install
    bin.mkpath
    man1.mkpath

    system "make", "prefix=#{prefix}", "mandir=#{man}", "all"
    system "make", "-C", "doc", "prefix=#{prefix}", "mandir=#{man}"
    system "make", "prefix=#{prefix}", "mandir=#{man}", "install"
  end

  test do
    (testpath/"sample.but").write("Hello, world!")
    system "#{bin}/halibut", "--html=sample.html", "sample.but"

    assert_match("<p>\nHello, world!\n<\/p>",
                 (testpath/"sample.html").read)
  end
end