]> git.pld-linux.org Git - packages/freeciv.git/blob - freeciv.spec
- rediff patch, rel 3
[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  magickwand      # build without MagickWand map image toolkit support
9 %bcond_without  system_lua      # build with bundled lua
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)
15 %bcond_without  modpack         # build without modpack installer
16 #
17 Summary:        FREE CIVilization clone
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
21 Name:           freeciv
22 Version:        2.6.3
23 Release:        3
24 License:        GPL v2+
25 Group:          X11/Applications/Games/Strategy
26 Source0:        http://downloads.sourceforge.net/freeciv/%{name}-%{version}.tar.bz2
27 # Source0-md5:  68f3eab21a20fcf7fe7de39d0915e23f
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
30 Patch0:         %{name}-link.patch
31 Patch1:         %{name}-desktop.patch
32 Patch3:         imagemagick7.patch
33 URL:            http://freeciv.wikia.com/
34 %{?with_magickwand:BuildRequires:       ImageMagick-devel}
35 %{?with_sdl:BuildRequires:      SDL_image-devel}
36 BuildRequires:  SDL_ttf-devel
37 BuildRequires:  SDL_mixer-devel
38 BuildRequires:  autoconf >= 2.52
39 BuildRequires:  automake >= 1:1.9
40 BuildRequires:  curl-devel
41 BuildRequires:  gettext-tools
42 BuildRequires:  glib2-devel
43 %{?with_gtk2:BuildRequires:     gtk+2-devel}
44 %{?with_gtk3:BuildRequires:     gtk+3-devel}
45 BuildRequires:  libpng-devel
46 BuildRequires:  libtool
47 %{?with_system_lua:BuildRequires:       lua53-devel}
48 BuildRequires:  pkgconfig
49 BuildRequires:  readline-devel
50 %{?with_xaw:BuildRequires:      xorg-lib-libXaw-devel}
51 BuildRequires:  zlib-devel
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %define         specflags       -O1
55
56 %description
57 Free clone of Sid Meier's Civilization. Free Civilization clone for
58 Unix and X. This is multiplayer strategic game and you can also play
59 against computer-AI players.
60
61 %description -l es.UTF-8
62 Clon del juego Civilization.
63
64 %description -l pl.UTF-8
65 Freeciv jest to niekomercyjny (GPL) klon gry Civilization Sida Meiera.
66 Jest to gra strategiczna dla systemu X Window. Można grać w nią z
67 innymi osobami poprzez sieć, a także przeciwko "graczom" zarządzanym
68 przez komputer.
69
70 %description -l pt_BR.UTF-8
71 O FreeCiv é uma implementação do Civilization II para o Sistema X
72 Window.
73
74 %package client
75 Summary:        GTK2 Freeciv game client
76 Summary(pl.UTF-8):      Klient gry Freeciv korzystający z GTK2
77 Group:          X11/Applications/Games/Strategy
78 Requires:       %{name} = %{version}-%{release}
79 Requires:       %{name}-client-common = %{version}-%{release}
80 Suggests:       %{name}-server = %{version}-%{release}
81
82 %description client
83 This package contains GTK2-based Freeciv game client.
84
85 %description client -l pl.UTF-8
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}
93 Requires:       SDL_mixer
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}
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
145 %package modpack
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
153 %description modpack
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
163 %description modpack -l pl.UTF-8
164 Ten pakiet zawiera instalator dodatków do gry Freeciv dostępnych w
165 internecie.
166
167 %package server
168 Summary:        Freeciv game server
169 Summary(pl.UTF-8):      Serwer gry Freeciv
170 Group:          X11/Applications/Games/Strategy
171 Requires:       %{name} = %{version}-%{release}
172
173 %description server
174 This package contans Freeciv game server.
175
176 %description server -l pl.UTF-8
177 Ten pakiet zawiera server gry Freeciv.
178
179 %prep
180 %setup -q
181 %patch0 -p1
182 #%patch1 -p1
183 %patch3 -p1
184
185 cp -f %{_aclocaldir}/glib-gettext.m4 m4/
186
187 %build
188 %{__libtoolize}
189 %{__aclocal} -I m4
190 %{__autoconf}
191 %{__autoheader}
192 %{__automake}
193 %configure \
194         --disable-silent-rules \
195         --enable-client=stub,%{?with_gtk2:gtk2},%{?with_gtk3:gtk3},%{?with_qt:qt},%{?with_sdl:sdl},%{?with_xaw:xaw} \
196         --enable-mapimg=%{?with_magickwand:magickwand}%{!?with_magickwand:no} \
197         %{?with_sdl:--enable-sdl-mixer=sdl} \
198         %{!?with_modpack:--enable-fcmp=no} \
199         %{?with_system_lua:--enable-sys-lua}
200
201 %{__make}
202
203 %install
204 rm -rf $RPM_BUILD_ROOT
205 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
206
207 %{__make} install \
208         DESTDIR=$RPM_BUILD_ROOT
209
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
213
214 cp -a data/icons/32x32/*.png $RPM_BUILD_ROOT%{_pixmapsdir}
215 cp -a data/stdsounds{,.soundspec} $RPM_BUILD_ROOT%{_datadir}/%{name}
216
217 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
218 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfreeciv{,-srv}.{a,la}
219 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-qt*
220
221 # from freeciv-manual man:
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;
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
228 %{__rm} $RPM_BUILD_ROOT%{_bindir}/freeciv-stub
229
230 # needed if building --without gtk2,gtk3,sdl
231 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/themes
232
233 %find_lang %{name}
234
235 %clean
236 rm -rf $RPM_BUILD_ROOT
237
238 %files -f %{name}.lang
239 %defattr(644,root,root,755)
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
243 %dir %{_datadir}/%{name}
244 %{_datadir}/%{name}/helpdata.txt
245
246 %files server
247 %defattr(644,root,root,755)
248 %{_sysconfdir}/freeciv
249 %attr(755,root,root) %{_bindir}/freeciv-server
250 #attr(755,root,root) %{_bindir}/freeciv-manual
251 %{_desktopdir}/org.freeciv.server.desktop
252 %{_datadir}/appdata/freeciv-server.appdata.xml
253 %{_datadir}/%{name}/civ1
254 %{_datadir}/%{name}/civ2
255 %{_datadir}/%{name}/civ2civ3
256 %{_datadir}/%{name}/classic
257 %{_datadir}/%{name}/default
258 %{_datadir}/%{name}/experimental
259 %{_datadir}/%{name}/hexemplio
260 %{_datadir}/%{name}/multiplayer
261 %{_datadir}/%{name}/nation
262 %{_datadir}/%{name}/override
263 %{_datadir}/%{name}/sandbox
264 %{_datadir}/%{name}/scenarios
265 %{_datadir}/%{name}/*.serv
266 %{_mandir}/man6/freeciv-server.6*
267 #{_mandir}/man6/freeciv-manual.6*
268 %{_iconsdir}/hicolor/*/apps/freeciv-server.png
269 %{_pixmapsdir}/freeciv-server.png
270
271 %files client-common
272 %defattr(644,root,root,755)
273 %{_datadir}/%{name}/*.*spec
274 %{_datadir}/%{name}/amplio2
275 %{_datadir}/%{name}/buildings
276 %{_datadir}/%{name}/cimpletoon
277 %{_datadir}/%{name}/flags
278 %{_datadir}/%{name}/hex2t
279 %{_datadir}/%{name}/isophex
280 %{_datadir}/%{name}/isotrident
281 %{_datadir}/%{name}/misc
282 %{_datadir}/%{name}/stdmusic
283 %{_datadir}/%{name}/stdsounds
284 %dir %{_datadir}/%{name}/themes
285 %{_datadir}/%{name}/trident
286 %{_datadir}/%{name}/wonders
287
288 %if %{with modpack}
289 %files modpack
290 %defattr(644,root,root,755)
291 %attr(755,root,root) %{_bindir}/freeciv-mp-gtk3
292 %{_desktopdir}/org.freeciv.mp.gtk3.desktop
293 %{_datadir}/appdata/freeciv-mp-gtk3.appdata.xml
294 %{_iconsdir}/hicolor/*/apps/freeciv-modpack.png
295 %{_pixmapsdir}/freeciv-modpack.png
296 %{_mandir}/man6/freeciv-modpack.6*
297 %{_mandir}/man6/freeciv-mp-gtk3.6*
298 %endif
299
300 %if %{with gtk2}
301 %files client
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_bindir}/freeciv-gtk2
304 %{_desktopdir}/org.freeciv.gtk2.desktop
305 %{_datadir}/appdata/freeciv-gtk2.appdata.xml
306 %{_datadir}/%{name}/freeciv.rc-2.0
307 %{_datadir}/%{name}/gtk2_menus.xml
308 %{_datadir}/%{name}/themes/gui-gtk-2.0
309 %{_mandir}/man6/freeciv-client.6*
310 %{_mandir}/man6/freeciv-gtk2.6*
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
319 %{_desktopdir}/org.freeciv.gtk3.desktop
320 %{_datadir}/appdata/freeciv-gtk3.appdata.xml
321 %{_datadir}/%{name}/gtk3_menus.xml
322 %{_datadir}/%{name}/themes/gui-gtk-3.0
323 %{_mandir}/man6/freeciv-gtk3.6*
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
330 %{_desktopdir}/org.freeciv.sdl.desktop
331 %{_datadir}/appdata/freeciv-sdl.appdata.xml
332 %{_datadir}/%{name}/themes/gui-sdl
333 %{_mandir}/man6/freeciv-sdl.6*
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
341 %{_mandir}/man6/freeciv-xaw.6*
342 %endif
343
This page took 0.469666 seconds and 4 git commands to generate.