nethack4.rb 1.22 KB
Newer Older
Fred Clift's avatar
Fred Clift committed
1 2 3
require 'package'

class Nethack4 < Package
4
  description 'NetHack is a \'roguelike\' game following in the same tradition; the player controls an adventurer delving into a randomly generated dungeon to retrieve the Amulet of Yendor from its depths.'
5
  homepage 'http://nethack4.org/'
Fred Clift's avatar
Fred Clift committed
6 7 8
  # "nethack4" fork of nethack with a few patches and a modern build system
  version '4.3.0-beta2'
  source_url 'http://nethack4.org/media/releases/nethack4-4.3-beta2.tar.gz'
9
  source_sha256 'b143a86b5e1baf55c663ae09c2663b169d265e95ac43154982296a1887d05f15'
Fred Clift's avatar
Fred Clift committed
10 11 12 13 14 15 16 17

  depends_on 'buildessential'
  depends_on 'ncurses'
  depends_on 'bison'
  depends_on 'flex'
  depends_on 'perl'

  def self.build
18
    target="build"
Fred Clift's avatar
Fred Clift committed
19 20 21
    system "mkdir -p " + target
    Dir.chdir target  do
      #build with rpath pointing at /usr/local
22
      system "/usr/local/bin/perl ../aimake --config-only -i /usr/local/ --directory-layout=prefix --without=gui"
Fred Clift's avatar
Fred Clift committed
23 24 25
      system "/usr/local/bin/perl ../aimake"
    end
  end
26

Fred Clift's avatar
Fred Clift committed
27
  def self.install
28
    target="build"
Fred Clift's avatar
Fred Clift committed
29 30
    Dir.chdir target  do
      #install in destdir so package manager can keep track
31
      system "/usr/local/bin/perl ../aimake --install-only -i #{CREW_DEST_DIR}/usr/local/ --directory-layout=prefix --without=gui"
Fred Clift's avatar
Fred Clift committed
32 33 34
    end
  end
end