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