forked from ziz/homebrew-games
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopen-tyrian.rb
42 lines (36 loc) · 1.24 KB
/
open-tyrian.rb
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
40
41
42
class OpenTyrian < Formula
desc "Open-source port of Tyrian"
homepage "https://bitbucket.org/opentyrian/opentyrian"
url "http://www.camanis.net/opentyrian/releases/opentyrian-2.1.20130907-src.tar.gz"
sha256 "f54b6b3cedcefa187c9f605d6164aae29ec46a731a6df30d351af4c008dee45f"
head "https://bitbucket.org/opentyrian/opentyrian", :using => :hg
bottle do
sha256 "f9761c338f5e39984b19661cb95293eae561fb24762ccf5721f91105e353dd20" => :el_capitan
sha256 "370c59cf4f742979b78c7923c57b533f6c5ec8eec3522db7d9143dd07554334d" => :yosemite
sha256 "730f02623ca48c3bb9f40f7610b01988a3434d7cb6bf5ecda013300206fdd21d" => :mavericks
end
depends_on "sdl"
depends_on "sdl_net"
resource "data" do
url "http://camanis.net/tyrian/tyrian21.zip"
sha256 "7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277"
end
def install
datadir = pkgshare/"data"
datadir.install resource("data")
args = []
if build.head?
args << "TYRIAN_DIR=#{datadir}"
else
inreplace "src/file.c", "/usr/share/opentyrian/data", datadir
end
system "make", *args
bin.install "opentyrian"
end
def caveats
"Save games will be put in ~/.opentyrian"
end
test do
system "#{bin}/opentyrian", "--help"
end
end