3 %bcond_without home_etc # without home_etc support
5 Summary: An open source reimplementation of the Microprose game "Transport Tycoon Deluxe"
6 Summary(pl.UTF-8): Otwarta reimplementacja gry Transport Tycoon Deluxe
11 Group: X11/Applications/Games
12 Source0: http://binaries.openttd.org/releases/%{version}/%{name}-%{version}-source.tar.xz
13 # Source0-md5: 66b54e0293594aab90085db113cc2dd3
14 Source1: %{name}.desktop
15 Source2: %{name}-server.desktop
16 Patch0: %{name}-home_etc.patch
17 Patch1: %{name}-libiconv.patch
18 URL: http://www.openttd.org/
19 BuildRequires: SDL-devel
20 BuildRequires: fontconfig-devel
21 BuildRequires: freetype-devel
22 BuildRequires: grfcodec >= 6.0.0
23 %{?with_home_etc:BuildRequires: home-etc-devel}
24 BuildRequires: libpng-devel
25 BuildRequires: libstdc++-devel
26 BuildRequires: lzo-devel
27 BuildRequires: pkgconfig
28 BuildRequires: sed >= 4.0
29 BuildRequires: xz-devel
30 BuildRequires: zlib-devel
31 Requires: %{name}-data = %{version}-%{release}
33 Suggests: %{name}-opengfx
34 Suggests: %{name}-openmsx
35 Suggests: %{name}-opensfx
37 Provides: %{name}-binary = %{version}-%{release}
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 OpenTTD is modeled after the original Transport Tycoon game by Chris
42 Sawyer and enhances the game experience dramatically. Many features
43 were inspired by TTDPatch while others are original.
45 It requires the original Transport Tycoon Deluxe data files.
47 %description -l pl.UTF-8
48 OpenTTD powstał na bazie gry Transport Tycoon stworzonej przez Chrisa
49 Sawyera, jego grywalność jest jednak dużo większa. Wiele rzeczy
50 zostało zainspirowanych przez TTDPatch, dużo jest jednak oryginalnych
53 Do uruchomienia wymagane są pliki danych z Transport Tycoon Deluxe.
56 Summary: OpenTTD data files
57 Summary(pl.UTF-8): Pliki danych OpenTTD
58 Group: X11/Applications/Games
63 %description data -l pl.UTF-8
67 Summary: OpenTTD dedicated server
68 Summary(pl.UTF-8): Dedykowany serwer OpenTTD
69 Group: X11/Applications/Games
70 Requires: %{name}-data = %{version}-%{release}
71 Provides: %{name}-binary = %{version}-%{release}
74 This package contains OpenTTD dedicated server. Note that
75 graphics-enabled OpenTTD client also has this functionality.
77 %description server -l pl.UTF-8
78 Ten pakiet zawiera dedykowany serwer OpenTTD. Należy zwrócić uwagę, że
79 graficzny klient OpenTTD również zawiera taką funkcjonalność.
83 %{?with_home_etc:%patch0 -p1}
87 find src/lang/ -type f -exec %{__sed} -i 's/:Unix/:PLD Linux/' \{\} \;
95 CFLAGS="%{rpmcxxflags}" \
96 LDFLAGS="%{rpmldflags}" \
98 --cc-build="%{__cc}" \
99 --cxx-host="%{__cxx}" \
100 --cxx-build="%{__cxx}" \
102 --prefix-dir="%{_prefix}" \
104 --data-dir=share/openttd \
105 --icon-dir=share/pixmaps \
106 --install-dir=$RPM_BUILD_ROOT \
114 --without-fontconfig \
115 --without-libtimidity
122 mv bin/openttd{,-dedicated}
125 rm -f Makefile.config
130 CFLAGS="%{rpmcxxflags} $(sdl-config --cflags) -I/usr/include/freetype2" \
131 LDFLAGS="%{rpmldflags}" \
132 --cc-host="%{__cc}" \
133 --cc-build="%{__cc}" \
134 --cxx-host="%{__cxx}" \
135 --cxx-build="%{__cxx}" \
137 --prefix-dir="%{_prefix}" \
139 --data-dir=share/openttd \
140 --icon-dir=share/pixmaps \
141 --install-dir=$RPM_BUILD_ROOT \
149 --without-libtimidity \
151 --with-midi=%{_bindir}/timidity
159 rm -rf $RPM_BUILD_ROOT
161 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_mandir}/man6,%{_pixmapsdir}}
162 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{ai/library,scenario/heightmap}
165 INSTALL_DIR=$RPM_BUILD_ROOT \
170 install bin/openttd-dedicated $RPM_BUILD_ROOT%{_bindir}
171 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
172 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
173 install docs/openttd.6 $RPM_BUILD_ROOT%{_mandir}/man6
174 install media/openttd.256.png $RPM_BUILD_ROOT%{_pixmapsdir}/openttd.png
177 rm -rf $RPM_BUILD_ROOT
180 %update_icon_cache hicolor
183 %update_icon_cache hicolor
186 %defattr(644,root,root,755)
187 %doc changelog.txt known-bugs.txt readme.txt docs/multiplayer.txt
188 %attr(755,root,root) %{_bindir}/%{name}
189 %{_desktopdir}/%{name}.desktop
190 %{_mandir}/man6/openttd.*
191 %{_iconsdir}/*/*/*/openttd.png
194 %defattr(644,root,root,755)
197 %{_pixmapsdir}/openttd.*
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_bindir}/%{name}-dedicated
202 %{_desktopdir}/%{name}-server.desktop