]>
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 |
e579b435 | 7 | %bcond_without fribidi # without Bidirectional language support |
eb718a6d | 8 | |
dad9a32e | 9 | Summary: Strategy game with a fantasy theme |
d78dbe99 | 10 | Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék |
2bf53405 | 11 | Summary(pl.UTF-8): Gra strategiczna z motywem fantasy |
dad9a32e | 12 | Name: wesnoth |
78fe2aaa | 13 | Version: 1.14.16 |
2bf53405 | 14 | Release: 1 |
d31a0af5 | 15 | Epoch: 1 |
482a922c | 16 | License: GPL v2+ |
dad9a32e | 17 | Group: X11/Applications/Games/Strategy |
d7602b85 | 18 | Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2 |
78fe2aaa | 19 | # Source0-md5: 769733a55ab5742815e0acf8c51e13e4 |
3647514b | 20 | Source1: %{name}d.init |
0e4bc507 | 21 | Source2: %{name}.tmpfiles |
47449d91 KM |
22 | Source3: %{name}.sysconfig |
23 | Source4: %{name}d.service | |
4d5620e7 | 24 | URL: http://www.wesnoth.org/ |
47449d91 KM |
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 | |
309b98f8 | 33 | BuildRequires: dbus-devel |
2bf53405 | 34 | BuildRequires: fontconfig-devel >= 2.4.1 |
e579b435 | 35 | %{?with_fribidi:BuildRequires: fribidi-devel} |
b7f10e01 | 36 | BuildRequires: gettext-tools |
47449d91 | 37 | BuildRequires: libicu-devel |
759b9d08 | 38 | BuildRequires: libpng-devel |
6ac5e90b | 39 | BuildRequires: libstdc++-devel |
47449d91 KM |
40 | BuildRequires: libvorbis-devel |
41 | BuildRequires: openssl-devel | |
42 | BuildRequires: pango-devel >= 1:1.22.0 | |
c94bb8a1 | 43 | BuildRequires: pkgconfig |
f1cb8481 | 44 | BuildRequires: rpm-pythonprov |
2bf53405 | 45 | BuildRequires: rpmbuild(macros) >= 1.605 |
d22c6766 | 46 | BuildRequires: sed >= 4.0 |
47449d91 | 47 | BuildRequires: systemd-devel |
2bf53405 JB |
48 | BuildRequires: xorg-lib-libICE-devel |
49 | BuildRequires: xorg-lib-libSM-devel | |
50 | BuildRequires: xorg-lib-libX11-devel | |
51 | BuildRequires: xorg-lib-libXext-devel | |
d7602b85 | 52 | BuildRequires: zlib-devel |
47449d91 KM |
53 | Requires(post,postun): desktop-file-utils |
54 | Requires(post,postun): gtk-update-icon-cache | |
eb718a6d | 55 | Requires: %{name}-data = %{epoch}:%{version} |
47449d91 | 56 | Requires: SDL2 >= 2.0.4 |
2bf53405 | 57 | Requires: fontconfig >= 2.4.1 |
47449d91 | 58 | Requires: pango >= 1:1.22.8 |
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 KM |
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,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} | |
126 | %{__sed} -i '1s,/usr/bin/env python2$,%{__python},' \ | |
127 | 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} | |
2bf53405 | 128 | |
dad9a32e | 129 | %build |
d7602b85 | 130 | install -d build |
131 | cd build | |
d94078df | 132 | %cmake \ |
133 | .. \ | |
47449d91 | 134 | -DCMAKE_BUILD_TYPE="Release" \ |
d7602b85 | 135 | -DENABLE_STRICT_COMPILATION="off" \ |
136 | -DBINDIR="%{_bindir}" \ | |
137 | -DMANDIR="%{_mandir}" \ | |
eb718a6d | 138 | -DLOCALEDIR="%{_localedir}" \ |
d7602b85 | 139 | %{!?with_server:-DENABLE_SERVER="off"} \ |
140 | %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \ | |
d94078df | 141 | %{!?with_fribidi:-DENABLE_FRIBIDI="off"} |
d7602b85 | 142 | |
dad9a32e | 143 | %{__make} |
144 | ||
145 | %install | |
146 | rm -rf $RPM_BUILD_ROOT | |
47449d91 KM |
147 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,/etc/sysconfig} \ |
148 | $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{_docdir}/%{name}-%{version}} \ | |
758a0e57 | 149 | $RPM_BUILD_ROOT%{systemdunitdir} |
dad9a32e | 150 | |
d7602b85 | 151 | %{__make} -C build install \ |
dad9a32e | 152 | DESTDIR=$RPM_BUILD_ROOT |
153 | ||
d22c6766 | 154 | %if %{with server} |
eb718a6d ER |
155 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd |
156 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
47449d91 | 157 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/wesnoth |
758a0e57 | 158 | cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/wesnothd.service |
d22c6766 | 159 | %endif |
dad9a32e | 160 | |
47449d91 KM |
161 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/html $RPM_BUILD_ROOT%{_docdir}/%{name} |
162 | ||
2bf53405 JB |
163 | # unify |
164 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES@valencia,ca@valencia} | |
165 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb} | |
166 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{fur_IT,fur} | |
167 | %{__mv} $RPM_BUILD_ROOT%{_mandir}/{ca_ES@valencia,ca@valencia} | |
c12ea96c | 168 | |
d94078df | 169 | # unsupported(?) |
eb718a6d | 170 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ang@latin |
eb718a6d | 171 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/racv |
62daf2b6 | 172 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian |
173 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin | |
c12ea96c MB |
174 | |
175 | # the same as manuals from %{_mandir}/man? | |
729e3de3 | 176 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB |
c12ea96c | 177 | |
5105ea28 | 178 | %find_lang %{name} --all-name |
179 | ||
dad9a32e | 180 | %clean |
181 | rm -rf $RPM_BUILD_ROOT | |
182 | ||
47449d91 KM |
183 | %post |
184 | %update_desktop_database | |
185 | %update_icon_cache hicolor | |
186 | ||
187 | %postun | |
188 | %update_desktop_database | |
189 | %update_icon_cache hicolor | |
190 | ||
40b36f90 JK |
191 | %pre server |
192 | %groupadd -P %{name}-server -g 178 wesnothd | |
193 | %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd | |
194 | ||
3fdd0ea2 | 195 | %post server |
196 | /sbin/chkconfig --add wesnothd | |
c12ea96c | 197 | %service wesnothd restart |
47449d91 | 198 | %systemd_post wesnothd.service |
3fdd0ea2 | 199 | |
200 | %preun server | |
201 | if [ "$1" = "0" ]; then | |
c12ea96c | 202 | %service wesnothd stop |
f721f6e1 | 203 | /sbin/chkconfig --del wesnothd |
47449d91 KM |
204 | fi |
205 | %systemd_preun wesnothd.service | |
206 | ||
207 | %postun server | |
208 | if [ "$1" = "0" ]; then | |
40b36f90 JK |
209 | %userremove wesnothd |
210 | %groupremove wesnothd | |
3fdd0ea2 | 211 | fi |
47449d91 | 212 | %systemd_reload |
3fdd0ea2 | 213 | |
5105ea28 | 214 | %files -f %{name}.lang |
dad9a32e | 215 | %defattr(644,root,root,755) |
47449d91 | 216 | #%doc README changelog |
2bf53405 | 217 | %doc %{_docdir}/%{name} |
dad9a32e | 218 | %attr(755,root,root) %{_bindir}/wesnoth |
0c6dc98e | 219 | %{_mandir}/man6/wesnoth.6* |
78fe2aaa | 220 | %lang(ca) %{_mandir}/ca/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* |
7d4eb852 | 227 | %lang(lt) %{_mandir}/lt/man6/wesnoth.6* |
47449d91 | 228 | %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6* |
83629e31 | 229 | %lang(ru) %{_mandir}/ru/man6/wesnoth.6* |
47449d91 | 230 | %lang(tr) %{_mandir}/tr/man6/wesnoth.6* |
83629e31 | 231 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6* |
232 | %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6* | |
2bf53405 | 233 | %{_desktopdir}/wesnoth.desktop |
47449d91 KM |
234 | %{_iconsdir}/hicolor/*x*/apps/wesnoth-icon.png |
235 | %{_datadir}/metainfo/wesnoth.appdata.xml | |
dad9a32e | 236 | |
237 | %if %{with server} | |
238 | %files server | |
239 | %defattr(644,root,root,755) | |
47449d91 | 240 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
d22c6766 | 241 | %attr(755,root,root) %{_bindir}/campaignd |
dad9a32e | 242 | %attr(755,root,root) %{_bindir}/wesnothd |
3fdd0ea2 | 243 | %attr(754,root,root) /etc/rc.d/init.d/wesnothd |
758a0e57 | 244 | %attr(644,root,root) %{systemdunitdir}/wesnothd.service |
0c6dc98e | 245 | %{_mandir}/man6/wesnothd.6* |
78fe2aaa | 246 | %lang(ca) %{_mandir}/ca/man6/wesnothd.6* |
e579b435 | 247 | %lang(cs) %{_mandir}/cs/man6/wesnothd.6* |
e579b435 | 248 | %lang(de) %{_mandir}/de/man6/wesnothd.6* |
249 | %lang(es) %{_mandir}/es/man6/wesnothd.6* | |
d3cada04 | 250 | %lang(et) %{_mandir}/et/man6/wesnothd.6* |
d18a93b2 | 251 | %lang(fi) %{_mandir}/fi/man6/wesnothd.6* |
bdc2942c | 252 | %lang(fr) %{_mandir}/fr/man6/wesnothd.6* |
d16f534c | 253 | %lang(gl) %{_mandir}/gl/man6/wesnothd.6* |
e579b435 | 254 | %lang(hu) %{_mandir}/hu/man6/wesnothd.6* |
944acd9d | 255 | %lang(id) %{_mandir}/id/man6/wesnothd.6* |
e579b435 | 256 | %lang(it) %{_mandir}/it/man6/wesnothd.6* |
d7602b85 | 257 | %lang(ja) %{_mandir}/ja/man6/wesnothd.6* |
d22c6766 | 258 | %lang(lt) %{_mandir}/lt/man6/wesnothd.6* |
e579b435 | 259 | %lang(pl) %{_mandir}/pl/man6/wesnothd.6* |
2bf53405 | 260 | %lang(pt) %{_mandir}/pt/man6/wesnothd.6* |
d7602b85 | 261 | %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6* |
83629e31 | 262 | %lang(ru) %{_mandir}/ru/man6/wesnothd.6* |
d7602b85 | 263 | %lang(sk) %{_mandir}/sk/man6/wesnothd.6* |
83629e31 | 264 | %lang(sr) %{_mandir}/sr/man6/wesnothd.6* |
265 | %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6* | |
266 | %lang(tr) %{_mandir}/tr/man6/wesnothd.6* | |
2bf53405 JB |
267 | %lang(uk) %{_mandir}/uk/man6/wesnothd.6* |
268 | %lang(vi) %{_mandir}/vi/man6/wesnothd.6* | |
83629e31 | 269 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6* |
270 | %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6* | |
40b36f90 | 271 | %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd |
eb718a6d | 272 | %{systemdtmpfilesdir}/%{name}.conf |
dad9a32e | 273 | %endif |
274 | ||
eb718a6d ER |
275 | %files data |
276 | %defattr(644,root,root,755) | |
277 | %{_datadir}/%{name} |