aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/tup.rb
blob: 2b38e1d43da41ad4db0487d72bcba88e1de2d9e5 (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 Tup < Formula
  homepage 'http://gittup.org/tup/'
  head 'https://github.com/gittup/tup.git'
  url 'https://github.com/gittup/tup.git', :tag => 'v0.5'
  version '0.5'

  depends_on 'pkg-config' => :build
  depends_on 'fuse4x'

  def install
    if `kextfind -b org.fuse4x.kext.fuse4x`.chomp.empty?
      onoe <<-EOS.undent
        Tup requires the fuse4x kernel extension to be loadable in order to
        build. Please follow the directions givein by `brew info fuse4x-kext`
        and try again!
      EOS
      exit 1
    end

    # Tup hard-wires CC to clang on OS X.
    inreplace ['bootstrap.sh', 'macosx.tup'], /^([ \t]*CC[ \t]*=[ \t]*).*$/, "\\1#{ENV.cc}"
    inreplace 'Tupfile', '`git describe`', version

    system "./bootstrap.sh"
    bin.install 'tup'
    man1.install 'tup.1'
  end

  def test
    system "tup -v"
  end
end