2010-08-14 08:51:03 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Openttd < Formula
|
2011-04-14 03:50:12 +00:00
|
|
|
url 'http://us.binaries.openttd.org/binaries/releases/1.1.0/openttd-1.1.0-source.tar.gz'
|
2011-04-20 00:15:56 +00:00
|
|
|
head 'git://git.openttd.org/openttd/trunk.git'
|
2010-08-14 08:51:03 +00:00
|
|
|
homepage 'http://www.openttd.org/'
|
2011-04-14 03:50:12 +00:00
|
|
|
md5 'd5ca3357e5c7f995aa43414ff4d93cfb'
|
2010-08-14 08:51:03 +00:00
|
|
|
|
|
|
|
depends_on 'lzo'
|
2011-04-14 03:50:12 +00:00
|
|
|
depends_on 'xz'
|
2010-08-14 08:51:03 +00:00
|
|
|
|
|
|
|
def install
|
2011-04-20 08:15:38 +00:00
|
|
|
system "./configure", "--prefix-dir=#{prefix}"
|
|
|
|
system "make bundle"
|
|
|
|
|
|
|
|
def install_asset(url)
|
|
|
|
ohai "Downloading asset: #{url}"
|
|
|
|
curl url, '-O'
|
|
|
|
|
|
|
|
file = File.basename url
|
|
|
|
system '/usr/bin/unzip', '-qq', file
|
|
|
|
rm file
|
|
|
|
end
|
|
|
|
|
|
|
|
cd 'bundle/OpenTTD.app/Contents/Resources' do
|
|
|
|
cd 'data' do
|
|
|
|
install_asset 'http://bundles.openttdcoop.org/opengfx/releases/0.3.3/opengfx-0.3.3.zip'
|
|
|
|
install_asset 'http://bundles.openttdcoop.org/opensfx/releases/0.2.3/opensfx-0.2.3.zip'
|
|
|
|
end
|
|
|
|
cd 'gm' do
|
|
|
|
install_asset 'http://bundles.openttdcoop.org/openmsx/releases/0.3.1/openmsx-0.3.1.zip'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
prefix.install 'bundle/OpenTTD.app'
|
2010-08-14 08:51:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
2011-04-20 08:15:38 +00:00
|
|
|
OpenTTD.app installed to: #{prefix}
|
|
|
|
If you have access to the sound and graphics files from the original
|
|
|
|
Transport Tycoon Deluxe, you can install them by following the
|
|
|
|
instructions in section 4.1 of #{prefix}/README
|
2010-08-14 08:51:03 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|