]>
Commit | Line | Data |
---|---|---|
4f6ef9bb | 1 | # TODO |
2bf53405 | 2 | # - system lua? |
f8498762 | 3 | # - unpackaged language files |
d94078df | 4 | # |
eb35425c | 5 | # Conditional build |
dad9a32e | 6 | %bcond_without server # without server |
eb718a6d | 7 | |
dad9a32e | 8 | Summary: Strategy game with a fantasy theme |
d78dbe99 | 9 | Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék |
2bf53405 | 10 | Summary(pl.UTF-8): Gra strategiczna z motywem fantasy |
dad9a32e | 11 | Name: wesnoth |
c0edf37c KM |
12 | Version: 1.16.0 |
13 | Release: 1 | |
d31a0af5 | 14 | Epoch: 1 |
482a922c | 15 | License: GPL v2+ |
dad9a32e | 16 | Group: X11/Applications/Games/Strategy |
d7602b85 | 17 | Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2 |
c0edf37c | 18 | # Source0-md5: f07aebf91ef46e47312eb467e1426f06 |
3647514b | 19 | Source1: %{name}d.init |
0e4bc507 | 20 | Source2: %{name}.tmpfiles |
47449d91 KM |
21 | Source3: %{name}.sysconfig |
22 | Source4: %{name}d.service | |
4d5620e7 | 23 | URL: http://www.wesnoth.org/ |
c0edf37c KM |
24 | BuildRequires: SDL2-devel >= 2.0.8 |
25 | BuildRequires: SDL2_image-devel >= 2.0.2 | |
47449d91 | 26 | BuildRequires: SDL2_mixer-devel >= 2.0.0 |
47449d91 KM |
27 | BuildRequires: boost-devel >= 1.50.0 |
28 | BuildRequires: bzip2-devel | |
29 | BuildRequires: cairo-devel >= 1.10.0 | |
30 | BuildRequires: cmake >= 2.8.5 | |
309b98f8 | 31 | BuildRequires: dbus-devel |
2bf53405 | 32 | BuildRequires: fontconfig-devel >= 2.4.1 |
b7f10e01 | 33 | BuildRequires: gettext-tools |
47449d91 | 34 | BuildRequires: libicu-devel |
759b9d08 | 35 | BuildRequires: libpng-devel |
938b933e | 36 | BuildRequires: libstdc++-devel >= 6:4.7 |
47449d91 | 37 | BuildRequires: libvorbis-devel |
938b933e | 38 | BuildRequires: openssl-devel >= 1.0 |
47449d91 | 39 | BuildRequires: pango-devel >= 1:1.22.0 |
c94bb8a1 | 40 | BuildRequires: pkgconfig |
938b933e JB |
41 | BuildRequires: readline-devel |
42 | BuildRequires: rpm-build >= 4.6 | |
f1cb8481 | 43 | BuildRequires: rpm-pythonprov |
2bf53405 | 44 | BuildRequires: rpmbuild(macros) >= 1.605 |
d22c6766 | 45 | BuildRequires: sed >= 4.0 |
47449d91 | 46 | BuildRequires: systemd-devel |
2bf53405 JB |
47 | BuildRequires: xorg-lib-libICE-devel |
48 | BuildRequires: xorg-lib-libSM-devel | |
49 | BuildRequires: xorg-lib-libX11-devel | |
50 | BuildRequires: xorg-lib-libXext-devel | |
d7602b85 | 51 | BuildRequires: zlib-devel |
47449d91 KM |
52 | Requires(post,postun): desktop-file-utils |
53 | Requires(post,postun): gtk-update-icon-cache | |
eb718a6d | 54 | Requires: %{name}-data = %{epoch}:%{version} |
47449d91 | 55 | Requires: SDL2 >= 2.0.4 |
2bf53405 | 56 | Requires: fontconfig >= 2.4.1 |
47449d91 | 57 | Requires: pango >= 1:1.22.8 |
9cf45cc2 | 58 | Obsoletes: wesnoth-tools < 1:1.14 |
dad9a32e | 59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
60 | ||
61 | %description | |
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. | |
67 | ||
d78dbe99 | 68 | %description -l hu.UTF-8 |
a60f6f21 | 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 | |
74 | következő pályára. | |
d78dbe99 | 75 | |
7840b0fd | 76 | %description -l pl.UTF-8 |
a60f6f21 | 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. | |
dad9a32e | 82 | |
dad9a32e | 83 | %package server |
84 | Summary: Network server for Wesnoth | |
717cee4c | 85 | Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz |
157e8e1f | 86 | Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth |
dad9a32e | 87 | Group: X11/Applications/Games/Strategy |
392ee82f | 88 | Requires(post,preun): /sbin/chkconfig |
40b36f90 JK |
89 | Requires(postun): /usr/sbin/groupdel |
90 | Requires(postun): /usr/sbin/userdel | |
91 | Requires(pre): /usr/sbin/groupadd | |
92 | Requires(pre): /usr/sbin/useradd | |
759b9d08 | 93 | Requires: rc-scripts >= 0.4.0.17 |
745d3686 ER |
94 | Provides: group(wesnothd) |
95 | Provides: user(wesnothd) | |
dad9a32e | 96 | |
97 | %description server | |
98 | Server for playing networked games of Wesnoth. | |
99 | ||
d78dbe99 ZU |
100 | %description server -l hu.UTF-8 |
101 | Szerver a Wesnoth hálózati játékához. | |
102 | ||
7840b0fd | 103 | %description server -l pl.UTF-8 |
dad9a32e | 104 | Serwer do prowadzenia sieciowych gier Wesnoth. |
dad9a32e | 105 | |
eb718a6d | 106 | %package data |
2bf53405 JB |
107 | Summary: Strategy game with a fantasy theme - data files |
108 | Summary(pl.UTF-8): Gra strategiczna z motywem fantasy - pliki danych | |
eb718a6d | 109 | Group: Applications/Games |
eb718a6d | 110 | BuildArch: noarch |
eb718a6d ER |
111 | |
112 | %description data | |
113 | This package contains the data files for Wesnoth. | |
114 | ||
2bf53405 JB |
115 | %description data -l pl.UTF-8 |
116 | Ten pakiet zawiera pliki danych dla gry Wesnoth. | |
117 | ||
dad9a32e | 118 | %prep |
b5dcf87b | 119 | %setup -q |
d7602b85 | 120 | |
121 | # don't install locales in %{_datadir}/%{name} | |
d94078df | 122 | %{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt |
dad9a32e | 123 | |
47449d91 | 124 | %{__sed} -i '1s,/usr/bin/env python3$,%{__python3},' \ |
c0edf37c | 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} |
2bf53405 | 126 | |
dad9a32e | 127 | %build |
d7602b85 | 128 | install -d build |
129 | cd build | |
e2caf64a JB |
130 | # override *FLAGS to remove -DNDEBUG (wesnoth depends on asserts) |
131 | CFLAGS="%{rpmcflags}" | |
132 | CXXFLAGS="%{rpmcxxflags}" | |
133 | %cmake .. \ | |
134 | -DENABLE_STRICT_COMPILATION=OFF \ | |
d7602b85 | 135 | -DBINDIR="%{_bindir}" \ |
136 | -DMANDIR="%{_mandir}" \ | |
eb718a6d | 137 | -DLOCALEDIR="%{_localedir}" \ |
e2caf64a | 138 | %{!?with_server:-DENABLE_SERVER=OFF} \ |
c0edf37c | 139 | %{?with_server:-DENABLE_CAMPAIGN_SERVER=ON} |
d7602b85 | 140 | |
dad9a32e | 141 | %{__make} |
142 | ||
143 | %install | |
144 | rm -rf $RPM_BUILD_ROOT | |
47449d91 KM |
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}} \ | |
758a0e57 | 147 | $RPM_BUILD_ROOT%{systemdunitdir} |
dad9a32e | 148 | |
d7602b85 | 149 | %{__make} -C build install \ |
dad9a32e | 150 | DESTDIR=$RPM_BUILD_ROOT |
151 | ||
d22c6766 | 152 | %if %{with server} |
eb718a6d ER |
153 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd |
154 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
47449d91 | 155 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/wesnoth |
758a0e57 | 156 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/wesnothd.service |
d22c6766 | 157 | %endif |
dad9a32e | 158 | |
47449d91 KM |
159 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/html $RPM_BUILD_ROOT%{_docdir}/%{name} |
160 | ||
2bf53405 JB |
161 | # unify |
162 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES@valencia,ca@valencia} | |
163 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb} | |
2bf53405 | 164 | %{__mv} $RPM_BUILD_ROOT%{_mandir}/{ca_ES@valencia,ca@valencia} |
c12ea96c | 165 | |
d94078df | 166 | # unsupported(?) |
c0edf37c | 167 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{ang@latin,grc,racv} |
62daf2b6 | 168 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian |
169 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin | |
c12ea96c MB |
170 | |
171 | # the same as manuals from %{_mandir}/man? | |
729e3de3 | 172 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB |
c12ea96c | 173 | |
c0edf37c KM |
174 | # remove HighContrast icon |
175 | %{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/HighContrast/scalable/apps/wesnoth-icon.svg | |
176 | ||
5105ea28 | 177 | %find_lang %{name} --all-name |
178 | ||
dad9a32e | 179 | %clean |
180 | rm -rf $RPM_BUILD_ROOT | |
181 | ||
47449d91 KM |
182 | %post |
183 | %update_desktop_database | |
184 | %update_icon_cache hicolor | |
185 | ||
186 | %postun | |
187 | %update_desktop_database | |
188 | %update_icon_cache hicolor | |
189 | ||
40b36f90 JK |
190 | %pre server |
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 | |
193 | ||
3fdd0ea2 | 194 | %post server |
195 | /sbin/chkconfig --add wesnothd | |
c12ea96c | 196 | %service wesnothd restart |
47449d91 | 197 | %systemd_post wesnothd.service |
3fdd0ea2 | 198 | |
199 | %preun server | |
200 | if [ "$1" = "0" ]; then | |
c12ea96c | 201 | %service wesnothd stop |
f721f6e1 | 202 | /sbin/chkconfig --del wesnothd |
47449d91 KM |
203 | fi |
204 | %systemd_preun wesnothd.service | |
205 | ||
206 | %postun server | |
207 | if [ "$1" = "0" ]; then | |
40b36f90 JK |
208 | %userremove wesnothd |
209 | %groupremove wesnothd | |
3fdd0ea2 | 210 | fi |
47449d91 | 211 | %systemd_reload |
3fdd0ea2 | 212 | |
5105ea28 | 213 | %files -f %{name}.lang |
dad9a32e | 214 | %defattr(644,root,root,755) |
5dd60c45 | 215 | %doc README.md changelog.md |
2bf53405 | 216 | %doc %{_docdir}/%{name} |
dad9a32e | 217 | %attr(755,root,root) %{_bindir}/wesnoth |
0c6dc98e | 218 | %{_mandir}/man6/wesnoth.6* |
78fe2aaa | 219 | %lang(ca) %{_mandir}/ca/man6/wesnoth.6* |
ddf0e6ee | 220 | %lang(cs) %{_mandir}/cs/man6/wesnoth.6* |
e579b435 | 221 | %lang(de) %{_mandir}/de/man6/wesnoth.6* |
83629e31 | 222 | %lang(es) %{_mandir}/es/man6/wesnoth.6* |
bdc2942c | 223 | %lang(fr) %{_mandir}/fr/man6/wesnoth.6* |
e579b435 | 224 | %lang(hu) %{_mandir}/hu/man6/wesnoth.6* |
83629e31 | 225 | %lang(it) %{_mandir}/it/man6/wesnoth.6* |
47449d91 | 226 | %lang(ja) %{_mandir}/ja/man6/wesnoth.6* |
47449d91 | 227 | %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6* |
83629e31 | 228 | %lang(ru) %{_mandir}/ru/man6/wesnoth.6* |
47449d91 | 229 | %lang(tr) %{_mandir}/tr/man6/wesnoth.6* |
83629e31 | 230 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6* |
231 | %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6* | |
c0edf37c | 232 | %{_desktopdir}/org.wesnoth.Wesnoth.desktop |
47449d91 | 233 | %{_iconsdir}/hicolor/*x*/apps/wesnoth-icon.png |
c0edf37c | 234 | %{_datadir}/metainfo/org.wesnoth.Wesnoth.appdata.xml |
dad9a32e | 235 | |
236 | %if %{with server} | |
237 | %files server | |
238 | %defattr(644,root,root,755) | |
47449d91 | 239 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
d22c6766 | 240 | %attr(755,root,root) %{_bindir}/campaignd |
dad9a32e | 241 | %attr(755,root,root) %{_bindir}/wesnothd |
3fdd0ea2 | 242 | %attr(754,root,root) /etc/rc.d/init.d/wesnothd |
758a0e57 | 243 | %attr(644,root,root) %{systemdunitdir}/wesnothd.service |
0c6dc98e | 244 | %{_mandir}/man6/wesnothd.6* |
78fe2aaa | 245 | %lang(ca) %{_mandir}/ca/man6/wesnothd.6* |
e579b435 | 246 | %lang(cs) %{_mandir}/cs/man6/wesnothd.6* |
e579b435 | 247 | %lang(de) %{_mandir}/de/man6/wesnothd.6* |
248 | %lang(es) %{_mandir}/es/man6/wesnothd.6* | |
bdc2942c | 249 | %lang(fr) %{_mandir}/fr/man6/wesnothd.6* |
d16f534c | 250 | %lang(gl) %{_mandir}/gl/man6/wesnothd.6* |
e579b435 | 251 | %lang(hu) %{_mandir}/hu/man6/wesnothd.6* |
252 | %lang(it) %{_mandir}/it/man6/wesnothd.6* | |
d7602b85 | 253 | %lang(ja) %{_mandir}/ja/man6/wesnothd.6* |
d7602b85 | 254 | %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6* |
83629e31 | 255 | %lang(ru) %{_mandir}/ru/man6/wesnothd.6* |
83629e31 | 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* | |
40b36f90 | 259 | %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd |
eb718a6d | 260 | %{systemdtmpfilesdir}/%{name}.conf |
dad9a32e | 261 | %endif |
262 | ||
eb718a6d ER |
263 | %files data |
264 | %defattr(644,root,root,755) | |
265 | %{_datadir}/%{name} |