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

# This formula installs Factor TRUNK.
# One can install the latest stable release using the official DMG.

class Factor <Formula
  head 'git://github.com/slavapestov/factor.git'
  homepage 'http://factorcode.org/'

  def install
    # The build script assume it's in a Git repository.
    ENV['GIT_DIR']="#{@downloader.cached_location}/.git"
    system "./build-support/factor.sh update"

    libexec.install ["Factor.app", "factor.image", "factor"]
    (bin/'factor').write <<-EOS.undent
    #!/bin/sh
    exec #{libexec}/factor $@
    EOS
  end

  def caveats
    "Cocoa app installed to #{libexec}/Factor.app.\n\n"\
    "Makes use of 'factor.image' in the same folder."
  end
end