2 # - unpackaged language files
5 %bcond_without server # without server
6 %bcond_without tools # without tools
7 %bcond_without fribidi # without Bidirectional language support
9 Summary: Strategy game with a fantasy theme
10 Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék
11 Summary(pl.UTF-8): Strategiczna gra z motywem fantasy
17 Group: X11/Applications/Games/Strategy
18 Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
19 # Source0-md5: 61f93437ba13a27a048e5ee2ee63736a
20 Source1: %{name}d.init
21 Source2: %{name}.tmpfiles
22 Patch0: %{name}-desktop.patch
23 Patch1: %{name}-locale_dir.patch
24 URL: http://www.wesnoth.org/
25 BuildRequires: SDL-devel >= 1.2.14-4
26 BuildRequires: SDL_image-devel >= 1.2
27 BuildRequires: SDL_mixer-devel >= 1.2
28 BuildRequires: SDL_net-devel >= 1.2
29 BuildRequires: SDL_ttf-devel >= 2.0.8
30 BuildRequires: asciidoc
31 BuildRequires: boost-devel >= 1.33
32 BuildRequires: cmake >= 2.4
33 BuildRequires: dbus-devel
34 %{?with_fribidi:BuildRequires: fribidi-devel}
35 BuildRequires: gettext-devel
36 BuildRequires: libpng-devel
37 BuildRequires: libstdc++-devel
38 BuildRequires: libvorbis-devel
39 BuildRequires: lua51-devel
40 BuildRequires: pango-devel
41 BuildRequires: pkgconfig
42 BuildRequires: rpm-pythonprov
43 BuildRequires: rpmbuild(macros) >= 1.600
44 BuildRequires: sed >= 4.0
45 BuildRequires: zlib-devel
46 Requires: SDL >= 1.2.14-4
47 # sr@Latn vs. sr@latin
48 Conflicts: glibc-misc < 6:2.7
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 Battle for Wesnoth is a fantasy strategy game. Battle for control of
53 villages, using variety of units which have advantages and
54 disadvantages in different types of terrains and against different
55 types of attacks. Units gain experience and advance levels, and are
56 carried over from one scenario to the next campaign.
58 %description -l hu.UTF-8
59 Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
60 stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
61 felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
62 különféle terepeken és a különböző támadási stílusok ellen. Az
63 egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
66 %description -l pl.UTF-8
67 Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
68 wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
69 jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
70 ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
71 przenoszone z jednej scenerii do następnej kampanii.
74 Summary: Network server for Wesnoth
75 Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz
76 Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
77 Group: X11/Applications/Games/Strategy
78 Requires(post,preun): /sbin/chkconfig
79 Requires(postun): /usr/sbin/groupdel
80 Requires(postun): /usr/sbin/userdel
81 Requires(pre): /usr/sbin/groupadd
82 Requires(pre): /usr/sbin/useradd
83 Requires: rc-scripts >= 0.4.0.17
84 Provides: group(wesnothd)
85 Provides: user(wesnothd)
86 # sr@Latn vs. sr@latin
87 Conflicts: glibc-misc < 6:2.7
90 Server for playing networked games of Wesnoth.
92 %description server -l hu.UTF-8
93 Szerver a Wesnoth hálózati játékához.
95 %description server -l pl.UTF-8
96 Serwer do prowadzenia sieciowych gier Wesnoth.
99 Summary: Tools for Wesnoth
100 Summary(hu.UTF.8): Eszközök a Wesnoth-hoz
101 Summary(pl.UTF-8): Narzędzia dla Wesnoth
102 Group: X11/Applications/Games/Strategy
103 Requires: %{name} = %{epoch}:%{version}-%{release}
106 Map editor and translations tools.
108 %description tools -l hu.UTF-8
109 Pályaszerkesztők és fordítási eszközök.
111 %description tools -l pl.UTF-8
112 Edytor map i narzędzia do tłumaczeń.
119 # don't install locales in %{_datadir}/%{name}
120 %{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
127 -DENABLE_STRICT_COMPILATION="off" \
128 -DBINDIR="%{_bindir}" \
129 -DMANDIR="%{_mandir}" \
130 -DLOCALEDIR="%{_datadir}/locale" \
131 %{!?with_server:-DENABLE_SERVER="off"} \
132 %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \
133 %{!?with_tools:-DENABLE_EDITOR="off"} \
134 %{?with_tools:-DENABLE_TOOLS="on"} \
135 %{!?with_fribidi:-DENABLE_FRIBIDI="off"}
140 rm -rf $RPM_BUILD_ROOT
141 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d} \
142 $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,%{_docdir}/%{name}-%{version}}
144 %{__make} -C build install \
145 DESTDIR=$RPM_BUILD_ROOT
147 # install additional docs
148 install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
149 gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
152 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
153 install %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
156 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/nb{_NO,}
157 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/fur{_IT,}
160 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/ang@latin
161 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
162 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/la
163 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/racv
164 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/en@shaw
165 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/sr@ijekavian
166 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/sr@ijekavianlatin
167 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
168 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian
169 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin
171 # the same as manuals from %{_mandir}/man?
172 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB
174 %find_lang %{name} --all-name
177 rm -rf $RPM_BUILD_ROOT
180 %groupadd -P %{name}-server -g 178 wesnothd
181 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
184 /sbin/chkconfig --add wesnothd
185 %service wesnothd restart
188 if [ "$1" = "0" ]; then
189 %service wesnothd stop
190 /sbin/chkconfig --del wesnothd
192 %groupremove wesnothd
195 %files -f %{name}.lang
196 %defattr(644,root,root,755)
197 %doc %{_docdir}/%{name}-%{version}
198 %attr(755,root,root) %{_bindir}/wesnoth
199 %{_mandir}/man6/wesnoth.6*
200 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
201 %lang(de) %{_mandir}/de/man6/wesnoth.6*
202 %lang(et) %{_mandir}/et/man6/wesnoth.6*
203 %lang(es) %{_mandir}/es/man6/wesnoth.6*
204 %lang(fi) %{_mandir}/fi/man6/wesnoth.6*
205 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
206 %lang(gl) %{_mandir}/gl/man6/wesnoth.6*
207 %lang(hu) %{_mandir}/hu/man6/wesnoth.6*
208 %lang(id) %{_mandir}/id/man6/wesnoth.6*
209 %lang(it) %{_mandir}/it/man6/wesnoth.6*
210 %lang(lt) %{_mandir}/lt/man6/wesnoth.6*
211 %lang(pl) %{_mandir}/pl/man6/wesnoth.6*
212 %lang(ru) %{_mandir}/ru/man6/wesnoth.6*
213 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
214 %lang(sr) %{_mandir}/sr/man6/wesnoth.6*
215 %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6*
216 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
217 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
219 %{_desktopdir}/*.desktop
220 %{_pixmapsdir}/*-icon.png
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_bindir}/campaignd
226 %attr(755,root,root) %{_bindir}/wesnothd
227 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
228 %{_mandir}/man6/wesnothd.6*
229 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
230 %lang(de) %{_mandir}/de/man6/wesnothd.6*
231 %lang(es) %{_mandir}/es/man6/wesnothd.6*
232 %lang(et) %{_mandir}/et/man6/wesnothd.6*
233 %lang(fi) %{_mandir}/fi/man6/wesnothd.6*
234 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
235 %lang(gl) %{_mandir}/gl/man6/wesnothd.6*
236 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
237 %lang(id) %{_mandir}/id/man6/wesnothd.6*
238 %lang(it) %{_mandir}/it/man6/wesnothd.6*
239 %lang(ja) %{_mandir}/ja/man6/wesnothd.6*
240 %lang(lt) %{_mandir}/lt/man6/wesnothd.6*
241 %lang(pl) %{_mandir}/pl/man6/wesnothd.6*
242 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
243 %lang(ru) %{_mandir}/ru/man6/wesnothd.6*
244 %lang(sk) %{_mandir}/sk/man6/wesnothd.6*
245 %lang(sr) %{_mandir}/sr/man6/wesnothd.6*
246 %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
247 %lang(tr) %{_mandir}/tr/man6/wesnothd.6*
248 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
249 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
250 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
251 /usr/lib/tmpfiles.d/%{name}.conf
256 %defattr(644,root,root,755)
257 %attr(755,root,root) %{_bindir}/cutter
258 %attr(755,root,root) %{_bindir}/exploder