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