]> git.pld-linux.org Git - packages/freeciv.git/blame - freeciv.spec
- rebuild with readline 7.0
[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
8d502682 25Release: 3
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}
577a96c7 95Requires: SDL_mixer
7a1462a3
SS
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}
7a1462a3
SS
123Suggests: %{name}-server = %{version}-%{release}
124
125%description client-sdl
126This package contains SDL-based Freeciv game client.
127
128%description client-sdl -l pl.UTF-8
129Ten pakiet zawiera klienta gry Freeciv korzystającego z SDL.
130
131%package client-xaw
132Summary: XAW Freeciv game client
133Summary(pl.UTF-8): Klient gry Freeciv korzystający z XAW
134Group: X11/Applications/Games/Strategy
135Requires: %{name} = %{version}-%{release}
136Requires: %{name}-client-common = %{version}-%{release}
137Suggests: %{name}-server = %{version}-%{release}
138
139%description client-xaw
140This package contains based Freeciv game client using XAW (X Athena
141Widgets).
142
143%description client-xaw -l pl.UTF-8
144Ten pakiet zawiera klienta gry Freeciv korzystającego z biblioteki XAW
145(X Athena Widgets)
146
6d8e39a0 147%package modpack
7a1462a3
SS
148Summary: Custom content installer for the Freeciv game
149Summary(pl.UTF-8): Instalator dodatków do gry Freeciv
150Group: X11/Applications/Games/Strategy
151Requires: %{name} = %{version}-%{release}
152Requires: %{name}-client-common = %{version}-%{release}
153Suggests: %{name}-server = %{version}-%{release}
154
6d8e39a0 155%description modpack
7a1462a3
SS
156Custom content installer for the Freeciv game.
157
158This program allows users to select and download add-on content
159("modpacks") for Freeciv from the Internet, either from a list
160maintained by the Freeciv team, or by using a URL obtained by other
161means. It takes care of installing the files in the correct place
162under the user's home directory for this version of Freeciv; it does
163not install anything for system-wide use.
164
6d8e39a0 165%description modpack -l pl.UTF-8
7a1462a3
SS
166Ten pakiet zawiera instalator dodatków do gry Freeciv dostępnych w
167internecie.
c55f1852 168
c55f1852 169%package server
170Summary: Freeciv game server
a2d6e64d 171Summary(pl.UTF-8): Serwer gry Freeciv
c55f1852 172Group: X11/Applications/Games/Strategy
173Requires: %{name} = %{version}-%{release}
174
175%description server
176This package contans Freeciv game server.
177
8b555401 178%description server -l pl.UTF-8
c55f1852 179Ten pakiet zawiera server gry Freeciv.
180
8e6171b1 181%prep
f1481f57 182%setup -q
a2d6e64d 183%patch0 -p1
293a1d81 184%patch1 -p1
f8f12eb9 185%patch2 -p1
8e6171b1 186
187%build
e748604f 188%{__libtoolize}
f8f12eb9 189%{__aclocal} -I m4
a2d6e64d 190%{__autoconf}
191%{__autoheader}
192%{__automake}
193%configure \
f8f12eb9 194 --with-ggzd-confdir=%{_sysconfdir}/ggzd \
82c4aa50 195 --disable-silent-rules \
73fd6aa7 196 --enable-client=stub,%{?with_gtk2:gtk2},%{?with_gtk3:gtk3},%{?with_qt:qt},%{?with_sdl:sdl},%{?with_xaw:xaw} \
1304e7cf 197 --enable-mapimg=%{?with_magickwand:magickwand}%{!?with_magickwand:no} \
1508b7a4 198 %{!?with_modpack:--enable-fcmp=no} \
60163dd9 199 %{?with_system_lua:--enable-sys-lua} \
999b152c
ER
200 %{!?with_ggz_client:--without-ggz-client} \
201 %{!?with_ggz_server:--without-ggz-server}
a2d6e64d 202
1402ce58 203%{__make}
8e6171b1 204
205%install
206rm -rf $RPM_BUILD_ROOT
a2d6e64d 207install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
8e6171b1 208
7eec69ca
PG
209%{__make} install \
210 DESTDIR=$RPM_BUILD_ROOT
8e6171b1 211
999b152c
ER
212cp -a client/%{name}.desktop $RPM_BUILD_ROOT%{_desktopdir}/%{name}-client.desktop
213cp -a server/%{name}-server.desktop $RPM_BUILD_ROOT%{_desktopdir}
320ce787 214%{__rm} -f $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
90745ade 215
999b152c
ER
216cp -a data/icons/32x32/*.png $RPM_BUILD_ROOT%{_pixmapsdir}
217cp -a data/stdsounds{,.soundspec} $RPM_BUILD_ROOT%{_datadir}/%{name}
ac951725 218#cp -a freeland.tilespec $RPM_BUILD_ROOT%{_datadir}/%{name}
1f960d6b 219#cp -a freeland $RPM_BUILD_ROOT%{_datadir}/%{name}
38b7e0fd 220
37e4bbeb 221%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no
320ce787 222%{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir}/ggz.modules
a2d6e64d 223
24382cc8 224cp -a data/gtk_menus.xml $RPM_BUILD_ROOT%{_datadir}/%{name}
b274a5f1 225
dc958ef7 226%if %{with ggz_server}
227install -d $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/{games,rooms}
999b152c
ER
228cp -a data/civserver.dsc $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/games/civserver.dsc
229cp -a data/civserver.room $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/rooms/civserver.room
dc958ef7 230%endif
231
37e4bbeb 232%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
cce99d3e 233%{__rm} $RPM_BUILD_ROOT%{_libdir}/libfreeciv{,-srv}.{a,la}
60817f48 234%{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-qt*
cce99d3e 235
a13c0015
SS
236# from freeciv-manual man:
237# This tool is currently only really of use to the Freeciv maintainers,
238# as a starting point for pages on the main Freeciv wiki;
239# it's not very useful to end users.
240%{__rm} $RPM_BUILD_ROOT%{_bindir}/freeciv-manual
241%{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-manual*
242
26864214
SS
243%{__rm} $RPM_BUILD_ROOT%{_bindir}/freeciv-stub
244
d261740c
SS
245# needed if building --without gtk2,gtk3,sdl
246%{__install} -d $RPM_BUILD_ROOT%{_datadir}/%{name}/themes
247
10c5731a 248%find_lang %{name}
249
8e6171b1 250%clean
251rm -rf $RPM_BUILD_ROOT
252
10c5731a 253%files -f %{name}.lang
063665a5 254%defattr(644,root,root,755)
2770169a
SS
255%doc AUTHORS doc/BUGS ChangeLog doc/FAQ doc/HOWTOPLAY
256%doc NEWS NEWS-2.4
257%doc doc/README.SDLClient doc/README.cma doc/README.effects doc/README.fcdb
258%doc doc/README.graphics doc/README.sound
259%doc doc/README.ruleset_experimental doc/README.ruleset_multiplayer doc/README.rulesets
260%doc doc/TODO
70461273 261%dir %{_datadir}/%{name}
c55f1852 262%{_datadir}/%{name}/helpdata.txt
263
264%files server
265%defattr(644,root,root,755)
e748604f 266%attr(755,root,root) %{_bindir}/freeciv-server
a13c0015 267#attr(755,root,root) %{_bindir}/freeciv-manual
c55f1852 268%{_desktopdir}/%{name}-server.desktop
6c98e562 269%{_datadir}/appdata/freeciv-server.appdata.xml
c55f1852 270%{_datadir}/%{name}/civ1
271%{_datadir}/%{name}/civ2
272%{_datadir}/%{name}/default
9f0b2873 273%{_datadir}/%{name}/experimental
274%{_datadir}/%{name}/multiplayer
c55f1852 275%{_datadir}/%{name}/nation
9c8a8e09 276%{_datadir}/%{name}/scenarios
c55f1852 277%{_datadir}/%{name}/*.serv
e748604f 278%{_mandir}/man6/freeciv-server.6*
a13c0015 279#{_mandir}/man6/freeciv-manual.6*
e748604f 280%{_iconsdir}/hicolor/*/apps/freeciv-server.png
281%{_pixmapsdir}/freeciv-server.png
a336af56
ER
282
283%if %{with ggz_server}
284%dir %{_sysconfdir}/ggzd
285%dir %{_sysconfdir}/ggzd/games
286%dir %{_sysconfdir}/ggzd/rooms
287%{_sysconfdir}/ggzd/games/civserver.dsc
288%{_sysconfdir}/ggzd/rooms/civserver.room
289%endif
c55f1852 290
7a1462a3 291%files client-common
c55f1852 292%defattr(644,root,root,755)
90745ade 293%{_datadir}/%{name}/*.*spec
9f0b2873 294%{_datadir}/%{name}/amplio2
90745ade 295%{_datadir}/%{name}/buildings
6223fa29 296%{_datadir}/%{name}/cimpletoon
90745ade 297%{_datadir}/%{name}/flags
24382cc8 298%{_datadir}/%{name}/gtk_menus.xml
90745ade 299%{_datadir}/%{name}/hex2t
d9c0a687 300%{_datadir}/%{name}/isophex
c55f1852 301%{_datadir}/%{name}/isotrident
302%{_datadir}/%{name}/misc
a2d6e64d 303%{_datadir}/%{name}/stdsounds
d261740c 304%dir %{_datadir}/%{name}/themes
90745ade
JK
305%{_datadir}/%{name}/trident
306%{_datadir}/%{name}/wonders
7a1462a3 307
1508b7a4 308%if %{with modpack}
6d8e39a0 309%files modpack
7a1462a3
SS
310%defattr(644,root,root,755)
311%attr(755,root,root) %{_bindir}/freeciv-modpack
312%{_desktopdir}/%{name}-modpack.desktop
313%{_datadir}/appdata/freeciv-modpack.appdata.xml
314%{_iconsdir}/hicolor/*/apps/freeciv-modpack.png
315%{_pixmapsdir}/freeciv-modpack.png
316%{_mandir}/man6/freeciv-modpack.6*
1508b7a4 317%endif
7a1462a3
SS
318
319%if %{with gtk2}
320%files client
321%defattr(644,root,root,755)
322%attr(755,root,root) %{_bindir}/freeciv-gtk2
323%{_desktopdir}/%{name}-client.desktop
324%{_datadir}/appdata/freeciv-gtk2.appdata.xml
320ce787 325%{_datadir}/%{name}/freeciv.rc-2.0
d261740c 326%{_datadir}/%{name}/themes/gui-gtk-2.0
e748604f 327%{_mandir}/man6/freeciv-client.6*
328%{_mandir}/man6/freeciv-gtk2.6*
7a1462a3
SS
329%{_iconsdir}/hicolor/*/apps/freeciv-client.png
330%{_pixmapsdir}/freeciv-client.png
331%endif
332
333%if %{with gtk3}
334%files client-gtk3
335%defattr(644,root,root,755)
336%attr(755,root,root) %{_bindir}/freeciv-gtk3
337%{_desktopdir}/%{name}-gtk3.desktop
338%{_datadir}/appdata/freeciv-gtk3.appdata.xml
d261740c 339%{_datadir}/%{name}/themes/gui-gtk-3.0
a5977815 340%{_mandir}/man6/freeciv-gtk3.6*
7a1462a3
SS
341%endif
342
343%if %{with sdl}
344%files client-sdl
345%defattr(644,root,root,755)
346%attr(755,root,root) %{_bindir}/freeciv-sdl
347%{_desktopdir}/%{name}-sdl.desktop
348%{_datadir}/appdata/freeciv-sdl.appdata.xml
d261740c 349%{_datadir}/%{name}/themes/gui-sdl
c3f6abd3 350%{_mandir}/man6/freeciv-sdl.6*
7a1462a3
SS
351%endif
352
353%if %{with xaw}
354%files client-xaw
355%defattr(644,root,root,755)
356%attr(755,root,root) %{_bindir}/freeciv-xaw
357%{_datadir}/%{name}/Freeciv
c3f6abd3 358%{_mandir}/man6/freeciv-xaw.6*
7a1462a3 359%endif
6223fa29 360
This page took 0.196865 seconds and 4 git commands to generate.