homebrew-core/Formula/greed.rb
2017-02-08 10:12:19 +00:00

35 lines
1.1 KiB
Ruby

class Greed < Formula
desc "Game of consumption"
homepage "http://www.catb.org/~esr/greed/"
url "http://www.catb.org/~esr/greed/greed-4.1.tar.gz"
sha256 "2356151b2f95badcb8ad413ca88ee7022a46b11b2edab5b096de6d033778b1ea"
head "https://gitlab.com/esr/greed.git"
bottle do
sha256 "152ce580c6e8157f765217a537cab9fb05561433c9546696989eb5770c77ee3b" => :sierra
sha256 "136edae12bcf18054cc5afeb7bd5f0d05ca8c6979f8764126a6216c174644e31" => :el_capitan
sha256 "634db96b3c26b08026ea59b90e161af6ec0979f79dcdb5ca132ee49fc91b6cfa" => :yosemite
end
def install
# Handle hard-coded destination
inreplace "Makefile", "/usr/share/man/man6", man6
# Make doesn't make directories
bin.mkpath
man6.mkpath
(var/"greed").mkpath
# High scores will be stored in var/greed
system "make", "SFILE=#{var}/greed/greed.hs"
system "make", "install", "BIN=#{bin}"
end
def caveats; <<-EOS.undent
High scores will be stored in the following location:
#{var}/greed/greed.hs
EOS
end
test do
File.executable? "#{bin}/greed"
end
end