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
38
39
|
require 'formula'
class LionOrNewer < Requirement
fatal true
satisfy MacOS.version >= :lion
def message
"Appledoc requires Mac OS X 10.7 (Lion) or newer."
end
end
class Appledoc < Formula
homepage 'http://appledoc.gentlebytes.com/'
url "https://github.com/tomaz/appledoc/archive/v2.1.tar.gz"
sha1 'c30675e340d2ae1334e3d9254701de6f40d6658c'
head 'https://github.com/tomaz/appledoc.git', :branch => 'master'
depends_on :xcode # For working xcodebuild.
depends_on LionOrNewer
def install
system "xcodebuild", "-project", "appledoc.xcodeproj",
"-target", "appledoc",
"-configuration", "Release",
"clean", "install",
"SYMROOT=build",
"DSTROOT=build",
"INSTALL_PATH=/bin",
"OTHER_CFLAGS='-DCOMPILE_TIME_DEFAULT_TEMPLATE_PATH=@\"#{prefix}/Templates\"'"
bin.install "build/bin/appledoc"
prefix.install "Templates/"
end
def test
system "#{bin}/appledoc", "--version"
end
end
|