File trader.spec of Package trader
#
# spec file for package trader
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012-14 John Zaitseff <J.Zaitseff@zap.org.au>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# ***********************************************************************
# * *
# * Star Traders: A Game of Interstellar Trading *
# * Copyright (C) 1990-2014, John Zaitseff *
# * *
# ***********************************************************************
# Author: John Zaitseff <J.Zaitseff@zap.org.au>
# $Id: trader.spec 562 2014-08-13 02:52:11Z john $
# This file is distributed under the same licence as Star Traders itself:
# the GNU General Public License, version 3 or later.
# ***********************************************************************
# Global definitions
%define upstream_version 7.6
%define normalised_version 7.6
%define rpm_release_num 1
%define is_prerelease 0
# ***********************************************************************
# Overall package information
Name: trader
Version: %{normalised_version}
Release: %{rpm_release_num}%{?dist}
Summary: Star Traders, a simple game of interstellar trading
License: GPL-3.0+
Group: Amusements/Games/Strategy/Turn Based
Url: http://www.zap.org.au/software/trader/
%if 0%{?is_prerelease}
Source0: ftp://ftp.zap.org.au/pub/trader/unix/prerelease/trader-%{upstream_version}.tar.gz
%else
Source0: ftp://ftp.zap.org.au/pub/trader/unix/trader-%{upstream_version}.tar.gz
%endif
%if 0%{?suse_version} >= 1100
%define use_suggests_lang 1
%else
%define use_suggests_lang 0
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gettext
BuildRequires: gperf
BuildRequires: ncurses-devel
%if 0%{?use_suggests_lang}
Suggests: %{name}-lang = %{version}
%endif
%description
Star Traders is a simple game of interstellar trading, where the objective
is to create companies, buy and sell shares, borrow and repay money, in
order to become the wealthiest player (the winner).
# ***********************************************************************
# Separate package for locale-specific information
%if 0%{?use_suggests_lang}
%lang_package
%endif
# ***********************************************************************
# Package preparation
%prep
%setup -q -n %{name}-%{upstream_version}
# ***********************************************************************
# Build the package
%build
%configure
make %{?_smp_mflags}
# ***********************************************************************
# Install the package
%install
make DESTDIR=%{buildroot} install
%find_lang %{name}
# ***********************************************************************
# Clean up from package building
%clean
rm -rf %{buildroot}
# ***********************************************************************
# Create the RPM archive
%if 0%{?use_suggests_lang}
%files
%defattr(-,root,root,-)
%doc COPYING NEWS README
%doc %{_mandir}/man6/trader.6*
%{_bindir}/trader
%files lang -f %{name}.lang
%defattr(-,root,root,-)
%else
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING NEWS README
%doc %{_mandir}/man6/trader.6*
%{_bindir}/trader
%endif
# ***********************************************************************
# Package spec file information
%changelog