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

Add conditional macros for openSUSE vs. Fedora

This commit is contained in:
John Zaitseff 2012-04-16 14:50:18 +10:00
parent 6f64085306
commit fe0dbbc91f

View File

@ -25,7 +25,13 @@ Version: %{fake_version}
Source0: ftp://ftp.zap.org.au/pub/trader/unix/prerelease/trader-%{real_version}.tar.gz
%endif
Release: 1%{?dist}
%if 0%{suse_version} > 1000
%define use_suggests_lang 1
%else
%define use_suggests_lang 0
%endif
Release: %{release_num}%{?dist}
Summary: Star Traders, a simple game of interstellar trading
License: GPLv3+
Group: Amusements/Games
@ -35,6 +41,9 @@ BuildRequires: ncurses-devel
BuildRequires: gperf
BuildRequires: gettext
%if 0%{use_suggests_lang}
Suggests: %{name}-lang = %{version}
%endif
%description
Star Traders is a simple game of interstellar trading, where the objective
@ -42,31 +51,65 @@ is to create companies, buy and sell shares, borrow and repay money, in
order to become the wealthiest player (the winner).
# ***********************************************************************
# Package preparation
%prep
%setup -q -n %{name}-%{real_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
* Mon Apr 16 2012 John Zaitseff <J.Zaitseff@zap.org.au> - 7.3.99.2-1
- Initial RPM package of Star Traders.