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