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