2 # - unpackaged language files
4 %bcond_without server # without server
5 %bcond_without tools # without tools
6 %bcond_without fribidi # without Bidirectional language support
8 Summary: Strategy game with a fantasy theme
9 Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék
10 Summary(pl.UTF-8): Strategiczna gra z motywem fantasy
16 Group: X11/Applications/Games/Strategy
17 Source0: http://dl.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
18 # Source0-md5: 493826bbd9ba355930765a7e8fe3749a
19 Source1: %{name}d.init
20 Patch0: %{name}-Makefile.patch
21 Patch1: %{name}-locale_dir.patch
22 Patch2: %{name}-werror.patch
23 Patch3: %{name}-desktop.patch
24 URL: http://www.wesnoth.org/
25 BuildRequires: SDL-devel >= 1.2.7
26 BuildRequires: SDL_image-devel >= 1.2
27 BuildRequires: SDL_mixer-devel >= 1.2
28 BuildRequires: SDL_net-devel >= 1.2
29 BuildRequires: SDL_ttf-devel >= 2.0.8
30 BuildRequires: autoconf >= 2.59
31 BuildRequires: automake >= 1:1.9
32 BuildRequires: boost-devel >= 1.33
33 %{?with_fribidi:BuildRequires: fribidi-devel}
34 BuildRequires: gettext-devel
35 BuildRequires: libpng-devel
36 BuildRequires: libstdc++-devel
37 BuildRequires: libtool >= 2:1.5
38 BuildRequires: libvorbis-devel
40 BuildRequires: pkg-config
41 BuildRequires: python-devel
42 BuildRequires: rpm-pythonprov
43 BuildRequires: rpmbuild(macros) >= 1.268
44 BuildRequires: sed >= 4.0
45 BuildRequires: zipios++-devel
46 # sr@Latn vs. sr@latin
47 Conflicts: glibc-misc < 6:2.7
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 Battle for Wesnoth is a fantasy strategy game. Battle for control of
52 villages, using variety of units which have advantages and
53 disadvantages in different types of terrains and against different
54 types of attacks. Units gain experience and advance levels, and are
55 carried over from one scenario to the next campaign.
57 %description -l hu.UTF-8
58 Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
59 stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
60 felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
61 különféle terepeken és a különböző támadási stílusok ellen. Az
62 egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
65 %description -l pl.UTF-8
66 Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
67 wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
68 jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
69 ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
70 przenoszone z jednej scenerii do następnej kampanii.
73 Summary: Network server for Wesnoth
74 Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz
75 Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
76 Group: X11/Applications/Games/Strategy
77 Requires(post,preun): /sbin/chkconfig
78 Requires(postun): /usr/sbin/groupdel
79 Requires(postun): /usr/sbin/userdel
80 Requires(pre): /usr/sbin/groupadd
81 Requires(pre): /usr/sbin/useradd
82 Requires: rc-scripts >= 0.4.0.17
83 # sr@Latn vs. sr@latin
84 Conflicts: glibc-misc < 6:2.7
87 Server for playing networked games of Wesnoth.
89 %description server -l hu.UTF-8
90 Szerver a Wesnoth hálózati játékához.
92 %description server -l pl.UTF-8
93 Serwer do prowadzenia sieciowych gier Wesnoth.
96 Summary: Tools for Wesnoth
97 Summary(hu.UTF.8): Eszközök a Wesnoth-hoz
98 Summary(pl.UTF-8): Narzędzia dla Wesnoth
99 Group: X11/Applications/Games/Strategy
100 Requires: %{name} = %{epoch}:%{version}-%{release}
103 Map editor and translations tools.
105 %description tools -l hu.UTF-8
106 Pályaszerkesztők és fordítási eszközök.
108 %description tools -l pl.UTF-8
109 Edytor map i narzędzia do tłumaczeń.
117 %{__sed} -i 's,$PYTHON_PREFIX"/lib/,"%{_libdir}/,g' configure.ac
126 PYTHON_VERSION=%{py_ver} \
127 %{?with_server:--enable-server} \
128 %{?with_server:--enable-campaign-server} \
129 --enable-python-install \
130 %{?with_tools:--enable-editor} \
131 %{?with_tools:--enable-tools} \
132 --with%{!?with_fribidi:out}-fribidi \
133 --docdir=%{_docdir}/%{name}-%{version} \
134 --with-icondir=%{_pixmapsdir} \
139 rm -rf $RPM_BUILD_ROOT
140 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
143 DESTDIR=$RPM_BUILD_ROOT
145 # install additional docs
146 install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
147 gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
150 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
153 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
156 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
157 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/fur_IT
158 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
159 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/racv
160 rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
162 # the same as manuals from %{_mandir}/man?
163 rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
165 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
166 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
169 %find_lang %{name} --all-name
172 rm -rf $RPM_BUILD_ROOT
175 %groupadd -P %{name}-server -g 178 wesnothd
176 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
179 /sbin/chkconfig --add wesnothd
180 %service wesnothd restart
183 if [ "$1" = "0" ]; then
184 %service wesnothd stop
185 /sbin/chkconfig --del wesnothd
187 %groupremove wesnothd
190 %files -f %{name}.lang
191 %defattr(644,root,root,755)
192 %doc %{_docdir}/%{name}-%{version}
193 %attr(755,root,root) %{_bindir}/wesnoth
194 %{_mandir}/man6/wesnoth.6*
195 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
196 #%%lang(da) %{_mandir}/da/man6/wesnoth.6*
197 %lang(de) %{_mandir}/de/man6/wesnoth.6*
198 %lang(es) %{_mandir}/es/man6/wesnoth.6*
199 %lang(et) %{_mandir}/et/man6/wesnoth.6*
200 %lang(fi) %{_mandir}/fi/man6/wesnoth.6*
201 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
202 %lang(gl) %{_mandir}/gl/man6/wesnoth.6*
203 %lang(hu) %{_mandir}/hu/man6/wesnoth.6*
204 %lang(it) %{_mandir}/it/man6/wesnoth.6*
205 #%%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
206 %lang(lt) %{_mandir}/lt/man6/wesnoth.6*
207 #%%lang(nl) %{_mandir}/nl/man6/wesnoth.6*
208 %lang(pl) %{_mandir}/pl/man6/wesnoth.6*
209 #%%lang(ru) %{_mandir}/ru/man6/wesnoth.6*
210 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
211 %lang(sr) %{_mandir}/sr/man6/wesnoth.6*
212 %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6*
213 %lang(sv) %{_mandir}/sv/man6/wesnoth.6*
214 %lang(tr) %{_mandir}/tr/man6/wesnoth.6*
215 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
216 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
218 %{_desktopdir}/*.desktop
219 %{_pixmapsdir}/*-icon.png
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_bindir}/campaignd
225 %attr(755,root,root) %{_bindir}/wesnothd
226 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
227 %{_mandir}/man6/wesnothd.6*
228 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
229 #%%lang(da) %{_mandir}/da/man6/wesnothd.6*
230 %lang(de) %{_mandir}/de/man6/wesnothd.6*
231 %lang(es) %{_mandir}/es/man6/wesnothd.6*
232 %lang(et) %{_mandir}/et/man6/wesnothd.6*
233 %lang(fi) %{_mandir}/fi/man6/wesnothd.6*
234 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
235 #%%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
236 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
237 %lang(it) %{_mandir}/it/man6/wesnothd.6*
238 #%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
239 %lang(lt) %{_mandir}/lt/man6/wesnothd.6*
240 #%%lang(nl) %{_mandir}/nl/man6/wesnothd.6*
241 %lang(pl) %{_mandir}/pl/man6/wesnothd.6*
242 #%%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
243 %lang(sr) %{_mandir}/sr/man6/wesnothd.6*
244 %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
245 %lang(sv) %{_mandir}/sv/man6/wesnothd.6*
246 %lang(tr) %{_mandir}/tr/man6/wesnothd.6*
247 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
248 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
249 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_bindir}/cutter
256 %attr(755,root,root) %{_bindir}/exploder
257 %attr(755,root,root) %{_bindir}/wesnoth_addon_manager
258 %attr(755,root,root) %{_bindir}/wmlindent
259 %attr(755,root,root) %{_bindir}/wmllint
260 %attr(755,root,root) %{_bindir}/wmlscope
261 %dir %{py_sitedir}/%{name}
262 %{py_sitedir}/%{name}/*.py[co]