-
Notifications
You must be signed in to change notification settings - Fork 116
/
puzzles.rb
35 lines (28 loc) · 899 Bytes
/
puzzles.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
require 'formula'
# Copies the subversion clone to a subdirectory, preserving the .svn metadata
# which is required for determining the release number.
#
class PuzzlesHeadDownloadStrategy < SubversionDownloadStrategy
def stage
safe_system 'cp', '-pR', "#{@clone}/", '.'
end
end
class Puzzles < Formula
homepage 'http://www.chiark.greenend.org.uk/~sgtatham/puzzles/'
url 'svn://svn.tartarus.org/sgt/puzzles@10107', :using => PuzzlesHeadDownloadStrategy
head 'svn://svn.tartarus.org/sgt/puzzles', :using => PuzzlesHeadDownloadStrategy
depends_on 'halibut'
def install
ENV.deparallelize
system "perl", "mkfiles.pl"
system "make", "-d", "-f", "Makefile.osx", "all"
prefix.install "Puzzles.app"
end
def caveats; <<-EOS
Puzzles.app was installed in:
#{opt_prefix}
To symlink into ~/Applications, you can do:
brew linkapps
EOS
end
end