-
Notifications
You must be signed in to change notification settings - Fork 116
/
gnu-chess.rb
32 lines (28 loc) · 1.2 KB
/
gnu-chess.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
class GnuChess < Formula
homepage 'https://www.gnu.org/software/chess/'
url 'http://ftpmirror.gnu.org/chess/gnuchess-6.1.1.tar.gz'
mirror 'https://ftp.gnu.org/gnu/chess/gnuchess-6.1.1.tar.gz'
sha1 '12703cef3c111e5a56a7de8ff3804306927a820a'
def install
# Opening book for gnuchess. This can be put in the doc directory and the
# user can optionally add the opening book. The README has details on
# adding the opening book.
book_url = "http://ftpmirror.gnu.org/chess/book_1.02.pgn.gz"
ohai "Downloading #{book_url}"
curl book_url, "-O"
system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make"
ENV.j1 # Prevents a "file already exists" warning
system "make install"
doc.install Dir['doc/*', 'TODO', 'book_1.02.pgn.gz', 'book']
end
def caveats; <<-EOS.undent
The README file contains a manual for use:
#{doc}/README
This formula also downloads the additional opening book. The opening
book is a gzipped PGN file that can be added using gnuchess commands.
The book_*.pgn.gz file is located in the same directory as the README.
See the README for using the `book add' command.
EOS
end
end