0
0
mirror of https://git.zap.org.au/git/trader.git synced 2025-06-30 22:19:26 -04:00

Rewrite the OpenSUSE spec file for Star Traders 7.10

This commit is contained in:
John Zaitseff 2017-06-05 20:09:43 +10:00
parent fcd7993748
commit ac33371e66

View File

@ -1,7 +1,7 @@
# #
# spec file for package trader # spec file for package trader
# #
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012-17 John Zaitseff <J.Zaitseff@zap.org.au> # Copyright (c) 2012-17 John Zaitseff <J.Zaitseff@zap.org.au>
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -30,8 +30,8 @@
# This file is distributed under the same licence as Star Traders itself: # This file is distributed under the same licence as Star Traders itself:
# the GNU General Public License, version 3 or later. # the GNU General Public License, version 3 or later.
%define upstream_version 7.9 %define upstream_version 7.10
%define normalised_version 7.9 %define normalised_version 7.10
%define rpm_release_num 1 %define rpm_release_num 1
%define is_prerelease 0 %define is_prerelease 0
@ -44,34 +44,26 @@ Group: Amusements/Games/Strategy/Turn Based
Url: http://www.zap.org.au/software/trader/ Url: http://www.zap.org.au/software/trader/
%if 0%{?is_prerelease} %if 0%{?is_prerelease}
Source0: ftp://ftp.zap.org.au/pub/trader/unix/prerelease/trader-%{upstream_version}.tar.gz Source0: ftp://ftp.zap.org.au/pub/trader/unix/prerelease/trader-%{upstream_version}.tar.xz
%else %else
Source0: ftp://ftp.zap.org.au/pub/trader/unix/trader-%{upstream_version}.tar.gz Source0: ftp://ftp.zap.org.au/pub/trader/unix/trader-%{upstream_version}.tar.xz
%endif
%if 0%{?suse_version} >= 1100
%define use_suggests_lang 1
%else
%define use_suggests_lang 0
%endif %endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc
BuildRequires: gettext BuildRequires: gettext
BuildRequires: pkgconfig(ncurses)
BuildRequires: update-desktop-files
BuildRequires: gperf BuildRequires: gperf
BuildRequires: ncurses-devel
%if 0%{?use_suggests_lang} Recommends: %{name}-lang = %{version}
Suggests: %{name}-lang = %{version}
%endif
%description %description
Star Traders is a simple game of interstellar trading, where the objective 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 is to create companies, buy and sell shares, borrow and repay money, in
order to become the wealthiest player (the winner). order to become the wealthiest player (the winner).
%if 0%{?use_suggests_lang}
%lang_package %lang_package
%endif
%prep %prep
%setup -q -n %{name}-%{upstream_version} %setup -q -n %{name}-%{upstream_version}
@ -81,31 +73,27 @@ order to become the wealthiest player (the winner).
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
make DESTDIR=%{buildroot} install %make_install
%find_lang %{name} %find_lang %{name}
%suse_update_desktop_file %{name}
%clean
rm -rf %{buildroot}
%if 0%{?use_suggests_lang}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING NEWS README %doc README NEWS COPYING
%doc %{_mandir}/man6/trader.6* %{_bindir}/%{name}
%{_bindir}/trader %{_mandir}/man6/trader.6*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%files lang -f %{name}.lang %files lang -f %{name}.lang
%defattr(-,root,root,-) %defattr(-,root,root,-)
%else %post
%desktop_database_post
%icon_theme_cache_post
%files -f %{name}.lang %postun
%defattr(-,root,root,-) %desktop_database_postun
%doc COPYING NEWS README %icon_theme_cache_postun
%doc %{_mandir}/man6/trader.6*
%{_bindir}/trader
%endif
%changelog %changelog