]> git.pld-linux.org Git - packages/openttd.git/blob - openttd.spec
- release 2 (by relup.sh)
[packages/openttd.git] / openttd.spec
1 #
2 # Conditional build:
3 %bcond_without  home_etc        # without home_etc support
4 #
5 Summary:        An open source reimplementation of the Microprose game "Transport Tycoon Deluxe"
6 Summary(pl.UTF-8):      Otwarta reimplementacja gry Transport Tycoon Deluxe
7 Name:           openttd
8 Version:        1.2.1
9 Release:        2
10 License:        GPL v2+
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}
32 Suggests:       %{name}-ai
33 Suggests:       %{name}-opengfx
34 Suggests:       %{name}-openmsx
35 Suggests:       %{name}-opensfx
36 Suggests:       TiMidity++
37 Provides:       %{name}-binary = %{version}-%{release}
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
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.
44
45 It requires the original Transport Tycoon Deluxe data files.
46
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
51 pomysłów.
52
53 Do uruchomienia wymagane są pliki danych z Transport Tycoon Deluxe.
54
55 %package data
56 Summary:        OpenTTD data files
57 Summary(pl.UTF-8):      Pliki danych OpenTTD
58 Group:          X11/Applications/Games
59
60 %description data
61 OpenTTD data files.
62
63 %description data -l pl.UTF-8
64 Pliki danych OpenTTD.
65
66 %package server
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}
72
73 %description server
74 This package contains OpenTTD dedicated server. Note that
75 graphics-enabled OpenTTD client also has this functionality.
76
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ść.
80
81 %prep
82 %setup -q
83 %{?with_home_etc:%patch0 -p1}
84 %patch1 -p1
85
86 # Let's pldize
87 find src/lang/ -type f -exec %{__sed} -i 's/:Unix/:PLD Linux/' \{\} \;
88
89 %build
90
91 # dedicated
92 ./configure \
93         CC="%{__cc}" \
94         CXX="%{__cxx}" \
95         CFLAGS="%{rpmcxxflags}" \
96         LDFLAGS="%{rpmldflags}" \
97         --cc-host="%{__cc}" \
98         --cc-build="%{__cc}" \
99         --cxx-host="%{__cxx}" \
100         --cxx-build="%{__cxx}" \
101         --disable-strip \
102         --prefix-dir="%{_prefix}" \
103         --binary-dir=bin \
104         --data-dir=share/openttd \
105         --icon-dir=share/pixmaps \
106         --install-dir=$RPM_BUILD_ROOT \
107         --os=UNIX \
108         --enable-dedicated \
109         --without-allegro \
110         --without-sdl \
111         --with-zlib \
112         --without-png \
113         --without-freetype \
114         --without-fontconfig \
115         --without-libtimidity
116
117 %{__make} \
118         MANUAL_CONFIG=1 \
119         INSTALL=1 \
120         VERBOSE=1
121
122 mv bin/openttd{,-dedicated}
123
124 # client
125 rm -f Makefile.config
126 %{__make} clean
127 ./configure \
128         CC="%{__cc}" \
129         CXX="%{__cxx}" \
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}" \
136         --disable-strip \
137         --prefix-dir="%{_prefix}" \
138         --binary-dir=bin \
139         --data-dir=share/openttd \
140         --icon-dir=share/pixmaps \
141         --install-dir=$RPM_BUILD_ROOT \
142         --os=UNIX \
143         --without-allegro \
144         --with-sdl \
145         --with-zlib \
146         --with-png \
147         --with-freetype \
148         --with-fontconfig \
149         --without-libtimidity \
150         --with-iconv \
151         --with-midi=%{_bindir}/timidity
152
153 %{__make} \
154         MANUAL_CONFIG=1 \
155         INSTALL=1 \
156         VERBOSE=1
157
158 %install
159 rm -rf $RPM_BUILD_ROOT
160
161 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_mandir}/man6,%{_pixmapsdir}}
162 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{ai/library,scenario/heightmap}
163
164 %{__make} install \
165         INSTALL_DIR=$RPM_BUILD_ROOT \
166         INSTALL=1 \
167         VERBOSE=1 \
168         PREFIX="/" \
169
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
175
176 %clean
177 rm -rf $RPM_BUILD_ROOT
178
179 %post
180 %update_icon_cache hicolor
181
182 %postun
183 %update_icon_cache hicolor
184
185 %files
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
192
193 %files data
194 %defattr(644,root,root,755)
195 %doc bin/scripts
196 %{_datadir}/%{name}
197 %{_pixmapsdir}/openttd.*
198
199 %files server
200 %defattr(644,root,root,755)
201 %attr(755,root,root) %{_bindir}/%{name}-dedicated
202 %{_desktopdir}/%{name}-server.desktop
This page took 0.076928 seconds and 3 git commands to generate.