3 # - unpackaged language files
6 %bcond_without server # without server
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): Gra strategiczna z motywem fantasy
17 Group: X11/Applications/Games/Strategy
18 Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
19 # Source0-md5: 769733a55ab5742815e0acf8c51e13e4
20 Source1: %{name}d.init
21 Source2: %{name}.tmpfiles
22 Source3: %{name}.sysconfig
23 Source4: %{name}d.service
24 URL: http://www.wesnoth.org/
25 BuildRequires: SDL2-devel >= 2.0.4
26 BuildRequires: SDL2_image-devel >= 2.0.0
27 BuildRequires: SDL2_mixer-devel >= 2.0.0
28 BuildRequires: SDL2_ttf-devel >= 2.0.12
29 BuildRequires: boost-devel >= 1.50.0
30 BuildRequires: bzip2-devel
31 BuildRequires: cairo-devel >= 1.10.0
32 BuildRequires: cmake >= 2.8.5
33 BuildRequires: dbus-devel
34 BuildRequires: fontconfig-devel >= 2.4.1
35 %{?with_fribidi:BuildRequires: fribidi-devel >= 0.10.9}
36 BuildRequires: gettext-tools
37 BuildRequires: libicu-devel
38 BuildRequires: libpng-devel
39 BuildRequires: libstdc++-devel >= 6:4.7
40 BuildRequires: libvorbis-devel
41 BuildRequires: openssl-devel >= 1.0
42 BuildRequires: pango-devel >= 1:1.22.0
43 BuildRequires: pkgconfig
44 BuildRequires: readline-devel
45 BuildRequires: rpm-build >= 4.6
46 BuildRequires: rpm-pythonprov
47 BuildRequires: rpmbuild(macros) >= 1.605
48 BuildRequires: sed >= 4.0
49 BuildRequires: systemd-devel
50 BuildRequires: xorg-lib-libICE-devel
51 BuildRequires: xorg-lib-libSM-devel
52 BuildRequires: xorg-lib-libX11-devel
53 BuildRequires: xorg-lib-libXext-devel
54 BuildRequires: zlib-devel
55 Requires(post,postun): desktop-file-utils
56 Requires(post,postun): gtk-update-icon-cache
57 Requires: %{name}-data = %{epoch}:%{version}
58 Requires: SDL2 >= 2.0.4
59 Requires: fontconfig >= 2.4.1
60 %{?with_fribidi:Requires: fribidi >= 0.10.9}
61 Requires: pango >= 1:1.22.8
62 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65 Battle for Wesnoth is a fantasy strategy game. Battle for control of
66 villages, using variety of units which have advantages and
67 disadvantages in different types of terrains and against different
68 types of attacks. Units gain experience and advance levels, and are
69 carried over from one scenario to the next campaign.
71 %description -l hu.UTF-8
72 Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
73 stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
74 felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
75 különféle terepeken és a különböző támadási stílusok ellen. Az
76 egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
79 %description -l pl.UTF-8
80 Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
81 wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
82 jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
83 ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
84 przenoszone z jednej scenerii do następnej kampanii.
87 Summary: Network server for Wesnoth
88 Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz
89 Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
90 Group: X11/Applications/Games/Strategy
91 Requires(post,preun): /sbin/chkconfig
92 Requires(postun): /usr/sbin/groupdel
93 Requires(postun): /usr/sbin/userdel
94 Requires(pre): /usr/sbin/groupadd
95 Requires(pre): /usr/sbin/useradd
96 Requires: rc-scripts >= 0.4.0.17
97 Provides: group(wesnothd)
98 Provides: user(wesnothd)
101 Server for playing networked games of Wesnoth.
103 %description server -l hu.UTF-8
104 Szerver a Wesnoth hálózati játékához.
106 %description server -l pl.UTF-8
107 Serwer do prowadzenia sieciowych gier Wesnoth.
110 Summary: Strategy game with a fantasy theme - data files
111 Summary(pl.UTF-8): Gra strategiczna z motywem fantasy - pliki danych
112 Group: Applications/Games
116 This package contains the data files for Wesnoth.
118 %description data -l pl.UTF-8
119 Ten pakiet zawiera pliki danych dla gry Wesnoth.
121 %global debug_package %{nil}
126 # don't install locales in %{_datadir}/%{name}
127 %{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
129 %{__sed} -i '1s,/usr/bin/env python3$,%{__python3},' \
130 data/tools/{GUI.pyw,about_cfg_to_wiki,addon_manager/__init__.py,addon_manager/html.py,campaign2wiki.py,extractbindings,hexometer.py,imgcheck,steam-changelog,terrain2wiki.py,unit_tree/TeamColorizer,unit_tree/__init__.py,unit_tree/animations.py,unit_tree/helpers.py,unit_tree/html_output.py,unit_tree/overview.py,unit_tree/wiki_output.py,wesnoth/campaignserver_client.py,wesnoth/libgithub.py,wesnoth/wescamp.py,wesnoth/wmliterator3.py,wesnoth/wmlparser3.py,wesnoth/wmltools3.py,wesnoth_addon_manager,wmlindent,wmllint,wmllint-1.4,wmlscope,wmlunits,wmlxgettext}
131 %{__sed} -i '1s,/usr/bin/env python2$,%{__python},' \
132 data/tools/{expand-terrain-macros.py,journeylifter,rmtrans/rmtrans.py,scoutDefault.py,trackplacer,wesnoth/wmldata.py,wesnoth/wmlgrammar.py,wesnoth/wmliterator.py,wesnoth/wmlparser.py,wesnoth/wmlparser2.py,wesnoth/wmltools.py,wmlflip,wmlvalidator}
139 -DCMAKE_BUILD_TYPE="Release" \
140 -DENABLE_STRICT_COMPILATION="off" \
141 -DBINDIR="%{_bindir}" \
142 -DMANDIR="%{_mandir}" \
143 -DLOCALEDIR="%{_localedir}" \
144 %{!?with_server:-DENABLE_SERVER="off"} \
145 %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \
146 %{!?with_fribidi:-DENABLE_FRIBIDI="off"}
151 rm -rf $RPM_BUILD_ROOT
152 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,/etc/sysconfig} \
153 $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{_docdir}/%{name}-%{version}} \
154 $RPM_BUILD_ROOT%{systemdunitdir}
156 %{__make} -C build install \
157 DESTDIR=$RPM_BUILD_ROOT
160 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
161 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
162 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/wesnoth
163 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/wesnothd.service
166 %{__mv} $RPM_BUILD_ROOT%{_docdir}/html $RPM_BUILD_ROOT%{_docdir}/%{name}
169 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES@valencia,ca@valencia}
170 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
171 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{fur_IT,fur}
172 %{__mv} $RPM_BUILD_ROOT%{_mandir}/{ca_ES@valencia,ca@valencia}
175 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ang@latin
176 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/racv
177 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian
178 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin
180 # the same as manuals from %{_mandir}/man?
181 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB
183 %find_lang %{name} --all-name
186 rm -rf $RPM_BUILD_ROOT
189 %update_desktop_database
190 %update_icon_cache hicolor
193 %update_desktop_database
194 %update_icon_cache hicolor
197 %groupadd -P %{name}-server -g 178 wesnothd
198 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
201 /sbin/chkconfig --add wesnothd
202 %service wesnothd restart
203 %systemd_post wesnothd.service
206 if [ "$1" = "0" ]; then
207 %service wesnothd stop
208 /sbin/chkconfig --del wesnothd
210 %systemd_preun wesnothd.service
213 if [ "$1" = "0" ]; then
215 %groupremove wesnothd
219 %files -f %{name}.lang
220 %defattr(644,root,root,755)
221 #%doc README changelog
222 %doc %{_docdir}/%{name}
223 %attr(755,root,root) %{_bindir}/wesnoth
224 %{_mandir}/man6/wesnoth.6*
225 %lang(ca) %{_mandir}/ca/man6/wesnoth.6*
226 %lang(de) %{_mandir}/de/man6/wesnoth.6*
227 %lang(es) %{_mandir}/es/man6/wesnoth.6*
228 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
229 %lang(hu) %{_mandir}/hu/man6/wesnoth.6*
230 %lang(it) %{_mandir}/it/man6/wesnoth.6*
231 %lang(ja) %{_mandir}/ja/man6/wesnoth.6*
232 %lang(lt) %{_mandir}/lt/man6/wesnoth.6*
233 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6*
234 %lang(ru) %{_mandir}/ru/man6/wesnoth.6*
235 %lang(tr) %{_mandir}/tr/man6/wesnoth.6*
236 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
237 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
238 %{_desktopdir}/wesnoth.desktop
239 %{_iconsdir}/hicolor/*x*/apps/wesnoth-icon.png
240 %{_datadir}/metainfo/wesnoth.appdata.xml
244 %defattr(644,root,root,755)
245 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
246 %attr(755,root,root) %{_bindir}/campaignd
247 %attr(755,root,root) %{_bindir}/wesnothd
248 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
249 %attr(644,root,root) %{systemdunitdir}/wesnothd.service
250 %{_mandir}/man6/wesnothd.6*
251 %lang(ca) %{_mandir}/ca/man6/wesnothd.6*
252 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
253 %lang(de) %{_mandir}/de/man6/wesnothd.6*
254 %lang(es) %{_mandir}/es/man6/wesnothd.6*
255 %lang(et) %{_mandir}/et/man6/wesnothd.6*
256 %lang(fi) %{_mandir}/fi/man6/wesnothd.6*
257 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
258 %lang(gl) %{_mandir}/gl/man6/wesnothd.6*
259 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
260 %lang(id) %{_mandir}/id/man6/wesnothd.6*
261 %lang(it) %{_mandir}/it/man6/wesnothd.6*
262 %lang(ja) %{_mandir}/ja/man6/wesnothd.6*
263 %lang(lt) %{_mandir}/lt/man6/wesnothd.6*
264 %lang(pl) %{_mandir}/pl/man6/wesnothd.6*
265 %lang(pt) %{_mandir}/pt/man6/wesnothd.6*
266 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
267 %lang(ru) %{_mandir}/ru/man6/wesnothd.6*
268 %lang(sk) %{_mandir}/sk/man6/wesnothd.6*
269 %lang(sr) %{_mandir}/sr/man6/wesnothd.6*
270 %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
271 %lang(tr) %{_mandir}/tr/man6/wesnothd.6*
272 %lang(uk) %{_mandir}/uk/man6/wesnothd.6*
273 %lang(vi) %{_mandir}/vi/man6/wesnothd.6*
274 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
275 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
276 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
277 %{systemdtmpfilesdir}/%{name}.conf
281 %defattr(644,root,root,755)