From d157614daa163e44c9290a02d4c4fb4e31bd3eb4 Mon Sep 17 00:00:00 2001 From: John Zaitseff Date: Fri, 2 Jun 2017 16:42:59 +1000 Subject: [PATCH] Rewrite the Fedora spec file for Star Traders 7.10 --- trader.spec | 48 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/trader.spec b/trader.spec index 1c99f1f..3b43ef0 100644 --- a/trader.spec +++ b/trader.spec @@ -11,47 +11,69 @@ # This file is distributed under the same licence as Star Traders itself: # the GNU General Public License, version 3 or later. - Name: trader -Version: 7.9 +Version: 7.10 Release: 1%{?dist} Summary: Star Traders, a simple game of interstellar trading License: GPLv3+ Group: Amusements/Games Url: http://www.zap.org.au/software/trader/ -Source0: ftp://ftp.zap.org.au/pub/trader/unix/trader-%{version}.tar.gz +Source0: ftp://ftp.zap.org.au/pub/trader/unix/trader-%{version}.tar.xz -BuildRequires: gettext ncurses-devel gperf +BuildRequires: gcc gettext pkgconfig(ncurses) desktop-file-utils gperf Provides: bundled(gnulib) - %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). +%global _hardened_build 1 %prep %setup -q - %build %configure -make %{?_smp_mflags} - +%make_build %install -make DESTDIR=%{buildroot} install +%make_install %find_lang %{name} - +desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %files -f %{name}.lang -%doc COPYING NEWS README -%doc %{_mandir}/man6/trader.6* -%{_bindir}/trader +%doc README NEWS +%license COPYING +%{_bindir}/%{name} +%{_mandir}/man6/%{name}.6* +%{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/hicolor/*/apps/%{name}.* +%post +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun +if [ $1 -eq 0 ]; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Jun 02 2017 John Zaitseff - 7.10-1 +- Updated the RPM package for a new release of Star Traders: verison 7.10. +- Changed a dependency from ncurses-devel to pkgconfig(ncurses), now that + the Autoconf macro uses pkg-config. +- Added a dependency on gcc, as per the Fedora Packaging Guidelines for C + programs. +- Added a dependency on desktop-file-utils for the desktop file. +- Install the desktop file and icons now shipped with Star Traders. +- Install the COPYING file to /usr/share/licenses/trader. +- Use generic make_build and make_install macros. + * Tue Jan 05 2016 John Zaitseff - 7.9-1 - Updated the RPM package for a new release of Star Traders: version 7.9.