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