aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/appledoc.rb
blob: 0ea7a3ca2803aa49980d1b982d8e3875bdb287d9 (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
35
36
37
require 'formula'

class Appledoc < Formula
  url "https://github.com/tomaz/appledoc/tarball/v2.0.5"
  head 'https://github.com/tomaz/appledoc.git', :branch => 'master'
  homepage 'http://appledoc.gentlebytes.com/'
  md5 '142cf80513ca8eda2aba631483b2e4e6'

  depends_on :xcode # For working xcodebuild.

  def install
    system "xcodebuild", "-project", "appledoc.xcodeproj",
                         "-target", "appledoc",
                         "-configuration", "Release",
                         "install",
                         "SYMROOT=build",
                         "DSTROOT=build",
                         "INSTALL_PATH=/bin"
    bin.install "build/bin/appledoc"
    prefix.install "Templates/"
  end

  def caveats; <<-EOS
Make the documentation templates available to `appledoc':

    ln -sf "#{prefix}/Templates" "#{ENV['HOME']}/Library/Application Support/appledoc"

If you have edited the templates yourself, you should check for important changes.

NOTE someone should patch this tool so this caveat is unecessary.
EOS
  end

  def test
    system "#{bin}/appledoc", "--version"
  end
end