Commit 172dc681 authored by John's avatar John Committed by Kazushi (Jam) Marukawa

Added a package for Nethack 3.6.

parent 0f2716e7
require 'package'
class Nethack < Package
description 'Nethack is a classic roguelike. Descend through the dungeon and retrieve the Amulet of Yendor.'
homepage 'https://www.nethack.org/'
version '3.6.0'
source_url 'https://github.com/NetHack/NetHack/archive/NetHack-3.6.0_Release.tar.gz'
source_sha256 '5735e4d132d8aec0c49f0e2a72156c7cbe84ea7b5a3153531da61aa660c668a1'
depends_on 'patch'
depends_on 'bison'
depends_on 'flex'
depends_on 'ncurses'
def self.build
# Apply a patch to set a hints file that will work for the current build environment.
system "curl -L 'https://gist.githubusercontent.com/anonymous/77b05c6cd87628ab3cb944e75ecc45b7/raw/d5f327450aa6b4d50cafb5352fad06ed60f91b69/nethack_chromebrew.patch' | patch -p0"
system "./sys/unix/setup.sh", "./sys/unix/hints/linux"
system "make"
end
def self.install
system "make", "PREFIX=#{CREW_DEST_DIR}/usr/local/", "install"
system "mkdir", "#{CREW_DEST_DIR}/usr/local/bin/"
system "sed", "-i", "s|^HACKDIR=.*$|HACKDIR=#{CREW_PREFIX}/games/lib/nethackdir|g", "#{CREW_DEST_DIR}/usr/local/games/nethack"
system "cp", "#{CREW_DEST_DIR}/usr/local/games/nethack", "#{CREW_DEST_DIR}/usr/local/bin/nethack"
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment