aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/kyoto-tycoon.rb
blob: cc61d72812d78819aecfacc6e725b5c58ef4d7ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'formula'

class KyotoTycoon < Formula
  homepage 'http://fallabs.com/kyototycoon/'
  url 'http://fallabs.com/kyototycoon/pkg/kyototycoon-0.9.56.tar.gz'
  sha1 'e5433833e681f8755ff6b9f7209029ec23914ce6'

  option "no-lua", "Disable Lua support"

  depends_on 'lua' unless build.include? "no-lua"
  depends_on 'kyoto-cabinet'

  def install
    # Locate kyoto-cabinet for non-/usr/local builds
    cabinet = Formula.factory("kyoto-cabinet")
    args = ["--prefix=#{prefix}", "--with-kc=#{cabinet.opt_prefix}"]
    args << "--enable-lua" unless build.include? "no-lua"

    system "./configure", *args
    system "make"
    system "make install"
  end
end