3 # - unpackaged language files
6 %bcond_without server # without server
8 Summary: Strategy game with a fantasy theme
9 Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék
10 Summary(pl.UTF-8): Gra strategiczna z motywem fantasy
16 Group: X11/Applications/Games/Strategy
17 Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
18 # Source0-md5: 1e05350c9349e4c48c25c3b1cd08debb
19 Source1: %{name}d.init
20 Source2: %{name}.tmpfiles
21 Source3: %{name}.sysconfig
22 Source4: %{name}d.service
23 URL: http://www.wesnoth.org/
24 BuildRequires: SDL2-devel >= 2.0.8
25 BuildRequires: SDL2_image-devel >= 2.0.2
26 BuildRequires: SDL2_mixer-devel >= 2.0.0
27 BuildRequires: boost-devel >= 1.50.0
28 BuildRequires: bzip2-devel
29 BuildRequires: cairo-devel >= 1.10.0
30 BuildRequires: cmake >= 2.8.5
31 BuildRequires: dbus-devel
32 BuildRequires: fontconfig-devel >= 2.4.1
33 BuildRequires: gettext-tools
34 BuildRequires: libicu-devel
35 BuildRequires: libpng-devel
36 BuildRequires: libstdc++-devel >= 6:4.7
37 BuildRequires: libvorbis-devel
38 BuildRequires: openssl-devel >= 1.0
39 BuildRequires: pango-devel >= 1:1.22.0
40 BuildRequires: pkgconfig
41 BuildRequires: readline-devel
42 BuildRequires: rpm-build >= 4.6
43 BuildRequires: rpm-pythonprov
44 BuildRequires: rpmbuild(macros) >= 1.605
45 BuildRequires: sed >= 4.0
46 BuildRequires: systemd-devel
47 BuildRequires: xorg-lib-libICE-devel
48 BuildRequires: xorg-lib-libSM-devel
49 BuildRequires: xorg-lib-libX11-devel
50 BuildRequires: xorg-lib-libXext-devel
51 BuildRequires: zlib-devel
52 Requires(post,postun): desktop-file-utils
53 Requires(post,postun): gtk-update-icon-cache
54 Requires: %{name}-data = %{epoch}:%{version}
55 Requires: SDL2 >= 2.0.4
56 Requires: fontconfig >= 2.4.1
57 Requires: pango >= 1:1.22.8
58 Obsoletes: wesnoth-tools < 1:1.14
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 Battle for Wesnoth is a fantasy strategy game. Battle for control of
63 villages, using variety of units which have advantages and
64 disadvantages in different types of terrains and against different
65 types of attacks. Units gain experience and advance levels, and are
66 carried over from one scenario to the next campaign.
68 %description -l hu.UTF-8
69 Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
70 stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
71 felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
72 különféle terepeken és a különböző támadási stílusok ellen. Az
73 egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
76 %description -l pl.UTF-8
77 Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
78 wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
79 jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
80 ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
81 przenoszone z jednej scenerii do następnej kampanii.
84 Summary: Network server for Wesnoth
85 Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz
86 Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
87 Group: X11/Applications/Games/Strategy
88 Requires(post,preun): /sbin/chkconfig
89 Requires(postun): /usr/sbin/groupdel
90 Requires(postun): /usr/sbin/userdel
91 Requires(pre): /usr/sbin/groupadd
92 Requires(pre): /usr/sbin/useradd
93 Requires: rc-scripts >= 0.4.0.17
94 Provides: group(wesnothd)
95 Provides: user(wesnothd)
98 Server for playing networked games of Wesnoth.
100 %description server -l hu.UTF-8
101 Szerver a Wesnoth hálózati játékához.
103 %description server -l pl.UTF-8
104 Serwer do prowadzenia sieciowych gier Wesnoth.
107 Summary: Strategy game with a fantasy theme - data files
108 Summary(pl.UTF-8): Gra strategiczna z motywem fantasy - pliki danych
109 Group: Applications/Games
113 This package contains the data files for Wesnoth.
115 %description data -l pl.UTF-8
116 Ten pakiet zawiera pliki danych dla gry Wesnoth.
121 # don't install locales in %{_datadir}/%{name}
122 %{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
124 %{__sed} -i '1s,/usr/bin/env python3$,%{__python3},' \
125 data/tools/{GUI.pyw,about_cfg_to_wiki,addon_manager/__init__.py,addon_manager/html.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,trackviewer.pyw,wesnoth_addon_manager,wmlflip,wmlindent,wmllint,wmllint-1.4,wmlscope,wmlunits,wmlxgettext,tmx_trackplacer,wesnoth/wmldata.py,wesnoth/trackplacer3/datatypes.py,wesnoth/wmlparser.py,expand-terrain-macros.py}
130 # override *FLAGS to remove -DNDEBUG (wesnoth depends on asserts)
131 CFLAGS="%{rpmcflags}"
132 CXXFLAGS="%{rpmcxxflags}"
134 -DENABLE_STRICT_COMPILATION=OFF \
135 -DBINDIR="%{_bindir}" \
136 -DMANDIR="%{_mandir}" \
137 -DLOCALEDIR="%{_localedir}" \
138 %{!?with_server:-DENABLE_SERVER=OFF} \
139 %{?with_server:-DENABLE_CAMPAIGN_SERVER=ON}
144 rm -rf $RPM_BUILD_ROOT
145 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,/etc/sysconfig} \
146 $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{_docdir}/%{name}-%{version}} \
147 $RPM_BUILD_ROOT%{systemdunitdir}
149 %{__make} -C build install \
150 DESTDIR=$RPM_BUILD_ROOT
153 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
154 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
155 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/wesnoth
156 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/wesnothd.service
159 %{__mv} $RPM_BUILD_ROOT%{_docdir}/html $RPM_BUILD_ROOT%{_docdir}/%{name}
162 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES@valencia,ca@valencia}
163 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
164 %{__mv} $RPM_BUILD_ROOT%{_mandir}/{ca_ES@valencia,ca@valencia}
167 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{ang@latin,grc,racv}
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 # remove HighContrast icon
175 %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/HighContrast/scalable/apps/wesnoth-icon.svg
177 %find_lang %{name} --all-name
180 rm -rf $RPM_BUILD_ROOT
183 %update_desktop_database
184 %update_icon_cache hicolor
187 %update_desktop_database
188 %update_icon_cache hicolor
191 %groupadd -P %{name}-server -g 178 wesnothd
192 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
195 /sbin/chkconfig --add wesnothd
196 %service wesnothd restart
197 %systemd_post wesnothd.service
200 if [ "$1" = "0" ]; then
201 %service wesnothd stop
202 /sbin/chkconfig --del wesnothd
204 %systemd_preun wesnothd.service
207 if [ "$1" = "0" ]; then
209 %groupremove wesnothd
213 %files -f %{name}.lang
214 %defattr(644,root,root,755)
215 %doc README.md changelog.md
216 %doc %{_docdir}/%{name}
217 %attr(755,root,root) %{_bindir}/wesnoth
218 %{_mandir}/man6/wesnoth.6*
219 %lang(ca) %{_mandir}/ca/man6/wesnoth.6*
220 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
221 %lang(de) %{_mandir}/de/man6/wesnoth.6*
222 %lang(es) %{_mandir}/es/man6/wesnoth.6*
223 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
224 %lang(hu) %{_mandir}/hu/man6/wesnoth.6*
225 %lang(it) %{_mandir}/it/man6/wesnoth.6*
226 %lang(ja) %{_mandir}/ja/man6/wesnoth.6*
227 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6*
228 %lang(ru) %{_mandir}/ru/man6/wesnoth.6*
229 %lang(tr) %{_mandir}/tr/man6/wesnoth.6*
230 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
231 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
232 %{_desktopdir}/org.wesnoth.Wesnoth.desktop
233 %{_iconsdir}/hicolor/*x*/apps/wesnoth-icon.png
234 %{_datadir}/metainfo/org.wesnoth.Wesnoth.appdata.xml
238 %defattr(644,root,root,755)
239 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
240 %attr(755,root,root) %{_bindir}/campaignd
241 %attr(755,root,root) %{_bindir}/wesnothd
242 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
243 %attr(644,root,root) %{systemdunitdir}/wesnothd.service
244 %{_mandir}/man6/wesnothd.6*
245 %lang(ca) %{_mandir}/ca/man6/wesnothd.6*
246 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
247 %lang(de) %{_mandir}/de/man6/wesnothd.6*
248 %lang(es) %{_mandir}/es/man6/wesnothd.6*
249 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
250 %lang(gl) %{_mandir}/gl/man6/wesnothd.6*
251 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
252 %lang(it) %{_mandir}/it/man6/wesnothd.6*
253 %lang(ja) %{_mandir}/ja/man6/wesnothd.6*
254 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
255 %lang(ru) %{_mandir}/ru/man6/wesnothd.6*
256 %lang(tr) %{_mandir}/tr/man6/wesnothd.6*
257 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
258 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
259 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
260 %{systemdtmpfilesdir}/%{name}.conf
264 %defattr(644,root,root,755)