]> git.pld-linux.org Git - packages/freeciv.git/blame - freeciv.spec
SDL_mixer-devel is required for sound support in all clients
[packages/freeciv.git] / freeciv.spec
CommitLineData
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:
696a3e6e 8%bcond_without ggz_client # build without ggz client
9%bcond_without ggz_server # build without ggz server
1304e7cf 10%bcond_without magickwand # build without MagickWand map image toolkit support
852f1cf3 11%bcond_without system_lua # build with bundled lua
73fd6aa7
SS
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)
1508b7a4 17%bcond_without modpack # build without modpack installer
e748604f 18#
68badbcf 19Summary: FREE CIVilization clone
a2d6e64d 20Summary(es.UTF-8): Clon del juego Civilization
21Summary(pl.UTF-8): Niekomercyjny klon CIVilization
22Summary(pt_BR.UTF-8): Clone do jogo Civilization
68badbcf 23Name: freeciv
b588d51d 24Version: 2.4.4
74e4f90b 25Release: 1
d9c0a687 26License: GPL v2+
c4d7f9a4 27Group: X11/Applications/Games/Strategy
53427aff 28Source0: http://downloads.sourceforge.net/freeciv/%{name}-%{version}.tar.bz2
b588d51d 29# Source0-md5: 038c53184497fcf31bcd268418dbe4f6
f1481f57 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
a2d6e64d 32Patch0: %{name}-link.patch
7d71a717 33Patch1: %{name}-desktop.patch
f8f12eb9 34Patch2: %{name}-ggz.patch
999b152c 35URL: http://freeciv.wikia.com/
1304e7cf 36%{?with_magickwand:BuildRequires: ImageMagick-devel}
61fa7de7 37%{?with_sdl:BuildRequires: SDL_image-devel}
37e4bbeb 38BuildRequires: SDL_mixer-devel
a2d6e64d 39BuildRequires: autoconf >= 2.52
744dee41 40BuildRequires: automake >= 1:1.9
b256fc05 41BuildRequires: curl-devel
076a3f05 42BuildRequires: gettext-tools
3de6f65c 43%{?with_ggz_client:BuildRequires: ggz-gtk-client-devel}
73fd6aa7
SS
44%{?with_gtk2:BuildRequires: gtk+2-devel}
45%{?with_gtk3:BuildRequires: gtk+3-devel}
3de6f65c 46BuildRequires: libggz-devel
c9f99b35 47BuildRequires: libpng-devel
ef569fe1 48BuildRequires: libtool
60163dd9 49%{?with_system_lua:BuildRequires: lua51-devel}
a2d6e64d 50BuildRequires: pkgconfig
848e1b5f 51BuildRequires: readline-devel
73fd6aa7 52%{?with_xaw:BuildRequires: xorg-lib-libXaw-devel}
848e1b5f 53BuildRequires: zlib-devel
254af51f 54BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
512c4044 55
4bd37832 56%define specflags -O1
57
8e6171b1 58%description
52afb265 59Free clone of Sid Meier's Civilization. Free Civilization clone for
20965c93 60Unix and X. This is multiplayer strategic game and you can also play
54c8b158 61against computer-AI players.
8e6171b1 62
8b555401 63%description -l es.UTF-8
eba39772 64Clon del juego Civilization.
65
8b555401 66%description -l pl.UTF-8
c55f1852 67Freeciv jest to niekomercyjny (GPL) klon gry Civilization Sida Meiera.
8b555401 68Jest to gra strategiczna dla systemu X Window. Można grać w nią z
e64b1569
JB
69innymi osobami poprzez sieć, a także przeciwko "graczom" zarządzanym
70przez komputer.
8e6171b1 71
8b555401
JR
72%description -l pt_BR.UTF-8
73O FreeCiv é uma implementação do Civilization II para o Sistema X
eba39772 74Window.
75
c55f1852 76%package client
7a1462a3
SS
77Summary: GTK2 Freeciv game client
78Summary(pl.UTF-8): Klient gry Freeciv korzystający z GTK2
c55f1852 79Group: X11/Applications/Games/Strategy
80Requires: %{name} = %{version}-%{release}
7a1462a3 81Requires: %{name}-client-common = %{version}-%{release}
6a3d034a 82Suggests: %{name}-server = %{version}-%{release}
c55f1852 83
84%description client
7a1462a3 85This package contains GTK2-based Freeciv game client.
c55f1852 86
8b555401 87%description client -l pl.UTF-8
7a1462a3
SS
88Ten pakiet zawiera klienta gry Freeciv korzystającego z GTK2.
89
90%package client-common
91Summary: Freeciv game client common files
92Summary(pl.UTF-8): Wspólne pliki klientów gry Freeciv
93Group: X11/Applications/Games/Strategy
94Requires: %{name} = %{version}-%{release}
95Requires: %{name}-client-common = %{version}-%{release}
96Suggests: %{name}-server = %{version}-%{release}
97
98%description client-common
99This package contains common files for Freeciv game clients.
100
101%description client-common -l pl.UTF-8
102Ten pakiet zawiera wspólne pliki dla klientów gry Freeciv.
103
104%package client-gtk3
105Summary: GTK3 Freeciv game client
106Summary(pl.UTF-8): Klient gry Freeciv korzystający z GTK3
107Group: X11/Applications/Games/Strategy
108Requires: %{name} = %{version}-%{release}
109Suggests: %{name}-server = %{version}-%{release}
110
111%description client-gtk3
112This package contains GTK3-based Freeciv game client.
113
114%description client-gtk3 -l pl.UTF-8
115Ten pakiet zawiera klienta gry Freeciv korzystającego z GTK3.
116
117%package client-sdl
118Summary: SDL Freeciv game client
119Summary(pl.UTF-8): Klient gry Freeciv korzystający z SDL
120Group: X11/Applications/Games/Strategy
121Requires: %{name} = %{version}-%{release}
122Requires: %{name}-client-common = %{version}-%{release}
123Requires: SDL_mixer
124Suggests: %{name}-server = %{version}-%{release}
125
126%description client-sdl
127This package contains SDL-based Freeciv game client.
128
129%description client-sdl -l pl.UTF-8
130Ten pakiet zawiera klienta gry Freeciv korzystającego z SDL.
131
132%package client-xaw
133Summary: XAW Freeciv game client
134Summary(pl.UTF-8): Klient gry Freeciv korzystający z XAW
135Group: X11/Applications/Games/Strategy
136Requires: %{name} = %{version}-%{release}
137Requires: %{name}-client-common = %{version}-%{release}
138Suggests: %{name}-server = %{version}-%{release}
139
140%description client-xaw
141This package contains based Freeciv game client using XAW (X Athena
142Widgets).
143
144%description client-xaw -l pl.UTF-8
145Ten pakiet zawiera klienta gry Freeciv korzystającego z biblioteki XAW
146(X Athena Widgets)
147
6d8e39a0 148%package modpack
7a1462a3
SS
149Summary: Custom content installer for the Freeciv game
150Summary(pl.UTF-8): Instalator dodatków do gry Freeciv
151Group: X11/Applications/Games/Strategy
152Requires: %{name} = %{version}-%{release}
153Requires: %{name}-client-common = %{version}-%{release}
154Suggests: %{name}-server = %{version}-%{release}
155
6d8e39a0 156%description modpack
7a1462a3
SS
157Custom content installer for the Freeciv game.
158
159This program allows users to select and download add-on content
160("modpacks") for Freeciv from the Internet, either from a list
161maintained by the Freeciv team, or by using a URL obtained by other
162means. It takes care of installing the files in the correct place
163under the user's home directory for this version of Freeciv; it does
164not install anything for system-wide use.
165
6d8e39a0 166%description modpack -l pl.UTF-8
7a1462a3
SS
167Ten pakiet zawiera instalator dodatków do gry Freeciv dostępnych w
168internecie.
c55f1852 169
c55f1852 170%package server
171Summary: Freeciv game server
a2d6e64d 172Summary(pl.UTF-8): Serwer gry Freeciv
c55f1852 173Group: X11/Applications/Games/Strategy
174Requires: %{name} = %{version}-%{release}
175
176%description server
177This package contans Freeciv game server.
178
8b555401 179%description server -l pl.UTF-8
c55f1852 180Ten pakiet zawiera server gry Freeciv.
181
8e6171b1 182%prep
f1481f57 183%setup -q
a2d6e64d 184%patch0 -p1
293a1d81 185%patch1 -p1
f8f12eb9 186%patch2 -p1
8e6171b1 187
188%build
e748604f 189%{__libtoolize}
f8f12eb9 190%{__aclocal} -I m4
a2d6e64d 191%{__autoconf}
192%{__autoheader}
193%{__automake}
194%configure \
f8f12eb9 195 --with-ggzd-confdir=%{_sysconfdir}/ggzd \
82c4aa50 196 --disable-silent-rules \
73fd6aa7 197 --enable-client=stub,%{?with_gtk2:gtk2},%{?with_gtk3:gtk3},%{?with_qt:qt},%{?with_sdl:sdl},%{?with_xaw:xaw} \
1304e7cf 198 --enable-mapimg=%{?with_magickwand:magickwand}%{!?with_magickwand:no} \
1508b7a4 199 %{!?with_modpack:--enable-fcmp=no} \
60163dd9 200 %{?with_system_lua:--enable-sys-lua} \
999b152c
ER
201 %{!?with_ggz_client:--without-ggz-client} \
202 %{!?with_ggz_server:--without-ggz-server}
a2d6e64d 203
1402ce58 204%{__make}
8e6171b1 205
206%install
207rm -rf $RPM_BUILD_ROOT
a2d6e64d 208install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
8e6171b1 209
7eec69ca
PG
210%{__make} install \
211 DESTDIR=$RPM_BUILD_ROOT
8e6171b1 212
999b152c
ER
213cp -a client/%{name}.desktop $RPM_BUILD_ROOT%{_desktopdir}/%{name}-client.desktop
214cp -a server/%{name}-server.desktop $RPM_BUILD_ROOT%{_desktopdir}
320ce787 215%{__rm} -f $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
90745ade 216
999b152c
ER
217cp -a data/icons/32x32/*.png $RPM_BUILD_ROOT%{_pixmapsdir}
218cp -a data/stdsounds{,.soundspec} $RPM_BUILD_ROOT%{_datadir}/%{name}
ac951725 219#cp -a freeland.tilespec $RPM_BUILD_ROOT%{_datadir}/%{name}
1f960d6b 220#cp -a freeland $RPM_BUILD_ROOT%{_datadir}/%{name}
38b7e0fd 221
37e4bbeb 222%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no
320ce787 223%{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir}/ggz.modules
a2d6e64d 224
24382cc8 225cp -a data/gtk_menus.xml $RPM_BUILD_ROOT%{_datadir}/%{name}
b274a5f1 226
dc958ef7 227%if %{with ggz_server}
228install -d $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/{games,rooms}
999b152c
ER
229cp -a data/civserver.dsc $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/games/civserver.dsc
230cp -a data/civserver.room $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/rooms/civserver.room
dc958ef7 231%endif
232
37e4bbeb 233%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
cce99d3e 234%{__rm} $RPM_BUILD_ROOT%{_libdir}/libfreeciv{,-srv}.{a,la}
60817f48 235%{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-qt*
cce99d3e 236
a13c0015
SS
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
26864214
SS
244%{__rm} $RPM_BUILD_ROOT%{_bindir}/freeciv-stub
245
d261740c
SS
246# needed if building --without gtk2,gtk3,sdl
247%{__install} -d $RPM_BUILD_ROOT%{_datadir}/%{name}/themes
248
10c5731a 249%find_lang %{name}
250
8e6171b1 251%clean
252rm -rf $RPM_BUILD_ROOT
253
10c5731a 254%files -f %{name}.lang
063665a5 255%defattr(644,root,root,755)
2770169a
SS
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
70461273 262%dir %{_datadir}/%{name}
c55f1852 263%{_datadir}/%{name}/helpdata.txt
264
265%files server
266%defattr(644,root,root,755)
e748604f 267%attr(755,root,root) %{_bindir}/freeciv-server
a13c0015 268#attr(755,root,root) %{_bindir}/freeciv-manual
c55f1852 269%{_desktopdir}/%{name}-server.desktop
6c98e562 270%{_datadir}/appdata/freeciv-server.appdata.xml
c55f1852 271%{_datadir}/%{name}/civ1
272%{_datadir}/%{name}/civ2
273%{_datadir}/%{name}/default
9f0b2873 274%{_datadir}/%{name}/experimental
275%{_datadir}/%{name}/multiplayer
c55f1852 276%{_datadir}/%{name}/nation
9c8a8e09 277%{_datadir}/%{name}/scenarios
c55f1852 278%{_datadir}/%{name}/*.serv
e748604f 279%{_mandir}/man6/freeciv-server.6*
a13c0015 280#{_mandir}/man6/freeciv-manual.6*
e748604f 281%{_iconsdir}/hicolor/*/apps/freeciv-server.png
282%{_pixmapsdir}/freeciv-server.png
a336af56
ER
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
c55f1852 291
7a1462a3 292%files client-common
c55f1852 293%defattr(644,root,root,755)
90745ade 294%{_datadir}/%{name}/*.*spec
9f0b2873 295%{_datadir}/%{name}/amplio2
90745ade 296%{_datadir}/%{name}/buildings
6223fa29 297%{_datadir}/%{name}/cimpletoon
90745ade 298%{_datadir}/%{name}/flags
24382cc8 299%{_datadir}/%{name}/gtk_menus.xml
90745ade 300%{_datadir}/%{name}/hex2t
d9c0a687 301%{_datadir}/%{name}/isophex
c55f1852 302%{_datadir}/%{name}/isotrident
303%{_datadir}/%{name}/misc
a2d6e64d 304%{_datadir}/%{name}/stdsounds
d261740c 305%dir %{_datadir}/%{name}/themes
90745ade
JK
306%{_datadir}/%{name}/trident
307%{_datadir}/%{name}/wonders
7a1462a3 308
1508b7a4 309%if %{with modpack}
6d8e39a0 310%files modpack
7a1462a3
SS
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*
1508b7a4 318%endif
7a1462a3
SS
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
320ce787 326%{_datadir}/%{name}/freeciv.rc-2.0
d261740c 327%{_datadir}/%{name}/themes/gui-gtk-2.0
e748604f 328%{_mandir}/man6/freeciv-client.6*
329%{_mandir}/man6/freeciv-gtk2.6*
7a1462a3
SS
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
d261740c 340%{_datadir}/%{name}/themes/gui-gtk-3.0
a5977815 341%{_mandir}/man6/freeciv-gtk3.6*
7a1462a3
SS
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
d261740c 350%{_datadir}/%{name}/themes/gui-sdl
c3f6abd3 351%{_mandir}/man6/freeciv-sdl.6*
7a1462a3
SS
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
c3f6abd3 359%{_mandir}/man6/freeciv-xaw.6*
7a1462a3 360%endif
6223fa29 361
This page took 0.093805 seconds and 4 git commands to generate.