3 # - noarch subpackage for data
5 # used in the tarball name
6 %define ver_hash1 244f49f
7 # used in the directory name
8 %define ver_hash2 bedaf75
9 Summary: Unknown Horizons - a 2D realtime strategy simulation
10 Name: unknown-horizons
13 License: GPL v2+, distributable (see docs)
14 Group: Applications/Games
15 # https://github.com/unknown-horizons/unknown-horizons/releases
16 Source0: %{name}-%{name}-%{version}-0-g%{ver_hash1}.zip
17 # Source0-md5: 522c5a6c7a583d98a9ecb686b085f7d6
18 URL: http://www.unknown-horizons.org/
19 BuildRequires: python-distribute
20 BuildRequires: rpm-pythonprov
22 Requires: python-PyYAML
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 Unknown Horizons is a 2D realtime strategy simulation with an emphasis
28 on economy and city building. Expand your small settlement to a strong
29 and wealthy colony, collect taxes and supply your inhabitants with
30 valuable goods. Increase your power with a well balanced economy and
31 with strategic trade and diplomacy.
34 %setup -q -n %{name}-%{name}-%{ver_hash2}
36 # fix #!%{_bindir}/env python -> #!%{__python}:
37 %{__sed} -i -e '1s,^#!.*python,#!%{__python},' run_uh.py
40 %{__python} setup.py build
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT%{py_sitedir}
46 %{__python} setup.py install \
47 --root=$RPM_BUILD_ROOT
49 # contains binary code
50 mv $RPM_BUILD_ROOT%{py_sitescriptdir}/* $RPM_BUILD_ROOT%{py_sitedir}
52 rm -r $RPM_BUILD_ROOT%{py_sitedir}/horizons/network/{darwin,freebsd,windows}-*
54 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
55 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
60 rm -rf $RPM_BUILD_ROOT
62 %files -f %{name}.lang
63 %defattr(644,root,root,755)
64 %doc README doc/{APL,AUTHORS,CC,CHANGELOG,GPL_fontexception,LICENSE,MIT,OFL}
65 %attr(755,root,root) %{_bindir}/%{name}
67 %dir %{py_sitedir}/horizons
68 %{py_sitedir}/horizons/ai
69 %{py_sitedir}/horizons/command
70 %{py_sitedir}/horizons/engine
71 %{py_sitedir}/horizons/ext
72 %{py_sitedir}/horizons/gui
73 %{py_sitedir}/horizons/i18n
74 %dir %{py_sitedir}/horizons/network
75 %dir %{py_sitedir}/horizons/network/linux-*
76 %attr(755,root,root) %{py_sitedir}/horizons/network/linux-*/enet.so
77 %{py_sitedir}/horizons/network/linux-*/*.py*
78 %{py_sitedir}/horizons/network/packets
79 %{py_sitedir}/horizons/network/*.py*
80 %{py_sitedir}/horizons/scenario
81 %{py_sitedir}/horizons/util
82 %{py_sitedir}/horizons/world
83 %{py_sitedir}/horizons/*.py*
84 %{py_sitedir}/*.egg-info
86 %{_desktopdir}/*.desktop
87 %{_mandir}/man6/%{name}.6*