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