]> git.pld-linux.org Git - packages/freeciv.git/blob - freeciv.spec
26845a6f87e3e59620ffeeb6347614f4fc1fb02a
[packages/freeciv.git] / freeciv.spec
1 #
2 # TODO: - try to create bconds for supported clients
3 #       - separate desktop files for all clients
4 #       - gtk3 client is broken:
5 #               GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported
6 #       - work on authentication and Freeciv database support (fcdb)
7 #       - patch all packaged desktop files
8 #
9 # Conditional build:
10 %bcond_without  ggz_client      # build without ggz client
11 %bcond_without  ggz_server      # build without ggz server
12 %bcond_without  magickwand      # build without MagickWand map image toolkit support
13 %bcond_without  system_lua      # build with bundled lua
14 %bcond_without  gtk2            # build without gtk2 client
15 %bcond_without  gtk3            # build without gtk3 client
16 %bcond_without  sdl             # build without sdl client
17 %bcond_without  xaw             # build without xaw client
18 %bcond_with     qt              # build with qt client (broken)
19 #
20 Summary:        FREE CIVilization clone
21 Summary(es.UTF-8):      Clon del juego Civilization
22 Summary(pl.UTF-8):      Niekomercyjny klon CIVilization
23 Summary(pt_BR.UTF-8):   Clone do jogo Civilization
24 Name:           freeciv
25 Version:        2.4.4
26 Release:        0.2
27 License:        GPL v2+
28 Group:          X11/Applications/Games/Strategy
29 Source0:        http://downloads.sourceforge.net/freeciv/%{name}-%{version}.tar.bz2
30 # Source0-md5:  038c53184497fcf31bcd268418dbe4f6
31 # NOTE: current version of freeland tiles does not work with newest freeciv version
32 #Source1:       http://download.gna.org/freeciv/contrib/tilesets/freeland/freeland-normal-2.0.0.tar.gz
33 Patch0:         %{name}-link.patch
34 Patch1:         %{name}-desktop.patch
35 Patch2:         %{name}-ggz.patch
36 URL:            http://freeciv.wikia.com/
37 %{?with_magickwand:BuildRequires:       ImageMagick-devel}
38 %if %{with sdl}
39 BuildRequires:  SDL_image-devel
40 BuildRequires:  SDL_mixer-devel
41 %endif
42 BuildRequires:  autoconf >= 2.52
43 BuildRequires:  automake >= 1:1.9
44 BuildRequires:  curl-devel
45 BuildRequires:  gettext-tools
46 %{?with_ggz_client:BuildRequires:       ggz-gtk-client-devel}
47 %{?with_gtk2:BuildRequires:     gtk+2-devel}
48 %{?with_gtk3:BuildRequires:     gtk+3-devel}
49 BuildRequires:  libggz-devel
50 BuildRequires:  libpng-devel
51 BuildRequires:  libtool
52 %{?with_system_lua:BuildRequires:       lua51-devel}
53 BuildRequires:  pkgconfig
54 BuildRequires:  readline-devel
55 %{?with_xaw:BuildRequires:      xorg-lib-libXaw-devel}
56 BuildRequires:  zlib-devel
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 %define         specflags       -O1
60
61 %description
62 Free clone of Sid Meier's Civilization. Free Civilization clone for
63 Unix and X. This is multiplayer strategic game and you can also play
64 against computer-AI players.
65
66 %description -l es.UTF-8
67 Clon del juego Civilization.
68
69 %description -l pl.UTF-8
70 Freeciv jest to niekomercyjny (GPL) klon gry Civilization Sida Meiera.
71 Jest to gra strategiczna dla systemu X Window. Można grać w nią z
72 innymi osobami poprzez sieć, a także przeciwko "graczom" zarządzanym
73 przez komputer.
74
75 %description -l pt_BR.UTF-8
76 O FreeCiv é uma implementação do Civilization II para o Sistema X
77 Window.
78
79 %package client
80 Summary:        Freeciv game client
81 Summary(pl.UTF-8):      Klient gry Freeciv
82 Group:          X11/Applications/Games/Strategy
83 Requires:       %{name} = %{version}-%{release}
84 Requires:       SDL_mixer
85 Suggests:       %{name}-server = %{version}-%{release}
86
87 %description client
88 This package contains Freeciv game client.
89
90 %description client -l pl.UTF-8
91 Ten pakiet zawiera klienta gry Freeciv.
92
93 %package server
94 Summary:        Freeciv game server
95 Summary(pl.UTF-8):      Serwer gry Freeciv
96 Group:          X11/Applications/Games/Strategy
97 Requires:       %{name} = %{version}-%{release}
98
99 %description server
100 This package contans Freeciv game server.
101
102 %description server -l pl.UTF-8
103 Ten pakiet zawiera server gry Freeciv.
104
105 %prep
106 %setup -q
107 %patch0 -p1
108 %patch1 -p1
109 %patch2 -p1
110
111 %build
112 %{__libtoolize}
113 %{__aclocal} -I m4
114 %{__autoconf}
115 %{__autoheader}
116 %{__automake}
117 %configure \
118         --with-ggzd-confdir=%{_sysconfdir}/ggzd \
119         --disable-silent-rules \
120         --enable-client=stub,%{?with_gtk2:gtk2},%{?with_gtk3:gtk3},%{?with_qt:qt},%{?with_sdl:sdl},%{?with_xaw:xaw} \
121         --enable-mapimg=%{?with_magickwand:magickwand}%{!?with_magickwand:no} \
122         %{?with_system_lua:--enable-sys-lua} \
123         %{!?with_ggz_client:--without-ggz-client} \
124         %{!?with_ggz_server:--without-ggz-server}
125
126 %{__make}
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
131
132 %{__make} install \
133         DESTDIR=$RPM_BUILD_ROOT
134
135 cp -a client/%{name}.desktop $RPM_BUILD_ROOT%{_desktopdir}/%{name}-client.desktop
136 cp -a server/%{name}-server.desktop $RPM_BUILD_ROOT%{_desktopdir}
137 %{__rm} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
138
139 cp -a data/icons/32x32/*.png $RPM_BUILD_ROOT%{_pixmapsdir}
140 cp -a data/stdsounds{,.soundspec} $RPM_BUILD_ROOT%{_datadir}/%{name}
141 #cp -a freeland.tilespec $RPM_BUILD_ROOT%{_datadir}/%{name}
142 #cp -a freeland $RPM_BUILD_ROOT%{_datadir}/%{name}
143
144 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/no
145 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/ggz.modules
146
147 cp -a data/gtk_menus.xml $RPM_BUILD_ROOT%{_datadir}/%{name}
148
149 %if %{with ggz_server}
150 install -d $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/{games,rooms}
151 cp -a data/civserver.dsc $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/games/civserver.dsc
152 cp -a data/civserver.room $RPM_BUILD_ROOT%{_sysconfdir}/ggzd/rooms/civserver.room
153 %endif
154
155 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
156 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfreeciv{,-srv}.{a,la}
157 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man6/freeciv-qt*
158
159 %find_lang %{name}
160
161 %clean
162 rm -rf $RPM_BUILD_ROOT
163
164 %files -f %{name}.lang
165 %defattr(644,root,root,755)
166 %doc AUTHORS doc/BUGS ChangeLog doc/FAQ doc/HOWTOPLAY
167 %doc NEWS NEWS-2.4
168 %doc doc/README.SDLClient doc/README.cma doc/README.effects doc/README.fcdb
169 %doc doc/README.graphics doc/README.sound
170 %doc doc/README.ruleset_experimental doc/README.ruleset_multiplayer doc/README.rulesets
171 %doc doc/TODO
172 %dir %{_datadir}/%{name}
173 %{_datadir}/%{name}/helpdata.txt
174
175 %files server
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_bindir}/freeciv-server
178 %{_desktopdir}/%{name}-server.desktop
179 %{_datadir}/appdata/freeciv-server.appdata.xml
180 %{_datadir}/%{name}/civ1
181 %{_datadir}/%{name}/civ2
182 %{_datadir}/%{name}/default
183 %{_datadir}/%{name}/experimental
184 %{_datadir}/%{name}/multiplayer
185 %{_datadir}/%{name}/nation
186 %{_datadir}/%{name}/scenarios
187 %{_datadir}/%{name}/*.serv
188 %{_mandir}/man6/freeciv-server.6*
189 %{_iconsdir}/hicolor/*/apps/freeciv-server.png
190 %{_pixmapsdir}/freeciv-server.png
191
192 %if %{with ggz_server}
193 %dir %{_sysconfdir}/ggzd
194 %dir %{_sysconfdir}/ggzd/games
195 %dir %{_sysconfdir}/ggzd/rooms
196 %{_sysconfdir}/ggzd/games/civserver.dsc
197 %{_sysconfdir}/ggzd/rooms/civserver.room
198 %endif
199
200 %files client
201 %defattr(644,root,root,755)
202 %attr(755,root,root) %{_bindir}/freeciv-gtk2
203 %attr(755,root,root) %{_bindir}/freeciv-gtk3
204 %attr(755,root,root) %{_bindir}/freeciv-sdl
205 %attr(755,root,root) %{_bindir}/freeciv-stub
206 %attr(755,root,root) %{_bindir}/freeciv-xaw
207 %attr(755,root,root) %{_bindir}/freeciv-manual
208 %attr(755,root,root) %{_bindir}/freeciv-modpack
209 %{_desktopdir}/%{name}-client.desktop
210 %{_desktopdir}/%{name}-gtk3.desktop
211 %{_desktopdir}/%{name}-modpack.desktop
212 %{_desktopdir}/%{name}-sdl.desktop
213 %{_datadir}/appdata/freeciv-gtk2.appdata.xml
214 %{_datadir}/appdata/freeciv-gtk3.appdata.xml
215 %{_datadir}/appdata/freeciv-modpack.appdata.xml
216 %{_datadir}/appdata/freeciv-sdl.appdata.xml
217 %{_datadir}/%{name}/Freeciv
218 %{_datadir}/%{name}/*.*spec
219 %{_datadir}/%{name}/amplio2
220 %{_datadir}/%{name}/buildings
221 %{_datadir}/%{name}/cimpletoon
222 %{_datadir}/%{name}/flags
223 %{_datadir}/%{name}/freeciv.rc*
224 #%%{_datadir}/%{name}/freeland
225 %{_datadir}/%{name}/gtk_menus.xml
226 %{_datadir}/%{name}/hex2t
227 %{_datadir}/%{name}/isophex
228 %{_datadir}/%{name}/isotrident
229 %{_datadir}/%{name}/misc
230 %{_datadir}/%{name}/stdsounds
231 %{_datadir}/%{name}/themes
232 %{_datadir}/%{name}/trident
233 %{_datadir}/%{name}/wonders
234 %{_mandir}/man6/freeciv-client.6*
235 %{_mandir}/man6/freeciv-gtk2.6*
236 %{_mandir}/man6/freeciv-gtk3.6*
237 %{_mandir}/man6/freeciv-manual.6*
238 %{_mandir}/man6/freeciv-modpack.6*
239 %{_mandir}/man6/freeciv-sdl.6*
240 %{_mandir}/man6/freeciv-xaw.6*
241 %{_iconsdir}/hicolor/*/apps/freeciv-client.png
242 %{_iconsdir}/hicolor/*/apps/freeciv-modpack.png
243 %{_pixmapsdir}/freeciv-client.png
244 %{_pixmapsdir}/freeciv-modpack.png
245
This page took 0.153011 seconds and 3 git commands to generate.