]> git.pld-linux.org Git - packages/freeciv.git/blob - freeciv.spec
- updated to 2.6.6
[packages/freeciv.git] / freeciv.spec
1 #
2 # TODO:
3 #       - more modpack variants beside gtk3?
4 #       - qt client and modpack? (Qt5Core, Qt5Gui, Qt5Widgets >= 5.2)
5 #       - sdl2 instead of sdl?
6 #       - gtk3.22 instead of gtk3?
7 #       - work on authentication and Freeciv database support (fcdb: mysql/postgres/sqlite3)
8 #       - patch all packaged desktop files
9 #
10 # Conditional build:
11 %bcond_without  magickwand      # MagickWand map image toolkit support
12 %bcond_without  system_lua      # system Lua
13 %bcond_without  gtk2            # GTK+ 2 client
14 %bcond_without  gtk3            # GTK+ 3 client
15 %bcond_without  sdl             # SDL client
16 %bcond_without  xaw             # Xaw client
17 %bcond_with     qt              # Qt client (used to be broken)
18 %bcond_without  modpack         # modpack installer
19 %bcond_without  ruledit         # (Qt based) rule editor
20 #
21 Summary:        FREE CIVilization clone
22 Summary(es.UTF-8):      Clon del juego Civilization
23 Summary(pl.UTF-8):      Niekomercyjny klon CIVilization
24 Summary(pt_BR.UTF-8):   Clone do jogo Civilization
25 Name:           freeciv
26 Version:        2.6.6
27 Release:        1
28 License:        GPL v2+
29 Group:          X11/Applications/Games/Strategy
30 Source0:        http://downloads.sourceforge.net/freeciv/%{name}-%{version}.tar.bz2
31 # Source0-md5:  2f40775f142b509c0bfc6db89a3a8171
32 # NOTE: current version of freeland tiles does not work with newest freeciv version
33 #Source1:       http://download.gna.org/freeciv/contrib/tilesets/freeland/freeland-normal-2.0.0.tar.gz
34 Patch0:         %{name}-link.patch
35 Patch1:         %{name}-desktop.patch
36 URL:            http://freeciv.wikia.com/
37 %{?with_magickwand:BuildRequires:       ImageMagick-devel}
38 %{?with_sdl:BuildRequires:      SDL_image-devel}
39 BuildRequires:  SDL_ttf-devel
40 BuildRequires:  SDL_mixer-devel
41 BuildRequires:  autoconf >= 2.61
42 BuildRequires:  automake >= 1:1.9
43 BuildRequires:  bzip2-devel
44 BuildRequires:  curl-devel >= 7.12.1
45 BuildRequires:  gettext-tools
46 BuildRequires:  glib2-devel
47 %{?with_gtk2:BuildRequires:     gtk+2-devel >= 2:2.12.0}
48 %{?with_gtk3:BuildRequires:     gtk+3-devel >= 3.8.0}
49 BuildRequires:  libpng-devel
50 BuildRequires:  libtool
51 BuildRequires:  libxml2-devel >= 2.0
52 %{?with_system_lua:BuildRequires:       lua53-devel}
53 BuildRequires:  pkgconfig
54 BuildRequires:  readline-devel
55 %{?with_xaw:BuildRequires:      xorg-lib-libXaw-devel}
56 BuildRequires:  xz-devel
57 BuildRequires:  zlib-devel
58 %if %{with ruledit}
59 BuildRequires:  Qt5Core-devel >= 5.2
60 BuildRequires:  Qt5Gui-devel >= 5.2
61 BuildRequires:  Qt5Widgets-devel >= 5.2
62 BuildRequires:  qt5-build >= 5.2
63 %endif
64 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66 %define         specflags       -O1
67
68 %description
69 Free clone of Sid Meier's Civilization. Free Civilization clone for
70 Unix and X. This is multiplayer strategic game and you can also play
71 against computer-AI players.
72
73 %description -l es.UTF-8
74 Clon del juego Civilization.
75
76 %description -l pl.UTF-8
77 Freeciv jest to niekomercyjny (GPL) klon gry Civilization Sida Meiera.
78 Jest to gra strategiczna dla systemu X Window. Można grać w nią z
79 innymi osobami poprzez sieć, a także przeciwko "graczom" zarządzanym
80 przez komputer.
81
82 %description -l pt_BR.UTF-8
83 O FreeCiv é uma implementação do Civilization II para o Sistema X
84 Window.
85
86 %package client-common
87 Summary:        Freeciv game client common files
88 Summary(pl.UTF-8):      Wspólne pliki klientów gry Freeciv
89 Group:          X11/Applications/Games/Strategy
90 Requires:       %{name} = %{version}-%{release}
91 Requires:       SDL_mixer
92 Suggests:       %{name}-server = %{version}-%{release}
93
94 %description client-common
95 This package contains common files for Freeciv game clients.
96
97 %description client-common -l pl.UTF-8
98 Ten pakiet zawiera wspólne pliki dla klientów gry Freeciv.
99
100 %package client
101 Summary:        GTK2 Freeciv game client
102 Summary(pl.UTF-8):      Klient gry Freeciv korzystający z GTK2
103 Group:          X11/Applications/Games/Strategy
104 Requires:       %{name} = %{version}-%{release}
105 Requires:       %{name}-client-common = %{version}-%{release}
106 Requires:       gtk+2 >= 2:2.12.0
107 Suggests:       %{name}-server = %{version}-%{release}
108
109 %description client
110 This package contains GTK2-based Freeciv game client.
111
112 %description client -l pl.UTF-8
113 Ten pakiet zawiera klienta gry Freeciv korzystającego z GTK2.
114
115 %package client-gtk3
116 Summary:        GTK3 Freeciv game client
117 Summary(pl.UTF-8):      Klient gry Freeciv korzystający z GTK3
118 Group:          X11/Applications/Games/Strategy
119 Requires:       %{name} = %{version}-%{release}
120 Requires:       gtk+3 >= 3.8.0
121 Suggests:       %{name}-server = %{version}-%{release}
122
123 %description client-gtk3
124 This package contains GTK3-based Freeciv game client.
125
126 %description client-gtk3 -l pl.UTF-8
127 Ten pakiet zawiera klienta gry Freeciv korzystającego z GTK3.
128
129 %package client-sdl
130 Summary:        SDL Freeciv game client
131 Summary(pl.UTF-8):      Klient gry Freeciv korzystający z SDL
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-sdl
138 This package contains SDL-based Freeciv game client.
139
140 %description client-sdl -l pl.UTF-8
141 Ten pakiet zawiera klienta gry Freeciv korzystającego z SDL.
142
143 %package client-xaw
144 Summary:        XAW Freeciv game client
145 Summary(pl.UTF-8):      Klient gry Freeciv korzystający z XAW
146 Group:          X11/Applications/Games/Strategy
147 Requires:       %{name} = %{version}-%{release}
148 Requires:       %{name}-client-common = %{version}-%{release}
149 Suggests:       %{name}-server = %{version}-%{release}
150
151 %description client-xaw
152 This package contains based Freeciv game client using XAW (X Athena
153 Widgets).
154
155 %description client-xaw -l pl.UTF-8
156 Ten pakiet zawiera klienta gry Freeciv korzystającego z biblioteki XAW
157 (X Athena Widgets)
158
159 %package modpack
160 Summary:        Custom content installer for the Freeciv game
161 Summary(pl.UTF-8):      Instalator dodatków do gry Freeciv
162 Group:          X11/Applications/Games/Strategy
163 Requires:       %{name} = %{version}-%{release}
164 Requires:       %{name}-client-common = %{version}-%{release}
165 Requires:       gtk+3 >= 3.8.0
166 Suggests:       %{name}-server = %{version}-%{release}
167
168 %description modpack
169 Custom content installer for the Freeciv game.
170
171 This program allows users to select and download add-on content
172 ("modpacks") for Freeciv from the Internet, either from a list
173 maintained by the Freeciv team, or by using a URL obtained by other
174 means. It takes care of installing the files in the correct place
175 under the user's home directory for this version of Freeciv; it does
176 not install anything for system-wide use.
177
178 %description modpack -l pl.UTF-8
179 Ten pakiet zawiera instalator dodatków do gry Freeciv dostępnych w
180 internecie.
181
182 %package ruledit
183 Summary:        Freeciv graphical ruleset editor
184 Summary(pl.UTF-8):      Graficzny edytor reguł gry Freeciv
185 Group:          X11/Applications/Games/Strategy
186 Requires:       %{name} = %{version}-%{release}
187
188 %description ruledit
189 Freeciv graphical ruleset editor.
190
191 %description ruledit -l pl.UTF-8
192 Graficzny edytor reguł gry Freeciv.
193
194 %package server
195 Summary:        Freeciv game server
196 Summary(pl.UTF-8):      Serwer gry Freeciv
197 Group:          X11/Applications/Games/Strategy
198 Requires:       %{name} = %{version}-%{release}
199
200 %description server
201 This package contans Freeciv game server.
202
203 %description server -l pl.UTF-8
204 Ten pakiet zawiera server gry Freeciv.
205
206 %prep
207 %setup -q
208 %patch0 -p1
209 #%patch1 -p1
210
211 cp -f %{_aclocaldir}/glib-gettext.m4 m4/
212
213 %build
214 %{__libtoolize}
215 %{__aclocal} -I m4 -I dependencies/m4
216 %{__autoconf}
217 %{__autoheader}
218 %{__automake}
219 %configure \
220         --disable-silent-rules \
221         --enable-client=stub,%{?with_gtk2:gtk2},%{?with_gtk3:gtk3},%{?with_qt:qt},%{?with_sdl:sdl},%{?with_xaw:xaw} \
222         --enable-fcmp=%{?with_modpack:gtk3}%{!?with_modpack:no} \
223         --enable-mapimg=%{?with_magickwand:magickwand}%{!?with_magickwand:no} \
224         %{!?with_ruledit:--disable-ruledit} \
225         %{?with_sdl:--enable-sdl-mixer=sdl} \
226         %{?with_system_lua:--enable-sys-lua}
227
228 %{__make}
229
230 %install
231 rm -rf $RPM_BUILD_ROOT
232 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
233
234 %{__make} install \
235         DESTDIR=$RPM_BUILD_ROOT
236
237 #cp -a client/%{name}.desktop $RPM_BUILD_ROOT%{_desktopdir}/%{name}-client.desktop
238 #cp -a server/%{name}-server.desktop $RPM_BUILD_ROOT%{_desktopdir}
239 #%{__rm} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
240
241 cp -a data/icons/32x32/*.png $RPM_BUILD_ROOT%{_pixmapsdir}
242 cp -a data/stdsounds{,.soundspec} $RPM_BUILD_ROOT%{_datadir}/%{name}
243
244 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
245 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfreeciv{,-srv}.{a,la}
246 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-qt*
247
248 # from freeciv-manual man:
249 #      This tool is currently only really of use to the Freeciv maintainers,
250 #      as a starting point for  pages  on  the  main Freeciv wiki;
251 #      it's not very useful to end users.
252 %{__rm} $RPM_BUILD_ROOT%{_bindir}/freeciv-manual
253 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-manual*
254
255 %{__rm} $RPM_BUILD_ROOT%{_bindir}/freeciv-stub
256
257 # unpackaged variants
258 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-{gtk3.22,mp-cli,mp-gtk2,mp-qt,sdl2}.6*
259
260 # needed if building --without gtk2,gtk3,sdl
261 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/themes
262
263 %find_lang %{name}
264 %find_lang %{name}-nations -a %{name}.lang
265 %if %{with ruledit}
266 %find_lang %{name}-ruledit
267 %endif
268
269 %clean
270 rm -rf $RPM_BUILD_ROOT
271
272 %files -f %{name}.lang
273 %defattr(644,root,root,755)
274 %doc AUTHORS ChangeLog NEWS NEWS-2.6 doc/{BUGS,FAQ,HOWTOPLAY,README.effects,README.fcdb,README.graphics,README.sound,README.rulesets,TODO}
275 %dir %{_datadir}/%{name}
276 %{_datadir}/%{name}/helpdata.txt
277
278 %files client-common
279 %defattr(644,root,root,755)
280 %{_datadir}/%{name}/*.*spec
281 %{_datadir}/%{name}/amplio2
282 %{_datadir}/%{name}/buildings
283 %{_datadir}/%{name}/cimpletoon
284 %{_datadir}/%{name}/flags
285 %{_datadir}/%{name}/hex2t
286 %{_datadir}/%{name}/isophex
287 %{_datadir}/%{name}/isotrident
288 %{_datadir}/%{name}/misc
289 %{_datadir}/%{name}/stdmusic
290 %{_datadir}/%{name}/stdsounds
291 %dir %{_datadir}/%{name}/themes
292 %{_datadir}/%{name}/trident
293 %{_datadir}/%{name}/wonders
294 %{_mandir}/man6/freeciv.6*
295 %{_mandir}/man6/freeciv-client.6*
296
297 %if %{with gtk2}
298 %files client
299 %defattr(644,root,root,755)
300 %attr(755,root,root) %{_bindir}/freeciv-gtk2
301 %{_desktopdir}/org.freeciv.gtk2.desktop
302 %{_datadir}/appdata/freeciv-gtk2.appdata.xml
303 %{_datadir}/%{name}/freeciv.rc-2.0
304 %{_datadir}/%{name}/gtk2_menus.xml
305 %{_datadir}/%{name}/themes/gui-gtk-2.0
306 %{_mandir}/man6/freeciv-gtk2.6*
307 %{_iconsdir}/hicolor/*/apps/freeciv-client.png
308 %{_pixmapsdir}/freeciv-client.png
309 %endif
310
311 %if %{with gtk3}
312 %files client-gtk3
313 %defattr(644,root,root,755)
314 %attr(755,root,root) %{_bindir}/freeciv-gtk3
315 %{_desktopdir}/org.freeciv.gtk3.desktop
316 %{_datadir}/appdata/freeciv-gtk3.appdata.xml
317 %{_datadir}/%{name}/gtk3_menus.xml
318 %{_datadir}/%{name}/themes/gui-gtk-3.0
319 %{_mandir}/man6/freeciv-gtk3.6*
320 %endif
321
322 %if %{with sdl}
323 %files client-sdl
324 %defattr(644,root,root,755)
325 %attr(755,root,root) %{_bindir}/freeciv-sdl
326 %{_desktopdir}/org.freeciv.sdl.desktop
327 %{_datadir}/appdata/freeciv-sdl.appdata.xml
328 %{_datadir}/%{name}/themes/gui-sdl
329 %{_mandir}/man6/freeciv-sdl.6*
330 %endif
331
332 %if %{with xaw}
333 %files client-xaw
334 %defattr(644,root,root,755)
335 %attr(755,root,root) %{_bindir}/freeciv-xaw
336 %{_datadir}/%{name}/Freeciv
337 %{_mandir}/man6/freeciv-xaw.6*
338 %endif
339
340 %if %{with modpack}
341 %files modpack
342 %defattr(644,root,root,755)
343 %attr(755,root,root) %{_bindir}/freeciv-mp-gtk3
344 %{_desktopdir}/org.freeciv.mp.gtk3.desktop
345 %{_datadir}/appdata/freeciv-mp-gtk3.appdata.xml
346 %{_iconsdir}/hicolor/*/apps/freeciv-modpack.png
347 %{_pixmapsdir}/freeciv-modpack.png
348 %{_mandir}/man6/freeciv-modpack.6*
349 %{_mandir}/man6/freeciv-mp-gtk3.6*
350 %endif
351
352 %if %{with ruledit}
353 %files ruledit -f %{name}-ruledit.lang
354 %defattr(644,root,root,755)
355 %attr(755,root,root) %{_bindir}/freeciv-ruledit
356 %{_datadir}/appdata/freeciv-ruledit.appdata.xml
357 %{_desktopdir}/org.freeciv.ruledit.desktop
358 %{_mandir}/man6/freeciv-ruledit.6*
359 %endif
360
361 %files server
362 %defattr(644,root,root,755)
363 %{_sysconfdir}/freeciv
364 %attr(755,root,root) %{_bindir}/freeciv-server
365 %{_desktopdir}/org.freeciv.server.desktop
366 %{_datadir}/appdata/freeciv-server.appdata.xml
367 %{_datadir}/%{name}/civ1
368 %{_datadir}/%{name}/civ2
369 %{_datadir}/%{name}/civ2civ3
370 %{_datadir}/%{name}/classic
371 %{_datadir}/%{name}/default
372 %{_datadir}/%{name}/experimental
373 %{_datadir}/%{name}/hexemplio
374 %{_datadir}/%{name}/multiplayer
375 %{_datadir}/%{name}/nation
376 %{_datadir}/%{name}/override
377 %{_datadir}/%{name}/sandbox
378 %{_datadir}/%{name}/scenarios
379 %{_datadir}/%{name}/*.serv
380 %{_mandir}/man6/freeciv-server.6*
381 %{_iconsdir}/hicolor/*/apps/freeciv-server.png
382 %{_pixmapsdir}/freeciv-server.png
This page took 0.105388 seconds and 3 git commands to generate.