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