2 # - package rest of developement tools
5 %bcond_without server # without server
6 %bcond_without tools # without tools
8 Summary: Strategy game with a fantasy theme
9 Summary(pl.UTF-8): Strategiczna gra z motywem fantasy
14 Group: X11/Applications/Games/Strategy
15 Source0: http://www.wesnoth.org/files/%{name}-%{version}.tar.bz2
16 # Source0-md5: ef6f15484bc0f833a6d62376340cc2a9
17 Source1: %{name}.desktop
18 Source2: %{name}d.init
19 Patch0: %{name}-Makefile.patch
20 Patch1: %{name}-locale_dir.patch
21 URL: http://www.wesnoth.org/
22 BuildRequires: SDL-devel >= 1.2.7
23 BuildRequires: SDL_image-devel >= 1.2
24 BuildRequires: SDL_mixer-devel >= 1.2
25 BuildRequires: SDL_net-devel >= 1.2
26 BuildRequires: SDL_ttf-devel >= 2.0
27 BuildRequires: autoconf >= 2.59
28 BuildRequires: automake >= 1:1.9
29 BuildRequires: gettext-devel
30 BuildRequires: libstdc++-devel
31 BuildRequires: libtool >= 2:1.5
32 BuildRequires: python-devel
33 BuildRequires: rpmbuild(macros) >= 1.268
34 BuildRequires: rpm-pythonprov
35 BuildRequires: zipios++-devel
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 Battle for Wesnoth is a fantasy strategy game. Battle for control of
40 villages, using variety of units which have advantages and
41 disadvantages in different types of terrains and against different
42 types of attacks. Units gain experience and advance levels, and are
43 carried over from one scenario to the next campaign.
45 %description -l pl.UTF-8
46 Battle for Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę
47 nad wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę
48 lub jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym
49 sposobom ataku. Oddziały zdobywają doświadczenie i poziomy
50 zaawansowania i są przenoszone z jednej scenerii do następnej
54 Summary: Network server for Wesnoth
55 Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
56 Group: X11/Applications/Games/Strategy
57 Requires: rc-scripts >= 0.4.0.17
58 Requires(post,preun): /sbin/chkconfig
59 Requires(postun): /usr/sbin/groupdel
60 Requires(postun): /usr/sbin/userdel
61 Requires(pre): /usr/sbin/groupadd
62 Requires(pre): /usr/sbin/useradd
65 Server for playing networked games of Wesnoth.
67 %description server -l pl.UTF-8
68 Serwer do prowadzenia sieciowych gier Wesnoth.
71 Summary: Tools for Wesnoth
72 Summary(pl.UTF-8): Narzędzia dla Wesnoth
73 Group: X11/Applications/Games/Strategy
74 Requires: %{name} = %{version}-%{release}
77 Map editor and translations tools.
79 %description tools -l pl.UTF-8
80 Edytor map i narzędzia do tłumaczeń.
94 %{?with_server:--enable-server} \
95 %{?with_tools:--enable-editor} \
96 %{?with_tools:--enable-tools} \
101 rm -rf $RPM_BUILD_ROOT
102 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d}
105 DESTDIR=$RPM_BUILD_ROOT
107 install images/wesnoth-icon.png $RPM_BUILD_ROOT%{_pixmapsdir}
108 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
109 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
111 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{gl_ES,gl}
112 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
114 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
117 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
119 # the same as manuals from %{_mandir}/man?
120 rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
122 %find_lang %{name} --all-name
125 rm -rf $RPM_BUILD_ROOT
128 %groupadd -P %{name}-server -g 178 wesnothd
129 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
132 /sbin/chkconfig --add wesnothd
133 %service wesnothd restart
136 if [ "$1" = "0" ]; then
137 %service wesnothd stop
138 /sbin/chkconfig --del wesnothd
140 %groupremove wesnothd
143 %files -f %{name}.lang
144 %defattr(644,root,root,755)
145 %doc changelog README MANUAL*
146 %attr(755,root,root) %{_bindir}/wesnoth
147 %{_mandir}/man6/wesnoth.6*
148 %lang(bg) %{_mandir}/bg/man6/wesnoth.6*
149 %lang(da) %{_mandir}/da/man6/wesnoth.6*
150 %lang(de) %{_mandir}/de/man6/wesnoth.6*
151 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
152 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
153 %lang(hu) %{_mandir}/hu/man6/wesnoth.6*
154 %lang(it) %{_mandir}/it/man6/wesnoth.6*
155 %lang(ja) %{_mandir}/ja/man6/wesnoth.6*
156 %lang(nl) %{_mandir}/nl/man6/wesnoth.6*
157 %lang(pl) %{_mandir}/pl/man6/wesnoth.6*
158 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6*
159 %lang(ru) %{_mandir}/ru/man6/wesnoth.6*
160 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
161 %lang(sr) %{_mandir}/sr/man6/wesnoth.6*
162 %lang(sv) %{_mandir}/sv/man6/wesnoth.6*
164 %{_desktopdir}/%{name}.desktop
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_bindir}/wesnothd
171 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
172 %{_mandir}/man6/wesnothd.6*
173 %lang(bg) %{_mandir}/bg/man6/wesnothd.6*
174 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
175 %lang(da) %{_mandir}/da/man6/wesnothd.6*
176 %lang(de) %{_mandir}/de/man6/wesnothd.6*
177 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
178 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
179 %lang(it) %{_mandir}/it/man6/wesnothd.6*
180 %lang(ja) %{_mandir}/ja/man6/wesnothd.6*
181 %lang(nl) %{_mandir}/nl/man6/wesnothd.6*
182 %lang(pl) %{_mandir}/pl/man6/wesnothd.6*
183 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
184 %lang(ru) %{_mandir}/ru/man6/wesnothd.6*
185 %lang(sk) %{_mandir}/sk/man6/wesnothd.6*
186 %lang(sr) %{_mandir}/sr/man6/wesnothd.6*
187 %lang(sv) %{_mandir}/sv/man6/wesnothd.6*
188 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
193 %defattr(644,root,root,755)
194 %attr(755,root,root) %{_bindir}/cutter
195 %attr(755,root,root) %{_bindir}/exploder
196 %attr(755,root,root) %{_bindir}/wesnoth_editor
197 %{_mandir}/man6/wesnoth_editor.6*
198 %lang(bg) %{_mandir}/bg/man6/wesnoth_editor.6*
199 %lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6*
200 %lang(da) %{_mandir}/da/man6/wesnoth_editor.6*
201 %lang(de) %{_mandir}/de/man6/wesnoth_editor.6*
202 %lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6*
203 %lang(hu) %{_mandir}/hu/man6/wesnoth_editor.6*
204 %lang(it) %{_mandir}/it/man6/wesnoth_editor.6*
205 %lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6*
206 %lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6*
207 %lang(pl) %{_mandir}/pl/man6/wesnoth_editor.6*
208 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth_editor.6*
209 %lang(ru) %{_mandir}/ru/man6/wesnoth_editor.6*
210 %lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6*
211 %lang(sr) %{_mandir}/sr/man6/wesnoth_editor.6*
212 %lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6*