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://us.binaries.openttd.org/binaries/releases/%{version}/%{name}-%{version}-source.tar.xz
13 # Source0-md5: 46ac4a9441cca5f5908dc6a069f78e20
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.2
23 %{?with_home_etc:BuildRequires: home-etc-devel}
24 BuildRequires: libicu-devel
25 BuildRequires: libpng-devel
26 BuildRequires: libstdc++-devel
27 BuildRequires: lzo-devel
28 BuildRequires: pkgconfig
29 BuildRequires: sed >= 4.0
30 BuildRequires: xz-devel
31 BuildRequires: zlib-devel
32 Requires: %{name}-data = %{version}-%{release}
34 Suggests: %{name}-opengfx
35 Suggests: %{name}-openmsx
36 Suggests: %{name}-opensfx
38 Provides: %{name}-binary = %{version}-%{release}
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 OpenTTD is modeled after the original Transport Tycoon game by Chris
43 Sawyer and enhances the game experience dramatically. Many features
44 were inspired by TTDPatch while others are original.
46 It requires the original Transport Tycoon Deluxe data files.
48 %description -l pl.UTF-8
49 OpenTTD powstał na bazie gry Transport Tycoon stworzonej przez Chrisa
50 Sawyera, jego grywalność jest jednak dużo większa. Wiele rzeczy
51 zostało zainspirowanych przez TTDPatch, dużo jest jednak oryginalnych
54 Do uruchomienia wymagane są pliki danych z Transport Tycoon Deluxe.
57 Summary: OpenTTD data files
58 Summary(pl.UTF-8): Pliki danych OpenTTD
59 Group: X11/Applications/Games
64 %description data -l pl.UTF-8
68 Summary: OpenTTD dedicated server
69 Summary(pl.UTF-8): Dedykowany serwer OpenTTD
70 Group: X11/Applications/Games
71 Requires: %{name}-data = %{version}-%{release}
72 Provides: %{name}-binary = %{version}-%{release}
75 This package contains OpenTTD dedicated server. Note that
76 graphics-enabled OpenTTD client also has this functionality.
78 %description server -l pl.UTF-8
79 Ten pakiet zawiera dedykowany serwer OpenTTD. Należy zwrócić uwagę, że
80 graficzny klient OpenTTD również zawiera taką funkcjonalność.
84 %{?with_home_etc:%patch0 -p1}
88 find src/lang/ -type f -exec %{__sed} -i 's/:Unix/:PLD Linux/' \{\} \;
96 CFLAGS="%{rpmcxxflags}" \
97 LDFLAGS="%{rpmldflags}" \
99 --cc-build="%{__cc}" \
100 --cxx-host="%{__cxx}" \
101 --cxx-build="%{__cxx}" \
103 --prefix-dir="%{_prefix}" \
105 --data-dir=share/openttd \
106 --icon-dir=share/pixmaps \
107 --install-dir=$RPM_BUILD_ROOT \
115 --without-fontconfig \
116 --without-libtimidity
123 mv bin/openttd{,-dedicated}
126 rm -f Makefile.config
131 CFLAGS="%{rpmcxxflags} $(sdl-config --cflags) -I/usr/include/freetype2" \
132 LDFLAGS="%{rpmldflags}" \
133 --cc-host="%{__cc}" \
134 --cc-build="%{__cc}" \
135 --cxx-host="%{__cxx}" \
136 --cxx-build="%{__cxx}" \
138 --prefix-dir="%{_prefix}" \
140 --data-dir=share/openttd \
141 --icon-dir=share/pixmaps \
142 --install-dir=$RPM_BUILD_ROOT \
150 --without-libtimidity \
152 --with-midi=%{_bindir}/timidity
160 rm -rf $RPM_BUILD_ROOT
162 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_mandir}/man6,%{_pixmapsdir}}
163 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{ai/library,scenario/heightmap}
166 INSTALL_DIR=$RPM_BUILD_ROOT \
171 install bin/openttd-dedicated $RPM_BUILD_ROOT%{_bindir}
172 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
173 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
174 install docs/openttd.6 $RPM_BUILD_ROOT%{_mandir}/man6
175 install media/openttd.256.png $RPM_BUILD_ROOT%{_pixmapsdir}/openttd.png
178 rm -rf $RPM_BUILD_ROOT
181 %update_icon_cache hicolor
184 %update_icon_cache hicolor
187 %defattr(644,root,root,755)
188 %doc changelog.txt known-bugs.txt readme.txt docs/multiplayer.txt
189 %attr(755,root,root) %{_bindir}/%{name}
190 %{_desktopdir}/%{name}.desktop
191 %{_mandir}/man6/openttd.*
192 %{_iconsdir}/*/*/*/openttd.png
195 %defattr(644,root,root,755)
198 %{_pixmapsdir}/openttd.*
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_bindir}/%{name}-dedicated
203 %{_desktopdir}/%{name}-server.desktop