]>
Commit | Line | Data |
---|---|---|
a2d6e64d | 1 | # |
7a1462a3 | 2 | # TODO: |
6308c089 | 3 | # - work on authentication and Freeciv database support (fcdb) |
05a36390 | 4 | # - patch all packaged desktop files |
1508b7a4 | 5 | # - modpack requires gtk2 or gtk3 |
24382cc8 | 6 | # |
a2d6e64d | 7 | # Conditional build: |
696a3e6e | 8 | %bcond_without ggz_client # build without ggz client |
9 | %bcond_without ggz_server # build without ggz server | |
1304e7cf | 10 | %bcond_without magickwand # build without MagickWand map image toolkit support |
852f1cf3 | 11 | %bcond_without system_lua # build with bundled lua |
73fd6aa7 SS |
12 | %bcond_without gtk2 # build without gtk2 client |
13 | %bcond_without gtk3 # build without gtk3 client | |
14 | %bcond_without sdl # build without sdl client | |
15 | %bcond_without xaw # build without xaw client | |
16 | %bcond_with qt # build with qt client (broken) | |
1508b7a4 | 17 | %bcond_without modpack # build without modpack installer |
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 |
b2320de6 | 25 | Release: 9 |
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 |
564e89ca | 35 | Patch3: imagemagick7.patch |
999b152c | 36 | URL: http://freeciv.wikia.com/ |
1304e7cf | 37 | %{?with_magickwand:BuildRequires: ImageMagick-devel} |
61fa7de7 | 38 | %{?with_sdl:BuildRequires: SDL_image-devel} |
37e4bbeb | 39 | BuildRequires: SDL_mixer-devel |
a2d6e64d | 40 | BuildRequires: autoconf >= 2.52 |
744dee41 | 41 | BuildRequires: automake >= 1:1.9 |
b256fc05 | 42 | BuildRequires: curl-devel |
076a3f05 | 43 | BuildRequires: gettext-tools |
3de6f65c | 44 | %{?with_ggz_client:BuildRequires: ggz-gtk-client-devel} |
053c7562 | 45 | BuildRequires: glib2-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} | |
577a96c7 | 97 | Requires: SDL_mixer |
7a1462a3 SS |
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} | |
7a1462a3 SS |
125 | Suggests: %{name}-server = %{version}-%{release} |
126 | ||
127 | %description client-sdl | |
128 | This package contains SDL-based Freeciv game client. | |
129 | ||
130 | %description client-sdl -l pl.UTF-8 | |
131 | Ten pakiet zawiera klienta gry Freeciv korzystającego z SDL. | |
132 | ||
133 | %package client-xaw | |
134 | Summary: XAW Freeciv game client | |
135 | Summary(pl.UTF-8): Klient gry Freeciv korzystający z XAW | |
136 | Group: X11/Applications/Games/Strategy | |
137 | Requires: %{name} = %{version}-%{release} | |
138 | Requires: %{name}-client-common = %{version}-%{release} | |
139 | Suggests: %{name}-server = %{version}-%{release} | |
140 | ||
141 | %description client-xaw | |
142 | This package contains based Freeciv game client using XAW (X Athena | |
143 | Widgets). | |
144 | ||
145 | %description client-xaw -l pl.UTF-8 | |
146 | Ten pakiet zawiera klienta gry Freeciv korzystającego z biblioteki XAW | |
147 | (X Athena Widgets) | |
148 | ||
6d8e39a0 | 149 | %package modpack |
7a1462a3 SS |
150 | Summary: Custom content installer for the Freeciv game |
151 | Summary(pl.UTF-8): Instalator dodatków do gry Freeciv | |
152 | Group: X11/Applications/Games/Strategy | |
153 | Requires: %{name} = %{version}-%{release} | |
154 | Requires: %{name}-client-common = %{version}-%{release} | |
155 | Suggests: %{name}-server = %{version}-%{release} | |
156 | ||
6d8e39a0 | 157 | %description modpack |
7a1462a3 SS |
158 | Custom content installer for the Freeciv game. |
159 | ||
160 | This program allows users to select and download add-on content | |
161 | ("modpacks") for Freeciv from the Internet, either from a list | |
162 | maintained by the Freeciv team, or by using a URL obtained by other | |
163 | means. It takes care of installing the files in the correct place | |
164 | under the user's home directory for this version of Freeciv; it does | |
165 | not install anything for system-wide use. | |
166 | ||
6d8e39a0 | 167 | %description modpack -l pl.UTF-8 |
7a1462a3 SS |
168 | Ten pakiet zawiera instalator dodatków do gry Freeciv dostępnych w |
169 | internecie. | |
c55f1852 | 170 | |
c55f1852 | 171 | %package server |
172 | Summary: Freeciv game server | |
a2d6e64d | 173 | Summary(pl.UTF-8): Serwer gry Freeciv |
c55f1852 | 174 | Group: X11/Applications/Games/Strategy |
175 | Requires: %{name} = %{version}-%{release} | |
176 | ||
177 | %description server | |
178 | This package contans Freeciv game server. | |
179 | ||
8b555401 | 180 | %description server -l pl.UTF-8 |
c55f1852 | 181 | Ten pakiet zawiera server gry Freeciv. |
182 | ||
8e6171b1 | 183 | %prep |
f1481f57 | 184 | %setup -q |
a2d6e64d | 185 | %patch0 -p1 |
293a1d81 | 186 | %patch1 -p1 |
f8f12eb9 | 187 | %patch2 -p1 |
564e89ca | 188 | %patch3 -p1 |
8e6171b1 | 189 | |
053c7562 JR |
190 | cp -f /usr/share/aclocal/glib-gettext.m4 m4/ |
191 | ||
8e6171b1 | 192 | %build |
e748604f | 193 | %{__libtoolize} |
f8f12eb9 | 194 | %{__aclocal} -I m4 |
a2d6e64d | 195 | %{__autoconf} |
196 | %{__autoheader} | |
197 | %{__automake} | |
198 | %configure \ | |
f8f12eb9 | 199 | --with-ggzd-confdir=%{_sysconfdir}/ggzd \ |
82c4aa50 | 200 | --disable-silent-rules \ |
73fd6aa7 | 201 | --enable-client=stub,%{?with_gtk2:gtk2},%{?with_gtk3:gtk3},%{?with_qt:qt},%{?with_sdl:sdl},%{?with_xaw:xaw} \ |
1304e7cf | 202 | --enable-mapimg=%{?with_magickwand:magickwand}%{!?with_magickwand:no} \ |
1508b7a4 | 203 | %{!?with_modpack:--enable-fcmp=no} \ |
60163dd9 | 204 | %{?with_system_lua:--enable-sys-lua} \ |
999b152c ER |
205 | %{!?with_ggz_client:--without-ggz-client} \ |
206 | %{!?with_ggz_server:--without-ggz-server} | |
a2d6e64d | 207 | |
1402ce58 | 208 | %{__make} |
8e6171b1 | 209 | |
210 | %install | |
211 | rm -rf $RPM_BUILD_ROOT | |
a2d6e64d | 212 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} |
8e6171b1 | 213 | |
7eec69ca PG |
214 | %{__make} install \ |
215 | DESTDIR=$RPM_BUILD_ROOT | |
8e6171b1 | 216 | |
999b152c ER |
217 | cp -a client/%{name}.desktop $RPM_BUILD_ROOT%{_desktopdir}/%{name}-client.desktop |
218 | cp -a server/%{name}-server.desktop $RPM_BUILD_ROOT%{_desktopdir} | |
320ce787 | 219 | %{__rm} -f $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop |
90745ade | 220 | |
999b152c ER |
221 | cp -a data/icons/32x32/*.png $RPM_BUILD_ROOT%{_pixmapsdir} |
222 | cp -a data/stdsounds{,.soundspec} $RPM_BUILD_ROOT%{_datadir}/%{name} | |
ac951725 | 223 | #cp -a freeland.tilespec $RPM_BUILD_ROOT%{_datadir}/%{name} |
1f960d6b | 224 | #cp -a freeland $RPM_BUILD_ROOT%{_datadir}/%{name} |
38b7e0fd | 225 | |
37e4bbeb | 226 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no |
320ce787 | 227 | %{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir}/ggz.modules |
a2d6e64d | 228 | |
24382cc8 | 229 | cp -a data/gtk_menus.xml $RPM_BUILD_ROOT%{_datadir}/%{name} |
b274a5f1 | 230 | |
dc958ef7 | 231 | %if %{with ggz_server} |
232 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/{games,rooms} | |
999b152c ER |
233 | cp -a data/civserver.dsc $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/games/civserver.dsc |
234 | cp -a data/civserver.room $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/rooms/civserver.room | |
dc958ef7 | 235 | %endif |
236 | ||
37e4bbeb | 237 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name} |
cce99d3e | 238 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfreeciv{,-srv}.{a,la} |
60817f48 | 239 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-qt* |
cce99d3e | 240 | |
a13c0015 SS |
241 | # from freeciv-manual man: |
242 | # This tool is currently only really of use to the Freeciv maintainers, | |
243 | # as a starting point for pages on the main Freeciv wiki; | |
244 | # it's not very useful to end users. | |
245 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/freeciv-manual | |
246 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-manual* | |
247 | ||
26864214 SS |
248 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/freeciv-stub |
249 | ||
d261740c SS |
250 | # needed if building --without gtk2,gtk3,sdl |
251 | %{__install} -d $RPM_BUILD_ROOT%{_datadir}/%{name}/themes | |
252 | ||
10c5731a | 253 | %find_lang %{name} |
254 | ||
8e6171b1 | 255 | %clean |
256 | rm -rf $RPM_BUILD_ROOT | |
257 | ||
10c5731a | 258 | %files -f %{name}.lang |
063665a5 | 259 | %defattr(644,root,root,755) |
2770169a SS |
260 | %doc AUTHORS doc/BUGS ChangeLog doc/FAQ doc/HOWTOPLAY |
261 | %doc NEWS NEWS-2.4 | |
262 | %doc doc/README.SDLClient doc/README.cma doc/README.effects doc/README.fcdb | |
263 | %doc doc/README.graphics doc/README.sound | |
264 | %doc doc/README.ruleset_experimental doc/README.ruleset_multiplayer doc/README.rulesets | |
265 | %doc doc/TODO | |
70461273 | 266 | %dir %{_datadir}/%{name} |
c55f1852 | 267 | %{_datadir}/%{name}/helpdata.txt |
268 | ||
269 | %files server | |
270 | %defattr(644,root,root,755) | |
e748604f | 271 | %attr(755,root,root) %{_bindir}/freeciv-server |
a13c0015 | 272 | #attr(755,root,root) %{_bindir}/freeciv-manual |
c55f1852 | 273 | %{_desktopdir}/%{name}-server.desktop |
6c98e562 | 274 | %{_datadir}/appdata/freeciv-server.appdata.xml |
c55f1852 | 275 | %{_datadir}/%{name}/civ1 |
276 | %{_datadir}/%{name}/civ2 | |
277 | %{_datadir}/%{name}/default | |
9f0b2873 | 278 | %{_datadir}/%{name}/experimental |
279 | %{_datadir}/%{name}/multiplayer | |
c55f1852 | 280 | %{_datadir}/%{name}/nation |
9c8a8e09 | 281 | %{_datadir}/%{name}/scenarios |
c55f1852 | 282 | %{_datadir}/%{name}/*.serv |
e748604f | 283 | %{_mandir}/man6/freeciv-server.6* |
a13c0015 | 284 | #{_mandir}/man6/freeciv-manual.6* |
e748604f | 285 | %{_iconsdir}/hicolor/*/apps/freeciv-server.png |
286 | %{_pixmapsdir}/freeciv-server.png | |
a336af56 ER |
287 | |
288 | %if %{with ggz_server} | |
289 | %dir %{_sysconfdir}/ggzd | |
290 | %dir %{_sysconfdir}/ggzd/games | |
291 | %dir %{_sysconfdir}/ggzd/rooms | |
292 | %{_sysconfdir}/ggzd/games/civserver.dsc | |
293 | %{_sysconfdir}/ggzd/rooms/civserver.room | |
294 | %endif | |
c55f1852 | 295 | |
7a1462a3 | 296 | %files client-common |
c55f1852 | 297 | %defattr(644,root,root,755) |
90745ade | 298 | %{_datadir}/%{name}/*.*spec |
9f0b2873 | 299 | %{_datadir}/%{name}/amplio2 |
90745ade | 300 | %{_datadir}/%{name}/buildings |
6223fa29 | 301 | %{_datadir}/%{name}/cimpletoon |
90745ade | 302 | %{_datadir}/%{name}/flags |
24382cc8 | 303 | %{_datadir}/%{name}/gtk_menus.xml |
90745ade | 304 | %{_datadir}/%{name}/hex2t |
d9c0a687 | 305 | %{_datadir}/%{name}/isophex |
c55f1852 | 306 | %{_datadir}/%{name}/isotrident |
307 | %{_datadir}/%{name}/misc | |
a2d6e64d | 308 | %{_datadir}/%{name}/stdsounds |
d261740c | 309 | %dir %{_datadir}/%{name}/themes |
90745ade JK |
310 | %{_datadir}/%{name}/trident |
311 | %{_datadir}/%{name}/wonders | |
7a1462a3 | 312 | |
1508b7a4 | 313 | %if %{with modpack} |
6d8e39a0 | 314 | %files modpack |
7a1462a3 SS |
315 | %defattr(644,root,root,755) |
316 | %attr(755,root,root) %{_bindir}/freeciv-modpack | |
317 | %{_desktopdir}/%{name}-modpack.desktop | |
318 | %{_datadir}/appdata/freeciv-modpack.appdata.xml | |
319 | %{_iconsdir}/hicolor/*/apps/freeciv-modpack.png | |
320 | %{_pixmapsdir}/freeciv-modpack.png | |
321 | %{_mandir}/man6/freeciv-modpack.6* | |
1508b7a4 | 322 | %endif |
7a1462a3 SS |
323 | |
324 | %if %{with gtk2} | |
325 | %files client | |
326 | %defattr(644,root,root,755) | |
327 | %attr(755,root,root) %{_bindir}/freeciv-gtk2 | |
328 | %{_desktopdir}/%{name}-client.desktop | |
329 | %{_datadir}/appdata/freeciv-gtk2.appdata.xml | |
320ce787 | 330 | %{_datadir}/%{name}/freeciv.rc-2.0 |
d261740c | 331 | %{_datadir}/%{name}/themes/gui-gtk-2.0 |
e748604f | 332 | %{_mandir}/man6/freeciv-client.6* |
333 | %{_mandir}/man6/freeciv-gtk2.6* | |
7a1462a3 SS |
334 | %{_iconsdir}/hicolor/*/apps/freeciv-client.png |
335 | %{_pixmapsdir}/freeciv-client.png | |
336 | %endif | |
337 | ||
338 | %if %{with gtk3} | |
339 | %files client-gtk3 | |
340 | %defattr(644,root,root,755) | |
341 | %attr(755,root,root) %{_bindir}/freeciv-gtk3 | |
342 | %{_desktopdir}/%{name}-gtk3.desktop | |
343 | %{_datadir}/appdata/freeciv-gtk3.appdata.xml | |
d261740c | 344 | %{_datadir}/%{name}/themes/gui-gtk-3.0 |
a5977815 | 345 | %{_mandir}/man6/freeciv-gtk3.6* |
7a1462a3 SS |
346 | %endif |
347 | ||
348 | %if %{with sdl} | |
349 | %files client-sdl | |
350 | %defattr(644,root,root,755) | |
351 | %attr(755,root,root) %{_bindir}/freeciv-sdl | |
352 | %{_desktopdir}/%{name}-sdl.desktop | |
353 | %{_datadir}/appdata/freeciv-sdl.appdata.xml | |
d261740c | 354 | %{_datadir}/%{name}/themes/gui-sdl |
c3f6abd3 | 355 | %{_mandir}/man6/freeciv-sdl.6* |
7a1462a3 SS |
356 | %endif |
357 | ||
358 | %if %{with xaw} | |
359 | %files client-xaw | |
360 | %defattr(644,root,root,755) | |
361 | %attr(755,root,root) %{_bindir}/freeciv-xaw | |
362 | %{_datadir}/%{name}/Freeciv | |
c3f6abd3 | 363 | %{_mandir}/man6/freeciv-xaw.6* |
7a1462a3 | 364 | %endif |
6223fa29 | 365 |