%define icon_name uk Name: unknown-horizons Version: 2012.1 Release: %mkrel 3 License: GPLv2+ ; CC-BY-SA 3.0 ; OFL ; Summary: A popular economy and city building 2D RTS game Url: http://www.unknown-horizons.org Group: Games/Strategy Source: %{name}-%{version}.tar.xz Source1: %{name}.svg # Required, docbook-xsl-stylesheets : to build man page BuildRequires: docbook-style-xsl BuildRequires: fdupes BuildRequires: fife-devel >= 0.3.3 BuildRequires: intltool # Required, libxslt : to build man page BuildRequires: xsltproc libxslt-devel BuildRequires: pkgconfig BuildRequires: python-devel BuildRequires: python-distutils-extra #Required imagemagick to fix desktop icon BuildRequires: imagemagick BuildRequires: desktop-file-utils Requires: fife >= 0.3.3 Requires: python Requires: python-yaml Requires: %{name}-data = %{version} %description Unknown Horizons is a 2D real-time strategy simulation with an emphasis on economy and city building. Expand your small settlement to a strong and wealthy colony, collect taxes and supply your inhabitants with valuable goods. Increase your power with a well balanced economy and with strategic trade and diplomacy. %package data Summary: Games data for the %{name} game Group: Games/Arcade Conflicts: %{name} < 2011-6 BuildArch: noarch Requires: %{name} = %{version} %description data This package contains data files for %{name} game. %prep %setup -q -n %{name} %build # Build Unknown Horizons %{__python} setup.py build %install %{__python} setup.py install \ --prefix=%{_prefix} \ --root=%{buildroot} %find_lang %{name} %{__rm} %{buildroot}%{_datadir}/pixmaps/%{name}.xpm # KDE has problems handling icon files starting with 'unknown' followed by a dash # (ex: unknown-horizons.svg) and displays unknown.* icon. We fix this by changing # the icon name in .desktop file. sed -i "s/Icon=unknown-horizons/Icon=%{icon_name}/" %{buildroot}%{_datadir}/applications/%{name}.desktop install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{icon_name}.svg desktop-file-install --vendor="" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \ --remove-category="Simulation" \ %buildroot%{_datadir}/applications/%{name}.desktop %files -f %{name}.lang %doc doc/AUTHORS doc/GPL doc/GPL_fontexception doc/LICENSE doc/CC doc/OFL %{_bindir}/%{name} %{_mandir}/man6/%{name}.6.* %{python_sitelib}/*.egg-info %{python_sitelib}/horizons/ %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/scalable/apps/%{icon_name}.svg %files data %{_datadir}/%{name} %changelog * Mon Jan 14 2013 umeabot <umeabot> 2012.1-3.mga3 + Revision: 385071 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Sep 11 2012 dams <dams> 2012.1-2.mga3 + Revision: 292108 - add a require on engine game on the data package * Thu May 31 2012 dams <dams> 2012.1-1.mga3 + Revision: 252333 - new version 2012.1 - add a check of version on 'fife' build-require - clean spec file * Sun Dec 11 2011 fwang <fwang> 2011-7.mga2 + Revision: 180745 - add req on data sub package * Sun Dec 11 2011 fwang <fwang> 2011-6.mga2 + Revision: 180744 - br desktop-file-utils - split data package * Thu Jul 14 2011 anaselli <anaselli> 2011-5.mga2 + Revision: 124131 - Fixed icon * Thu Jul 14 2011 stormi <stormi> 2011-4.mga2 + Revision: 124101 - really fix group - remove URLs from description, the URL tag is enough * Wed Jul 13 2011 anaselli <anaselli> 2011-3.mga2 + Revision: 123874 - Fixed system path Cleaned spec file * Wed Jul 13 2011 anaselli <anaselli> 2011-2.mga2 + Revision: 123870 - Corrected group * Wed Jul 13 2011 anaselli <anaselli> 2011-1.mga2 + Revision: 123512 - Updated to version 2011.2 + matteo <matteo> - unknown-horizons.spec: spec file polished + stblack <stblack> - imported package unknown-horizons