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