2011-03-22 02:02:44 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
class NeedsSnowLeopard < Requirement
|
2013-01-20 02:45:59 +00:00
|
|
|
satisfy MacOS.version >= :snow_leopard
|
2012-03-01 04:36:21 +00:00
|
|
|
|
|
|
|
def message
|
|
|
|
"jstalk requires Mac OS X 10.6 or newer"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-03-22 02:02:44 +00:00
|
|
|
class Jstalk < Formula
|
|
|
|
homepage 'http://jstalk.org/'
|
2012-03-01 04:36:21 +00:00
|
|
|
url 'https://github.com/ccgus/jstalk.git', :tag => "v1.0.1"
|
2011-03-22 02:02:44 +00:00
|
|
|
version '1.0.1'
|
|
|
|
|
2013-01-27 22:45:16 +00:00
|
|
|
depends_on NeedsSnowLeopard
|
2012-08-24 20:40:24 +00:00
|
|
|
depends_on :xcode # For working xcodebuild.
|
2011-03-22 02:02:44 +00:00
|
|
|
|
2012-03-01 04:36:21 +00:00
|
|
|
def install
|
|
|
|
["JSTalk Framework", "jstalk command line", "JSTalk Editor"].each do |t|
|
2012-04-29 23:51:14 +00:00
|
|
|
system "xcodebuild", "-target", t, "-configuration", "Release", "ONLY_ACTIVE_ARCH=YES", "SYMROOT=build"
|
2011-03-22 02:02:44 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
cd 'build/Release' do
|
|
|
|
bin.install 'jstalk'
|
|
|
|
prefix.install "JSTalk Editor.app"
|
2013-05-03 16:28:45 +00:00
|
|
|
frameworks.install 'JSTalk.framework'
|
2011-03-22 02:02:44 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Framework JSTalk was installed to:
|
2013-05-03 16:28:45 +00:00
|
|
|
#{frameworks}/JSTalk.framework
|
2011-03-22 02:02:44 +00:00
|
|
|
|
|
|
|
You may want to symlink this Framework to a standard OS X location,
|
|
|
|
such as:
|
|
|
|
mkdir ~/Frameworks
|
2013-05-03 16:28:45 +00:00
|
|
|
ln -s "#{frameworks}/JSTalk.framework" ~/Frameworks
|
2011-03-22 02:02:44 +00:00
|
|
|
|
|
|
|
JSTalk Editor.app was installed in:
|
|
|
|
#{prefix}
|
|
|
|
|
|
|
|
To symlink into ~/Applications, you can do:
|
|
|
|
brew linkapps
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|