2 # - rename language files sr@latin to sr@Latn and include them
3 # - use desktop file included with project (consider which one are better)
4 # - dont know what should I do with sr@latin man pages
6 %bcond_without server # without server
7 %bcond_without tools # without tools
8 %bcond_without fribidi # without Bidirectional language support
10 Summary: Strategy game with a fantasy theme
11 Summary(pl.UTF-8): Strategiczna gra z motywem fantasy
17 Group: X11/Applications/Games/Strategy
18 Source0: http://www.wesnoth.org/files/%{name}-%{version}.tar.bz2
19 # Source0-md5: b2260808e94eba12aa7ceaa40fa0ee4d
20 Source1: %{name}.desktop
21 Source2: %{name}_editor.desktop
22 Source3: %{name}d.init
23 Patch0: %{name}-Makefile.patch
24 Patch1: %{name}-locale_dir.patch
25 URL: http://www.wesnoth.org/
26 BuildRequires: SDL-devel >= 1.2.7
27 BuildRequires: SDL_image-devel >= 1.2
28 BuildRequires: SDL_mixer-devel >= 1.2
29 BuildRequires: SDL_net-devel >= 1.2
30 BuildRequires: SDL_ttf-devel >= 2.0
31 BuildRequires: autoconf >= 2.59
32 BuildRequires: automake >= 1:1.9
33 BuildRequires: boost-devel >= 1.33
34 %{?with_fribidi:BuildRequires: fribidi-devel}
35 BuildRequires: gettext-devel
36 BuildRequires: libpng-devel
37 BuildRequires: libstdc++-devel
38 BuildRequires: libtool >= 2:1.5
39 BuildRequires: python-devel
40 BuildRequires: rpm-pythonprov
41 BuildRequires: rpmbuild(macros) >= 1.268
42 BuildRequires: zipios++-devel
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 Battle for Wesnoth is a fantasy strategy game. Battle for control of
47 villages, using variety of units which have advantages and
48 disadvantages in different types of terrains and against different
49 types of attacks. Units gain experience and advance levels, and are
50 carried over from one scenario to the next campaign.
52 %description -l pl.UTF-8
53 Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
54 wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
55 jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
56 ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
57 przenoszone z jednej scenerii do następnej kampanii.
60 Summary: Network server for Wesnoth
61 Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
62 Group: X11/Applications/Games/Strategy
63 Requires(post,preun): /sbin/chkconfig
64 Requires(postun): /usr/sbin/groupdel
65 Requires(postun): /usr/sbin/userdel
66 Requires(pre): /usr/sbin/groupadd
67 Requires(pre): /usr/sbin/useradd
68 Requires: rc-scripts >= 0.4.0.17
71 Server for playing networked games of Wesnoth.
73 %description server -l pl.UTF-8
74 Serwer do prowadzenia sieciowych gier Wesnoth.
77 Summary: Tools for Wesnoth
78 Summary(pl.UTF-8): Narzędzia dla Wesnoth
79 Group: X11/Applications/Games/Strategy
80 Requires: %{name} = %{epoch}:%{version}-%{release}
83 Map editor and translations tools.
85 %description tools -l pl.UTF-8
86 Edytor map i narzędzia do tłumaczeń.
100 %{?with_server:--enable-server} \
101 %{?with_tools:--enable-editor} \
102 %{?with_tools:--enable-tools} \
103 --with%{!?with_fribidi:out}-fribidi \
104 --docdir=%{_docdir}/%{name}-%{version} \
105 --with-icondir=%{_pixmapsdir} \
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
114 DESTDIR=$RPM_BUILD_ROOT
116 # install additional docs
117 install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
118 gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
120 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
121 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
122 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
124 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
127 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
128 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
129 rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
131 # the same as manuals from %{_mandir}/man?
132 rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
134 %find_lang %{name} --all-name
137 rm -rf $RPM_BUILD_ROOT
140 %groupadd -P %{name}-server -g 178 wesnothd
141 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
144 /sbin/chkconfig --add wesnothd
145 %service wesnothd restart
148 if [ "$1" = "0" ]; then
149 %service wesnothd stop
150 /sbin/chkconfig --del wesnothd
152 %groupremove wesnothd
155 %files -f %{name}.lang
156 %defattr(644,root,root,755)
157 %doc %{_docdir}/%{name}-%{version}
158 %attr(755,root,root) %{_bindir}/wesnoth
159 %{_mandir}/man6/wesnoth.6*
160 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
161 %lang(da) %{_mandir}/da/man6/wesnoth.6*
162 %lang(de) %{_mandir}/de/man6/wesnoth.6*
163 %lang(es) %{_mandir}/es/man6/wesnoth.6*
164 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
165 %lang(gl) %{_mandir}/gl/man6/wesnoth.6*
166 %lang(hu) %{_mandir}/hu/man6/wesnoth.6*
167 %lang(it) %{_mandir}/it/man6/wesnoth.6*
168 %lang(ja) %{_mandir}/ja/man6/wesnoth.6*
169 %lang(lt) %{_mandir}/lt/man6/wesnoth.6*
170 %lang(nl) %{_mandir}/nl/man6/wesnoth.6*
171 %lang(pl) %{_mandir}/pl/man6/wesnoth.6*
172 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
173 %lang(sr) %{_mandir}/sr/man6/wesnoth.6*
174 %lang(sv) %{_mandir}/sv/man6/wesnoth.6*
175 %lang(tr) %{_mandir}/tr/man6/wesnoth.6*
176 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
178 %{_desktopdir}/%{name}.desktop
179 %{_pixmapsdir}/%{name}-icon.png
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_bindir}/wesnothd
185 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
186 %{_mandir}/man6/wesnothd.6*
187 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
188 %lang(da) %{_mandir}/da/man6/wesnothd.6*
189 %lang(de) %{_mandir}/de/man6/wesnothd.6*
190 %lang(es) %{_mandir}/es/man6/wesnothd.6*
191 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
192 %lang(gl) %{_mandir}/gl/man6/wesnothd.6*
193 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
194 %lang(it) %{_mandir}/it/man6/wesnothd.6*
195 %lang(ja) %{_mandir}/ja/man6/wesnothd.6*
196 %lang(lt) %{_mandir}/lt/man6/wesnothd.6*
197 %lang(nl) %{_mandir}/nl/man6/wesnothd.6*
198 %lang(pl) %{_mandir}/pl/man6/wesnothd.6*
199 %lang(sk) %{_mandir}/sk/man6/wesnothd.6*
200 %lang(sr) %{_mandir}/sr/man6/wesnothd.6*
201 %lang(sv) %{_mandir}/sv/man6/wesnothd.6*
202 %lang(tr) %{_mandir}/tr/man6/wesnothd.6*
203 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
204 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
209 %defattr(644,root,root,755)
210 %attr(755,root,root) %{_bindir}/cutter
211 %attr(755,root,root) %{_bindir}/exploder
212 %attr(755,root,root) %{_bindir}/wesnoth_editor
213 %attr(755,root,root) %{_bindir}/wmlindent
214 %attr(755,root,root) %{_bindir}/wmllint
215 %attr(755,root,root) %{_bindir}/wmlscope
216 %{_mandir}/man6/wesnoth_editor.6*
217 %lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6*
218 %lang(da) %{_mandir}/da/man6/wesnoth_editor.6*
219 %lang(de) %{_mandir}/de/man6/wesnoth_editor.6*
220 %lang(es) %{_mandir}/es/man6/wesnoth_editor.6*
221 %lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6*
222 %lang(gl) %{_mandir}/gl/man6/wesnoth_editor.6*
223 %lang(hu) %{_mandir}/hu/man6/wesnoth_editor.6*
224 %lang(it) %{_mandir}/it/man6/wesnoth_editor.6*
225 %lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6*
226 %lang(lt) %{_mandir}/lt/man6/wesnoth_editor.6*
227 %lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6*
228 %lang(pl) %{_mandir}/pl/man6/wesnoth_editor.6*
229 %lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6*
230 %lang(sr) %{_mandir}/sr/man6/wesnoth_editor.6*
231 %lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6*
232 %lang(tr) %{_mandir}/tr/man6/wesnoth_editor.6*
233 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth_editor.6*
234 %{_desktopdir}/%{name}_editor.desktop
235 %{_pixmapsdir}/%{name}_editor-icon.png