3 %bcond_without server # without server
4 %bcond_without tools # without tools
6 Summary: Strategy game with a fantasy theme
7 Summary(pl.UTF-8): Strategiczna gra z motywem fantasy
12 Group: X11/Applications/Games/Strategy
13 Source0: http://www.wesnoth.org/files/%{name}-%{version}.tar.bz2
14 # Source0-md5: c77ab2ef9089a795562d7d5dba831cbc
15 Source1: %{name}.desktop
16 Source2: %{name}d.init
17 Patch0: %{name}-Makefile.patch
18 Patch1: %{name}-locale_dir.patch
19 URL: http://www.wesnoth.org/
20 BuildRequires: SDL-devel >= 1.2.7
21 BuildRequires: SDL_image-devel >= 1.2
22 BuildRequires: SDL_mixer-devel >= 1.2
23 BuildRequires: SDL_net-devel >= 1.2
24 BuildRequires: SDL_ttf-devel >= 2.0
25 BuildRequires: autoconf >= 2.57
26 BuildRequires: automake >= 1:1.9
27 BuildRequires: gettext-devel
28 BuildRequires: libstdc++-devel
29 BuildRequires: libtool >= 2:1.5
30 BuildRequires: python-devel
31 BuildRequires: rpmbuild(macros) >= 1.268
32 BuildRequires: rpm-pythonprov
33 BuildRequires: zipios++-devel
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 Battle for Wesnoth is a fantasy strategy game. Battle for control of
38 villages, using variety of units which have advantages and
39 disadvantages in different types of terrains and against different
40 types of attacks. Units gain experience and advance levels, and are
41 carried over from one scenario to the next campaign.
43 %description -l pl.UTF-8
44 Battle for Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę
45 nad wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę
46 lub jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym
47 sposobom ataku. Oddziały zdobywają doświadczenie i poziomy
48 zaawansowania i są przenoszone z jednej scenerii do następnej
52 Summary: Network server for Wesnoth
53 Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
54 Group: X11/Applications/Games/Strategy
55 Requires: rc-scripts >= 0.4.0.17
56 Requires(post,preun): /sbin/chkconfig
57 Requires(postun): /usr/sbin/groupdel
58 Requires(postun): /usr/sbin/userdel
59 Requires(pre): /usr/sbin/groupadd
60 Requires(pre): /usr/sbin/useradd
63 Server for playing networked games of Wesnoth.
65 %description server -l pl.UTF-8
66 Serwer do prowadzenia sieciowych gier Wesnoth.
69 Summary: Tools for Wesnoth
70 Summary(pl.UTF-8): Narzędzia dla Wesnoth
71 Group: X11/Applications/Games/Strategy
72 Requires: %{name} = %{version}-%{release}
75 Map editor and translations tools.
77 %description tools -l pl.UTF-8
78 Edytor map i narzędzia do tłumaczeń.
92 %{?with_server:--enable-server} \
93 %{?with_tools:--enable-editor} \
94 %{?with_tools:--enable-tools} \
99 rm -rf $RPM_BUILD_ROOT
100 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d}
103 DESTDIR=$RPM_BUILD_ROOT
105 install images/wesnoth-icon.png $RPM_BUILD_ROOT%{_pixmapsdir}
106 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
107 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
109 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{gl_ES,gl}
110 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
112 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
115 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
117 # the same as manuals from %{_mandir}/man?
118 rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
120 %find_lang %{name} --all-name
123 rm -rf $RPM_BUILD_ROOT
126 %groupadd -P %{name}-server -g 178 wesnothd
127 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
130 /sbin/chkconfig --add wesnothd
131 %service wesnothd restart
134 if [ "$1" = "0" ]; then
135 %service wesnothd stop
136 /sbin/chkconfig --del wesnothd
138 %groupremove wesnothd
141 %files -f %{name}.lang
142 %defattr(644,root,root,755)
143 %doc changelog README MANUAL*
144 %attr(755,root,root) %{_bindir}/wesnoth
145 %attr(755,root,root) %{_bindir}/wmlxgettext
146 %{_mandir}/man6/wesnoth.6*
147 %lang(de) %{_mandir}/de/man6/wesnoth.6*
148 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
149 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
150 #%lang(it) %{_mandir}/it/man6/wesnoth.6*
151 %lang(ja) %{_mandir}/ja/man6/wesnoth.6*
152 %lang(nl) %{_mandir}/nl/man6/wesnoth.6*
153 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6*
154 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
155 %lang(sv) %{_mandir}/sv/man6/wesnoth.6*
157 %{_desktopdir}/%{name}.desktop
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_bindir}/wesnothd
164 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
165 %{_mandir}/man6/wesnothd.6*
166 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
167 %lang(de) %{_mandir}/de/man6/wesnothd.6*
168 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
169 #%lang(it) %{_mandir}/it/man6/wesnothd.6*
170 %lang(ja) %{_mandir}/ja/man6/wesnothd.6*
171 %lang(nl) %{_mandir}/nl/man6/wesnothd.6*
172 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
173 %lang(sk) %{_mandir}/sk/man6/wesnothd.6*
174 %lang(sv) %{_mandir}/sv/man6/wesnothd.6*
175 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
180 %defattr(644,root,root,755)
181 %attr(755,root,root) %{_bindir}/cutter
182 %attr(755,root,root) %{_bindir}/exploder
183 %attr(755,root,root) %{_bindir}/wesnoth_editor
184 %{_mandir}/man6/wesnoth_editor.6*
185 %lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6*
186 %lang(de) %{_mandir}/de/man6/wesnoth_editor.6*
187 %lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6*
188 %lang(it) %{_mandir}/it/man6/wesnoth_editor.6*
189 %lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6*
190 %lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6*
191 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth_editor.6*
192 %lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6*
193 %lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6*