Skip to content

Instantly share code, notes, and snippets.

@timhtheos
Forked from ctdk/bsdgames-osx.rb
Last active August 29, 2015 14:08
Show Gist options
  • Save timhtheos/5d16760284c33f125568 to your computer and use it in GitHub Desktop.
Save timhtheos/5d16760284c33f125568 to your computer and use it in GitHub Desktop.
require 'formula'
class BsdgamesOsx < Formula
homepage 'https://github.com/ctdk/bsdgames-osx'
url 'https://github.com/ctdk/bsdgames-osx/archive/bsdgames-osx-2.19.3.tar.gz'
sha1 '31013cbc8fbad71f1e3e0b9b85fd7c943219a99b'
head 'https://github.com/ctdk/bsdgames-osx.git'
version '2.19.3'
depends_on :bsdmake => :build
def install
ENV.j1
# This replicates the behavior of wargames calling games from /usr/games
inreplace 'wargames/wargames.sh' do |s|
s.gsub! /\/usr\/games/, "#{prefix}/bin"
end
system "bsdmake PREFIX=#{prefix} VARDIR=#{HOMEBREW_PREFIX}/var/games"
system "bsdmake install PREFIX=#{prefix} VARDIR=#{HOMEBREW_PREFIX}/var/games"
end
def test
%w[ pom ].each do |game|
system game
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment