]>
Commit | Line | Data |
---|---|---|
a2d6e64d | 1 | # |
7a1462a3 | 2 | # TODO: |
6308c089 SS |
3 | # - gtk3 client is broken: |
4 | # GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported | |
5 | # - work on authentication and Freeciv database support (fcdb) | |
05a36390 | 6 | # - patch all packaged desktop files |
24382cc8 | 7 | # |
a2d6e64d | 8 | # Conditional build: |
696a3e6e | 9 | %bcond_without ggz_client # build without ggz client |
10 | %bcond_without ggz_server # build without ggz server | |
1304e7cf | 11 | %bcond_without magickwand # build without MagickWand map image toolkit support |
852f1cf3 | 12 | %bcond_without system_lua # build with bundled lua |
73fd6aa7 SS |
13 | %bcond_without gtk2 # build without gtk2 client |
14 | %bcond_without gtk3 # build without gtk3 client | |
15 | %bcond_without sdl # build without sdl client | |
16 | %bcond_without xaw # build without xaw client | |
17 | %bcond_with qt # build with qt client (broken) | |
e748604f | 18 | # |
68badbcf | 19 | Summary: FREE CIVilization clone |
a2d6e64d | 20 | Summary(es.UTF-8): Clon del juego Civilization |
21 | Summary(pl.UTF-8): Niekomercyjny klon CIVilization | |
22 | Summary(pt_BR.UTF-8): Clone do jogo Civilization | |
68badbcf | 23 | Name: freeciv |
b588d51d | 24 | Version: 2.4.4 |
7a1462a3 | 25 | Release: 0.3 |
d9c0a687 | 26 | License: GPL v2+ |
c4d7f9a4 | 27 | Group: X11/Applications/Games/Strategy |
53427aff | 28 | Source0: http://downloads.sourceforge.net/freeciv/%{name}-%{version}.tar.bz2 |
b588d51d | 29 | # Source0-md5: 038c53184497fcf31bcd268418dbe4f6 |
f1481f57 | 30 | # NOTE: current version of freeland tiles does not work with newest freeciv version |
31 | #Source1: http://download.gna.org/freeciv/contrib/tilesets/freeland/freeland-normal-2.0.0.tar.gz | |
a2d6e64d | 32 | Patch0: %{name}-link.patch |
7d71a717 | 33 | Patch1: %{name}-desktop.patch |
f8f12eb9 | 34 | Patch2: %{name}-ggz.patch |
999b152c | 35 | URL: http://freeciv.wikia.com/ |
1304e7cf | 36 | %{?with_magickwand:BuildRequires: ImageMagick-devel} |
73fd6aa7 | 37 | %if %{with sdl} |
d00642ee | 38 | BuildRequires: SDL_image-devel |
37e4bbeb | 39 | BuildRequires: SDL_mixer-devel |
73fd6aa7 | 40 | %endif |
a2d6e64d | 41 | BuildRequires: autoconf >= 2.52 |
744dee41 | 42 | BuildRequires: automake >= 1:1.9 |
b256fc05 | 43 | BuildRequires: curl-devel |
076a3f05 | 44 | BuildRequires: gettext-tools |
3de6f65c | 45 | %{?with_ggz_client:BuildRequires: ggz-gtk-client-devel} |
73fd6aa7 SS |
46 | %{?with_gtk2:BuildRequires: gtk+2-devel} |
47 | %{?with_gtk3:BuildRequires: gtk+3-devel} | |
3de6f65c | 48 | BuildRequires: libggz-devel |
c9f99b35 | 49 | BuildRequires: libpng-devel |
ef569fe1 | 50 | BuildRequires: libtool |
60163dd9 | 51 | %{?with_system_lua:BuildRequires: lua51-devel} |
a2d6e64d | 52 | BuildRequires: pkgconfig |
848e1b5f | 53 | BuildRequires: readline-devel |
73fd6aa7 | 54 | %{?with_xaw:BuildRequires: xorg-lib-libXaw-devel} |
848e1b5f | 55 | BuildRequires: zlib-devel |
254af51f | 56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
512c4044 | 57 | |
4bd37832 | 58 | %define specflags -O1 |
59 | ||
8e6171b1 | 60 | %description |
52afb265 | 61 | Free clone of Sid Meier's Civilization. Free Civilization clone for |
20965c93 | 62 | Unix and X. This is multiplayer strategic game and you can also play |
54c8b158 | 63 | against computer-AI players. |
8e6171b1 | 64 | |
8b555401 | 65 | %description -l es.UTF-8 |
eba39772 | 66 | Clon del juego Civilization. |
67 | ||
8b555401 | 68 | %description -l pl.UTF-8 |
c55f1852 | 69 | Freeciv jest to niekomercyjny (GPL) klon gry Civilization Sida Meiera. |
8b555401 | 70 | Jest to gra strategiczna dla systemu X Window. Można grać w nią z |
e64b1569 JB |
71 | innymi osobami poprzez sieć, a także przeciwko "graczom" zarządzanym |
72 | przez komputer. | |
8e6171b1 | 73 | |
8b555401 JR |
74 | %description -l pt_BR.UTF-8 |
75 | O FreeCiv é uma implementação do Civilization II para o Sistema X | |
eba39772 | 76 | Window. |
77 | ||
c55f1852 | 78 | %package client |
7a1462a3 SS |
79 | Summary: GTK2 Freeciv game client |
80 | Summary(pl.UTF-8): Klient gry Freeciv korzystający z GTK2 | |
c55f1852 | 81 | Group: X11/Applications/Games/Strategy |
82 | Requires: %{name} = %{version}-%{release} | |
7a1462a3 | 83 | Requires: %{name}-client-common = %{version}-%{release} |
6a3d034a | 84 | Suggests: %{name}-server = %{version}-%{release} |
c55f1852 | 85 | |
86 | %description client | |
7a1462a3 | 87 | This package contains GTK2-based Freeciv game client. |
c55f1852 | 88 | |
8b555401 | 89 | %description client -l pl.UTF-8 |
7a1462a3 SS |
90 | Ten pakiet zawiera klienta gry Freeciv korzystającego z GTK2. |
91 | ||
92 | %package client-common | |
93 | Summary: Freeciv game client common files | |
94 | Summary(pl.UTF-8): Wspólne pliki klientów gry Freeciv | |
95 | Group: X11/Applications/Games/Strategy | |
96 | Requires: %{name} = %{version}-%{release} | |
97 | Requires: %{name}-client-common = %{version}-%{release} | |
98 | Suggests: %{name}-server = %{version}-%{release} | |
99 | ||
100 | %description client-common | |
101 | This package contains common files for Freeciv game clients. | |
102 | ||
103 | %description client-common -l pl.UTF-8 | |
104 | Ten pakiet zawiera wspólne pliki dla klientów gry Freeciv. | |
105 | ||
106 | %package client-gtk3 | |
107 | Summary: GTK3 Freeciv game client | |
108 | Summary(pl.UTF-8): Klient gry Freeciv korzystający z GTK3 | |
109 | Group: X11/Applications/Games/Strategy | |
110 | Requires: %{name} = %{version}-%{release} | |
111 | Suggests: %{name}-server = %{version}-%{release} | |
112 | ||
113 | %description client-gtk3 | |
114 | This package contains GTK3-based Freeciv game client. | |
115 | ||
116 | %description client-gtk3 -l pl.UTF-8 | |
117 | Ten pakiet zawiera klienta gry Freeciv korzystającego z GTK3. | |
118 | ||
119 | %package client-sdl | |
120 | Summary: SDL Freeciv game client | |
121 | Summary(pl.UTF-8): Klient gry Freeciv korzystający z SDL | |
122 | Group: X11/Applications/Games/Strategy | |
123 | Requires: %{name} = %{version}-%{release} | |
124 | Requires: %{name}-client-common = %{version}-%{release} | |
125 | Requires: SDL_mixer | |
126 | Suggests: %{name}-server = %{version}-%{release} | |
127 | ||
128 | %description client-sdl | |
129 | This package contains SDL-based Freeciv game client. | |
130 | ||
131 | %description client-sdl -l pl.UTF-8 | |
132 | Ten pakiet zawiera klienta gry Freeciv korzystającego z SDL. | |
133 | ||
134 | %package client-xaw | |
135 | Summary: XAW Freeciv game client | |
136 | Summary(pl.UTF-8): Klient gry Freeciv korzystający z XAW | |
137 | Group: X11/Applications/Games/Strategy | |
138 | Requires: %{name} = %{version}-%{release} | |
139 | Requires: %{name}-client-common = %{version}-%{release} | |
140 | Suggests: %{name}-server = %{version}-%{release} | |
141 | ||
142 | %description client-xaw | |
143 | This package contains based Freeciv game client using XAW (X Athena | |
144 | Widgets). | |
145 | ||
146 | %description client-xaw -l pl.UTF-8 | |
147 | Ten pakiet zawiera klienta gry Freeciv korzystającego z biblioteki XAW | |
148 | (X Athena Widgets) | |
149 | ||
150 | %package client-modpack | |
151 | Summary: Custom content installer for the Freeciv game | |
152 | Summary(pl.UTF-8): Instalator dodatków do gry Freeciv | |
153 | Group: X11/Applications/Games/Strategy | |
154 | Requires: %{name} = %{version}-%{release} | |
155 | Requires: %{name}-client-common = %{version}-%{release} | |
156 | Suggests: %{name}-server = %{version}-%{release} | |
157 | ||
158 | %description client-modpack | |
159 | Custom content installer for the Freeciv game. | |
160 | ||
161 | This program allows users to select and download add-on content | |
162 | ("modpacks") for Freeciv from the Internet, either from a list | |
163 | maintained by the Freeciv team, or by using a URL obtained by other | |
164 | means. It takes care of installing the files in the correct place | |
165 | under the user's home directory for this version of Freeciv; it does | |
166 | not install anything for system-wide use. | |
167 | ||
168 | %description client-modpack -l pl.UTF-8 | |
169 | Ten pakiet zawiera instalator dodatków do gry Freeciv dostępnych w | |
170 | internecie. | |
c55f1852 | 171 | |
c55f1852 | 172 | %package server |
173 | Summary: Freeciv game server | |
a2d6e64d | 174 | Summary(pl.UTF-8): Serwer gry Freeciv |
c55f1852 | 175 | Group: X11/Applications/Games/Strategy |
176 | Requires: %{name} = %{version}-%{release} | |
177 | ||
178 | %description server | |
179 | This package contans Freeciv game server. | |
180 | ||
8b555401 | 181 | %description server -l pl.UTF-8 |
c55f1852 | 182 | Ten pakiet zawiera server gry Freeciv. |
183 | ||
8e6171b1 | 184 | %prep |
f1481f57 | 185 | %setup -q |
a2d6e64d | 186 | %patch0 -p1 |
293a1d81 | 187 | %patch1 -p1 |
f8f12eb9 | 188 | %patch2 -p1 |
8e6171b1 | 189 | |
190 | %build | |
e748604f | 191 | %{__libtoolize} |
f8f12eb9 | 192 | %{__aclocal} -I m4 |
a2d6e64d | 193 | %{__autoconf} |
194 | %{__autoheader} | |
195 | %{__automake} | |
196 | %configure \ | |
f8f12eb9 | 197 | --with-ggzd-confdir=%{_sysconfdir}/ggzd \ |
82c4aa50 | 198 | --disable-silent-rules \ |
73fd6aa7 | 199 | --enable-client=stub,%{?with_gtk2:gtk2},%{?with_gtk3:gtk3},%{?with_qt:qt},%{?with_sdl:sdl},%{?with_xaw:xaw} \ |
1304e7cf | 200 | --enable-mapimg=%{?with_magickwand:magickwand}%{!?with_magickwand:no} \ |
60163dd9 | 201 | %{?with_system_lua:--enable-sys-lua} \ |
999b152c ER |
202 | %{!?with_ggz_client:--without-ggz-client} \ |
203 | %{!?with_ggz_server:--without-ggz-server} | |
a2d6e64d | 204 | |
1402ce58 | 205 | %{__make} |
8e6171b1 | 206 | |
207 | %install | |
208 | rm -rf $RPM_BUILD_ROOT | |
a2d6e64d | 209 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} |
8e6171b1 | 210 | |
7eec69ca PG |
211 | %{__make} install \ |
212 | DESTDIR=$RPM_BUILD_ROOT | |
8e6171b1 | 213 | |
999b152c ER |
214 | cp -a client/%{name}.desktop $RPM_BUILD_ROOT%{_desktopdir}/%{name}-client.desktop |
215 | cp -a server/%{name}-server.desktop $RPM_BUILD_ROOT%{_desktopdir} | |
320ce787 | 216 | %{__rm} -f $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
90745ade | 217 | |
999b152c ER |
218 | cp -a data/icons/32x32/*.png $RPM_BUILD_ROOT%{_pixmapsdir} |
219 | cp -a data/stdsounds{,.soundspec} $RPM_BUILD_ROOT%{_datadir}/%{name} | |
ac951725 | 220 | #cp -a freeland.tilespec $RPM_BUILD_ROOT%{_datadir}/%{name} |
1f960d6b | 221 | #cp -a freeland $RPM_BUILD_ROOT%{_datadir}/%{name} |
38b7e0fd | 222 | |
37e4bbeb | 223 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no |
320ce787 | 224 | %{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir}/ggz.modules |
a2d6e64d | 225 | |
24382cc8 | 226 | cp -a data/gtk_menus.xml $RPM_BUILD_ROOT%{_datadir}/%{name} |
b274a5f1 | 227 | |
dc958ef7 | 228 | %if %{with ggz_server} |
229 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/{games,rooms} | |
999b152c ER |
230 | cp -a data/civserver.dsc $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/games/civserver.dsc |
231 | cp -a data/civserver.room $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/rooms/civserver.room | |
dc958ef7 | 232 | %endif |
233 | ||
37e4bbeb | 234 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
cce99d3e | 235 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfreeciv{,-srv}.{a,la} |
60817f48 | 236 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-qt* |
cce99d3e | 237 | |
a13c0015 SS |
238 | # from freeciv-manual man: |
239 | # This tool is currently only really of use to the Freeciv maintainers, | |
240 | # as a starting point for pages on the main Freeciv wiki; | |
241 | # it's not very useful to end users. | |
242 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/freeciv-manual | |
243 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-manual* | |
244 | ||
26864214 SS |
245 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/freeciv-stub |
246 | ||
10c5731a | 247 | %find_lang %{name} |
248 | ||
8e6171b1 | 249 | %clean |
250 | rm -rf $RPM_BUILD_ROOT | |
251 | ||
10c5731a | 252 | %files -f %{name}.lang |
063665a5 | 253 | %defattr(644,root,root,755) |
2770169a SS |
254 | %doc AUTHORS doc/BUGS ChangeLog doc/FAQ doc/HOWTOPLAY |
255 | %doc NEWS NEWS-2.4 | |
256 | %doc doc/README.SDLClient doc/README.cma doc/README.effects doc/README.fcdb | |
257 | %doc doc/README.graphics doc/README.sound | |
258 | %doc doc/README.ruleset_experimental doc/README.ruleset_multiplayer doc/README.rulesets | |
259 | %doc doc/TODO | |
70461273 | 260 | %dir %{_datadir}/%{name} |
c55f1852 | 261 | %{_datadir}/%{name}/helpdata.txt |
262 | ||
263 | %files server | |
264 | %defattr(644,root,root,755) | |
e748604f | 265 | %attr(755,root,root) %{_bindir}/freeciv-server |
a13c0015 | 266 | #attr(755,root,root) %{_bindir}/freeciv-manual |
c55f1852 | 267 | %{_desktopdir}/%{name}-server.desktop |
6c98e562 | 268 | %{_datadir}/appdata/freeciv-server.appdata.xml |
c55f1852 | 269 | %{_datadir}/%{name}/civ1 |
270 | %{_datadir}/%{name}/civ2 | |
271 | %{_datadir}/%{name}/default | |
9f0b2873 | 272 | %{_datadir}/%{name}/experimental |
273 | %{_datadir}/%{name}/multiplayer | |
c55f1852 | 274 | %{_datadir}/%{name}/nation |
9c8a8e09 | 275 | %{_datadir}/%{name}/scenarios |
c55f1852 | 276 | %{_datadir}/%{name}/*.serv |
e748604f | 277 | %{_mandir}/man6/freeciv-server.6* |
a13c0015 | 278 | #{_mandir}/man6/freeciv-manual.6* |
e748604f | 279 | %{_iconsdir}/hicolor/*/apps/freeciv-server.png |
280 | %{_pixmapsdir}/freeciv-server.png | |
a336af56 ER |
281 | |
282 | %if %{with ggz_server} | |
283 | %dir %{_sysconfdir}/ggzd | |
284 | %dir %{_sysconfdir}/ggzd/games | |
285 | %dir %{_sysconfdir}/ggzd/rooms | |
286 | %{_sysconfdir}/ggzd/games/civserver.dsc | |
287 | %{_sysconfdir}/ggzd/rooms/civserver.room | |
288 | %endif | |
c55f1852 | 289 | |
7a1462a3 | 290 | %files client-common |
c55f1852 | 291 | %defattr(644,root,root,755) |
90745ade | 292 | %{_datadir}/%{name}/*.*spec |
9f0b2873 | 293 | %{_datadir}/%{name}/amplio2 |
90745ade | 294 | %{_datadir}/%{name}/buildings |
6223fa29 | 295 | %{_datadir}/%{name}/cimpletoon |
90745ade | 296 | %{_datadir}/%{name}/flags |
24382cc8 | 297 | %{_datadir}/%{name}/gtk_menus.xml |
90745ade | 298 | %{_datadir}/%{name}/hex2t |
d9c0a687 | 299 | %{_datadir}/%{name}/isophex |
c55f1852 | 300 | %{_datadir}/%{name}/isotrident |
301 | %{_datadir}/%{name}/misc | |
a2d6e64d | 302 | %{_datadir}/%{name}/stdsounds |
90745ade JK |
303 | %{_datadir}/%{name}/themes |
304 | %{_datadir}/%{name}/trident | |
305 | %{_datadir}/%{name}/wonders | |
7a1462a3 SS |
306 | |
307 | %files client-modpack | |
308 | %defattr(644,root,root,755) | |
309 | %attr(755,root,root) %{_bindir}/freeciv-modpack | |
310 | %{_desktopdir}/%{name}-modpack.desktop | |
311 | %{_datadir}/appdata/freeciv-modpack.appdata.xml | |
312 | %{_iconsdir}/hicolor/*/apps/freeciv-modpack.png | |
313 | %{_pixmapsdir}/freeciv-modpack.png | |
314 | %{_mandir}/man6/freeciv-modpack.6* | |
315 | ||
316 | %if %{with gtk2} | |
317 | %files client | |
318 | %defattr(644,root,root,755) | |
319 | %attr(755,root,root) %{_bindir}/freeciv-gtk2 | |
320 | %{_desktopdir}/%{name}-client.desktop | |
321 | %{_datadir}/appdata/freeciv-gtk2.appdata.xml | |
320ce787 | 322 | %{_datadir}/%{name}/freeciv.rc-2.0 |
e748604f | 323 | %{_mandir}/man6/freeciv-client.6* |
324 | %{_mandir}/man6/freeciv-gtk2.6* | |
7a1462a3 SS |
325 | %{_iconsdir}/hicolor/*/apps/freeciv-client.png |
326 | %{_pixmapsdir}/freeciv-client.png | |
327 | %endif | |
328 | ||
329 | %if %{with gtk3} | |
330 | %files client-gtk3 | |
331 | %defattr(644,root,root,755) | |
332 | %attr(755,root,root) %{_bindir}/freeciv-gtk3 | |
333 | %{_desktopdir}/%{name}-gtk3.desktop | |
334 | %{_datadir}/appdata/freeciv-gtk3.appdata.xml | |
a5977815 | 335 | %{_mandir}/man6/freeciv-gtk3.6* |
7a1462a3 SS |
336 | %endif |
337 | ||
338 | %if %{with sdl} | |
339 | %files client-sdl | |
340 | %defattr(644,root,root,755) | |
341 | %attr(755,root,root) %{_bindir}/freeciv-sdl | |
342 | %{_desktopdir}/%{name}-sdl.desktop | |
343 | %{_datadir}/appdata/freeciv-sdl.appdata.xml | |
c3f6abd3 | 344 | %{_mandir}/man6/freeciv-sdl.6* |
7a1462a3 SS |
345 | %endif |
346 | ||
347 | %if %{with xaw} | |
348 | %files client-xaw | |
349 | %defattr(644,root,root,755) | |
350 | %attr(755,root,root) %{_bindir}/freeciv-xaw | |
351 | %{_datadir}/%{name}/Freeciv | |
c3f6abd3 | 352 | %{_mandir}/man6/freeciv-xaw.6* |
7a1462a3 | 353 | %endif |
6223fa29 | 354 |