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