1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-11-03 17:27:29 -05:00
trader/trader.rb

36 lines
1.0 KiB
Ruby
Raw Normal View History

class Trader < Formula
desc "Star Traders"
homepage "https://www.zap.org.au/projects/trader/"
url "https://ftp.zap.org.au/pub/trader/unix/trader-7.20.tar.xz"
sha256 "bad368c471d7f4c371fbe8f5da24872f9e3ad609ddb7dad0e015c960c88b3aa9"
license "GPL-3.0-or-later"
livecheck do
url :homepage
regex(/href=.*?trader[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
depends_on "pkg-config" => :build
depends_on "gettext"
depends_on "ncurses" # The system version does not work correctly
def install
ENV.prepend_path "PKG_CONFIG_PATH",
Formula["ncurses"].opt_libexec/"lib/pkgconfig"
args = %W[
--disable-dependency-tracking
--disable-silent-rules
--prefix=#{prefix}
--with-libintl-prefix=#{Formula["gettext"].opt_prefix}
]
system "./configure", *args
system "make", "install"
end
test do
# Star Traders is an interactive game, so the only option for testing
# is to run something like "trader --version"
system "#{bin}/trader", "--version"
end
end