3 %bcond_without server # without server
4 %bcond_without tools # without tools
6 Summary: Strategy game with a fantasy theme
7 Summary(pl): Strategiczna gra z motywem fantasy
12 Group: X11/Applications/Games/Strategy
13 Source0: http://www.wesnoth.org/files/%{name}-%{version}.tar.gz
14 # Source0-md5: 685deee0f92807eddb2b448c8997cd01
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: rpmbuild(macros) >= 1.268
31 BuildRequires: zipios++-devel
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 Battle for Wesnoth is a fantasy strategy game. Battle for control of
36 villages, using variety of units which have advantages and
37 disadvantages in different types of terrains and against different
38 types of attacks. Units gain experience and advance levels, and are
39 carried over from one scenario to the next campaign.
42 Battle for Wesnoth jest strategiczn± gr± fantasy. Batalia o kontrolê
43 nad wsiami przy pomocy ró¿nego rodzaju oddzia³ów, które maj± przewagê
44 lub jej brak w odmiennym ukszta³towaniu terenu i przeciwko ró¿nym
45 sposobom ataku. Oddzia³y zdobywaj± do¶wiadczenie i poziomy
46 zaawansowania i s± przenoszone z jednej scenerii do nastêpnej
50 Summary: Network server for Wesnoth
51 Summary(pl): Sieciowy serwer dla Wesnoth
52 Group: X11/Applications/Games/Strategy
53 Requires: rc-scripts >= 0.4.0.17
54 Requires(post,preun): /sbin/chkconfig
55 Requires(postun): /usr/sbin/groupdel
56 Requires(postun): /usr/sbin/userdel
57 Requires(pre): /usr/sbin/groupadd
58 Requires(pre): /usr/sbin/useradd
61 Server for playing networked games of Wesnoth.
63 %description server -l pl
64 Serwer do prowadzenia sieciowych gier Wesnoth.
67 Summary: Tools for Wesnoth
68 Summary(pl): Narzêdzia dla Wesnoth
69 Group: X11/Applications/Games/Strategy
70 Requires: %{name} = %{version}-%{release}
73 Map editor and translations tools.
75 %description tools -l pl
76 Edytor map i narzêdzia do t³umaczeñ.
90 %{?with_server:--enable-server} \
91 %{?with_tools:--enable-editor} \
92 %{?with_tools:--enable-tools} \
97 rm -rf $RPM_BUILD_ROOT
98 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d}
101 DESTDIR=$RPM_BUILD_ROOT
103 install images/wesnoth-icon.png $RPM_BUILD_ROOT%{_pixmapsdir}
104 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
105 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
107 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{gl_ES,gl}
108 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
110 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
113 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
115 # the same as manuals from %{_mandir}/man?
116 rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
118 %find_lang %{name} --all-name
121 rm -rf $RPM_BUILD_ROOT
124 %groupadd -P %{name}-server -g 178 wesnothd
125 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
128 /sbin/chkconfig --add wesnothd
129 %service wesnothd restart
132 if [ "$1" = "0" ]; then
133 %service wesnothd stop
134 /sbin/chkconfig --del wesnothd
136 %groupremove wesnothd
139 %files -f %{name}.lang
140 %defattr(644,root,root,755)
141 %doc changelog README MANUAL*
142 %attr(755,root,root) %{_bindir}/wesnoth
143 %attr(755,root,root) %{_bindir}/wmlxgettext
144 %{_mandir}/man6/wesnoth.6*
145 %lang(de) %{_mandir}/de/man6/wesnoth.6*
146 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
147 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
148 %lang(ja) %{_mandir}/ja/man6/wesnoth.6*
149 %lang(nl) %{_mandir}/nl/man6/wesnoth.6*
150 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6*
151 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
152 %lang(sv) %{_mandir}/sv/man6/wesnoth.6*
154 %{_desktopdir}/%{name}.desktop
159 %defattr(644,root,root,755)
160 %attr(755,root,root) %{_bindir}/wesnothd
161 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
162 %{_mandir}/man6/wesnothd.6*
163 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
164 %lang(de) %{_mandir}/de/man6/wesnothd.6*
165 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
166 %lang(ja) %{_mandir}/ja/man6/wesnothd.6*
167 %lang(nl) %{_mandir}/nl/man6/wesnothd.6*
168 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
169 %lang(sk) %{_mandir}/sk/man6/wesnothd.6*
170 %lang(sv) %{_mandir}/sv/man6/wesnothd.6*
171 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
176 %defattr(644,root,root,755)
177 %attr(755,root,root) %{_bindir}/cutter
178 %attr(755,root,root) %{_bindir}/exploder
179 %attr(755,root,root) %{_bindir}/wesnoth_editor
180 %{_mandir}/man6/wesnoth_editor.6*
181 %lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6*
182 %lang(de) %{_mandir}/de/man6/wesnoth_editor.6*
183 %lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6*
184 %lang(it) %{_mandir}/it/man6/wesnoth_editor.6*
185 %lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6*
186 %lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6*
187 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth_editor.6*
188 %lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6*
189 %lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6*