homebrew-core/Formula/rogue.rb
2017-09-24 10:03:12 +02:00

39 lines
1.5 KiB
Ruby

class Rogue < Formula
desc "Dungeon crawling video game"
# Historical homepage: https://web.archive.org/web/20160604020207/rogue.rogueforge.net/
homepage "https://sourceforge.net/projects/roguelike/"
url "http://pkgs.fedoraproject.org/repo/pkgs/rogue/rogue5.4.4-src.tar.gz/033288f46444b06814c81ea69d96e075/rogue5.4.4-src.tar.gz"
version "5.4.4"
sha256 "7d37a61fc098bda0e6fac30799da347294067e8e079e4b40d6c781468e08e8a1"
bottle do
sha256 "004f3700d269910925bdbdd3edbdb6737deaf3edbf8b4d891810e38b71e3f7b6" => :high_sierra
sha256 "0caa3e02fb718c2c282f98eaaff70ef3b9e78f9f52897e18f17b09a1d0e0ce2b" => :sierra
sha256 "5a751dbc338983c191661bae45dd34337b25feaa37c090e239f10b263b0d8674" => :el_capitan
sha256 "2bbbf8931223f690edf2ae41308dc4a332a00072609480e54c3b96eada07d1f5" => :yosemite
end
def install
ENV.ncurses_define
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
inreplace "config.h", "rogue.scr", "#{var}/rogue/rogue.scr"
inreplace "Makefile" do |s|
# Take out weird man install script and DIY below
s.gsub! "-if test -d $(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 ; fi", ""
s.gsub! "-if test ! -d $(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(mandir)/$(PROGRAM).6 ; fi", ""
end
system "make", "install"
man6.install gzip("rogue.6")
libexec.mkpath
(var/"rogue").mkpath
end
test do
system "#{bin}/rogue", "-s"
end
end