]>
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 |
b18d78c0 | 7 | %bcond_without tools # without tools |
e579b435 | 8 | %bcond_without fribidi # without Bidirectional language support |
eb718a6d | 9 | |
dad9a32e | 10 | Summary: Strategy game with a fantasy theme |
d78dbe99 | 11 | Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék |
2bf53405 | 12 | Summary(pl.UTF-8): Gra strategiczna z motywem fantasy |
dad9a32e | 13 | Name: wesnoth |
2bf53405 JB |
14 | Version: 1.10.7 |
15 | Release: 1 | |
d31a0af5 | 16 | Epoch: 1 |
482a922c | 17 | License: GPL v2+ |
dad9a32e | 18 | Group: X11/Applications/Games/Strategy |
d7602b85 | 19 | Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2 |
2bf53405 | 20 | # Source0-md5: 3f460a494530d32aa5d5d0f19c95efbd |
3647514b | 21 | Source1: %{name}d.init |
0e4bc507 | 22 | Source2: %{name}.tmpfiles |
d94078df | 23 | Patch0: %{name}-desktop.patch |
24 | Patch1: %{name}-locale_dir.patch | |
4d5620e7 | 25 | URL: http://www.wesnoth.org/ |
b20e0743 | 26 | BuildRequires: SDL-devel >= 1.2.14-4 |
dad9a32e | 27 | BuildRequires: SDL_image-devel >= 1.2 |
28 | BuildRequires: SDL_mixer-devel >= 1.2 | |
dad9a32e | 29 | BuildRequires: SDL_net-devel >= 1.2 |
d22c6766 | 30 | BuildRequires: SDL_ttf-devel >= 2.0.8 |
2bf53405 JB |
31 | BuildRequires: boost-devel >= 1.36 |
32 | BuildRequires: cmake >= 2.6.0 | |
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 |
759b9d08 | 37 | BuildRequires: libpng-devel |
6ac5e90b | 38 | BuildRequires: libstdc++-devel |
2bf53405 | 39 | BuildRequires: pango-devel >= 1:1.14.8 |
c94bb8a1 | 40 | BuildRequires: pkgconfig |
f1cb8481 | 41 | BuildRequires: rpm-pythonprov |
2bf53405 | 42 | BuildRequires: rpmbuild(macros) >= 1.605 |
d22c6766 | 43 | BuildRequires: sed >= 4.0 |
2bf53405 JB |
44 | BuildRequires: xorg-lib-libICE-devel |
45 | BuildRequires: xorg-lib-libSM-devel | |
46 | BuildRequires: xorg-lib-libX11-devel | |
47 | BuildRequires: xorg-lib-libXext-devel | |
d7602b85 | 48 | BuildRequires: zlib-devel |
eb718a6d | 49 | Requires: %{name}-data = %{epoch}:%{version} |
a5e29dd0 | 50 | Requires: SDL >= 1.2.14-4 |
2bf53405 JB |
51 | Requires: fontconfig >= 2.4.1 |
52 | Requires: pango >= 1:1.14.8 | |
dad9a32e | 53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
54 | ||
55 | %description | |
56 | Battle for Wesnoth is a fantasy strategy game. Battle for control of | |
57 | villages, using variety of units which have advantages and | |
58 | disadvantages in different types of terrains and against different | |
59 | types of attacks. Units gain experience and advance levels, and are | |
60 | carried over from one scenario to the next campaign. | |
61 | ||
d78dbe99 | 62 | %description -l hu.UTF-8 |
a60f6f21 | 63 | Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó |
64 | stratégiai játék. Harc a falvak megszerzéséért, különböző egységek | |
65 | felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a | |
66 | különféle terepeken és a különböző támadási stílusok ellen. Az | |
67 | egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a | |
68 | következő pályára. | |
d78dbe99 | 69 | |
7840b0fd | 70 | %description -l pl.UTF-8 |
a60f6f21 | 71 | Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad |
72 | wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub | |
73 | jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom | |
74 | ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są | |
75 | przenoszone z jednej scenerii do następnej kampanii. | |
dad9a32e | 76 | |
dad9a32e | 77 | %package server |
78 | Summary: Network server for Wesnoth | |
717cee4c | 79 | Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz |
157e8e1f | 80 | Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth |
dad9a32e | 81 | Group: X11/Applications/Games/Strategy |
392ee82f | 82 | Requires(post,preun): /sbin/chkconfig |
40b36f90 JK |
83 | Requires(postun): /usr/sbin/groupdel |
84 | Requires(postun): /usr/sbin/userdel | |
85 | Requires(pre): /usr/sbin/groupadd | |
86 | Requires(pre): /usr/sbin/useradd | |
759b9d08 | 87 | Requires: rc-scripts >= 0.4.0.17 |
745d3686 ER |
88 | Provides: group(wesnothd) |
89 | Provides: user(wesnothd) | |
dad9a32e | 90 | |
91 | %description server | |
92 | Server for playing networked games of Wesnoth. | |
93 | ||
d78dbe99 ZU |
94 | %description server -l hu.UTF-8 |
95 | Szerver a Wesnoth hálózati játékához. | |
96 | ||
7840b0fd | 97 | %description server -l pl.UTF-8 |
dad9a32e | 98 | Serwer do prowadzenia sieciowych gier Wesnoth. |
dad9a32e | 99 | |
dad9a32e | 100 | %package tools |
101 | Summary: Tools for Wesnoth | |
d94078df | 102 | Summary(hu.UTF.8): Eszközök a Wesnoth-hoz |
157e8e1f | 103 | Summary(pl.UTF-8): Narzędzia dla Wesnoth |
dad9a32e | 104 | Group: X11/Applications/Games/Strategy |
888b6155 | 105 | Requires: %{name} = %{epoch}:%{version}-%{release} |
dad9a32e | 106 | |
107 | %description tools | |
108 | Map editor and translations tools. | |
109 | ||
d78dbe99 ZU |
110 | %description tools -l hu.UTF-8 |
111 | Pályaszerkesztők és fordítási eszközök. | |
112 | ||
7840b0fd JR |
113 | %description tools -l pl.UTF-8 |
114 | Edytor map i narzędzia do tłumaczeń. | |
dad9a32e | 115 | |
eb718a6d | 116 | %package data |
2bf53405 JB |
117 | Summary: Strategy game with a fantasy theme - data files |
118 | Summary(pl.UTF-8): Gra strategiczna z motywem fantasy - pliki danych | |
eb718a6d | 119 | Group: Applications/Games |
2bf53405 | 120 | %if "%{_rpmversion}" >= "4.6" |
eb718a6d ER |
121 | BuildArch: noarch |
122 | %endif | |
123 | ||
124 | %description data | |
125 | This package contains the data files for Wesnoth. | |
126 | ||
2bf53405 JB |
127 | %description data -l pl.UTF-8 |
128 | Ten pakiet zawiera pliki danych dla gry Wesnoth. | |
129 | ||
dad9a32e | 130 | %prep |
b5dcf87b | 131 | %setup -q |
6734084f | 132 | %patch0 -p1 |
1c7a318b | 133 | %patch1 -p1 |
d7602b85 | 134 | |
135 | # don't install locales in %{_datadir}/%{name} | |
d94078df | 136 | %{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt |
dad9a32e | 137 | |
2bf53405 JB |
138 | %{__sed} -i '1s,/usr/bin/env python$,%{__python},' \ |
139 | data/tools/{about_cfg_to_wiki,expand-terrain-macros.py,extractbindings,imgcheck,journeylifter,scoutDefault.py,terrain2wiki.py,trackplacer,wesnoth_addon_manager,wmlflip,wmlindent,wmllint,wmllint_gui,wmlmove,wmlscope,wmlunits,wmlvalidator,wmlxgettext} \ | |
140 | data/tools/unit_tree/{TeamColorizer,overview.py} \ | |
141 | data/tools/wesnoth/{blacklist.py,wescamp.py,wmldata.py,wmlparser.py,wmlparser2.py} | |
142 | ||
143 | %{__sed} -i '1s,/usr/bin/python$,%{__python},' data/tools/terrain2wiki.py | |
144 | ||
dad9a32e | 145 | %build |
d7602b85 | 146 | install -d build |
147 | cd build | |
d94078df | 148 | %cmake \ |
149 | .. \ | |
d7602b85 | 150 | -DENABLE_STRICT_COMPILATION="off" \ |
151 | -DBINDIR="%{_bindir}" \ | |
152 | -DMANDIR="%{_mandir}" \ | |
eb718a6d | 153 | -DLOCALEDIR="%{_localedir}" \ |
d7602b85 | 154 | %{!?with_server:-DENABLE_SERVER="off"} \ |
155 | %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \ | |
156 | %{!?with_tools:-DENABLE_EDITOR="off"} \ | |
157 | %{?with_tools:-DENABLE_TOOLS="on"} \ | |
d94078df | 158 | %{!?with_fribidi:-DENABLE_FRIBIDI="off"} |
d7602b85 | 159 | |
dad9a32e | 160 | %{__make} |
161 | ||
162 | %install | |
163 | rm -rf $RPM_BUILD_ROOT | |
0e4bc507 | 164 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d} \ |
eb718a6d | 165 | $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{_docdir}/%{name}-%{version}} |
dad9a32e | 166 | |
d7602b85 | 167 | %{__make} -C build install \ |
dad9a32e | 168 | DESTDIR=$RPM_BUILD_ROOT |
169 | ||
d22c6766 | 170 | %if %{with server} |
eb718a6d ER |
171 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd |
172 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
d22c6766 | 173 | %endif |
dad9a32e | 174 | |
2bf53405 JB |
175 | # unify |
176 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES@valencia,ca@valencia} | |
177 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb} | |
178 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/{fur_IT,fur} | |
179 | %{__mv} $RPM_BUILD_ROOT%{_mandir}/{ca_ES@valencia,ca@valencia} | |
c12ea96c | 180 | |
d94078df | 181 | # unsupported(?) |
eb718a6d | 182 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ang@latin |
eb718a6d | 183 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/racv |
62daf2b6 | 184 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian |
185 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin | |
c12ea96c MB |
186 | |
187 | # the same as manuals from %{_mandir}/man? | |
729e3de3 | 188 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB |
c12ea96c | 189 | |
5105ea28 | 190 | %find_lang %{name} --all-name |
191 | ||
dad9a32e | 192 | %clean |
193 | rm -rf $RPM_BUILD_ROOT | |
194 | ||
40b36f90 JK |
195 | %pre server |
196 | %groupadd -P %{name}-server -g 178 wesnothd | |
197 | %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd | |
198 | ||
3fdd0ea2 | 199 | %post server |
200 | /sbin/chkconfig --add wesnothd | |
c12ea96c | 201 | %service wesnothd restart |
3fdd0ea2 | 202 | |
203 | %preun server | |
204 | if [ "$1" = "0" ]; then | |
c12ea96c | 205 | %service wesnothd stop |
24e1b6fa | 206 | /sbin/chkconfig --del wesnothd |
40b36f90 JK |
207 | %userremove wesnothd |
208 | %groupremove wesnothd | |
3fdd0ea2 | 209 | fi |
210 | ||
5105ea28 | 211 | %files -f %{name}.lang |
dad9a32e | 212 | %defattr(644,root,root,755) |
2bf53405 JB |
213 | %doc README changelog |
214 | %doc %{_docdir}/%{name} | |
dad9a32e | 215 | %attr(755,root,root) %{_bindir}/wesnoth |
0c6dc98e | 216 | %{_mandir}/man6/wesnoth.6* |
d31a0af5 | 217 | %lang(cs) %{_mandir}/cs/man6/wesnoth.6* |
e579b435 | 218 | %lang(de) %{_mandir}/de/man6/wesnoth.6* |
d3cada04 | 219 | %lang(et) %{_mandir}/et/man6/wesnoth.6* |
83629e31 | 220 | %lang(es) %{_mandir}/es/man6/wesnoth.6* |
221 | %lang(fi) %{_mandir}/fi/man6/wesnoth.6* | |
bdc2942c | 222 | %lang(fr) %{_mandir}/fr/man6/wesnoth.6* |
7d4eb852 | 223 | %lang(gl) %{_mandir}/gl/man6/wesnoth.6* |
e579b435 | 224 | %lang(hu) %{_mandir}/hu/man6/wesnoth.6* |
944acd9d | 225 | %lang(id) %{_mandir}/id/man6/wesnoth.6* |
83629e31 | 226 | %lang(it) %{_mandir}/it/man6/wesnoth.6* |
7d4eb852 | 227 | %lang(lt) %{_mandir}/lt/man6/wesnoth.6* |
e579b435 | 228 | %lang(pl) %{_mandir}/pl/man6/wesnoth.6* |
2bf53405 | 229 | %lang(pt) %{_mandir}/pt/man6/wesnoth.6* |
83629e31 | 230 | %lang(ru) %{_mandir}/ru/man6/wesnoth.6* |
5105ea28 | 231 | %lang(sk) %{_mandir}/sk/man6/wesnoth.6* |
83629e31 | 232 | %lang(sr) %{_mandir}/sr/man6/wesnoth.6* |
233 | %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6* | |
2bf53405 JB |
234 | %lang(uk) %{_mandir}/uk/man6/wesnoth.6* |
235 | %lang(vi) %{_mandir}/vi/man6/wesnoth.6* | |
83629e31 | 236 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6* |
237 | %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6* | |
2bf53405 JB |
238 | %{_desktopdir}/wesnoth.desktop |
239 | %{_desktopdir}/wesnoth_editor.desktop | |
240 | %{_pixmapsdir}/wesnoth-icon.png | |
241 | %{_pixmapsdir}/wesnoth_editor-icon.png | |
dad9a32e | 242 | |
243 | %if %{with server} | |
244 | %files server | |
245 | %defattr(644,root,root,755) | |
d22c6766 | 246 | %attr(755,root,root) %{_bindir}/campaignd |
dad9a32e | 247 | %attr(755,root,root) %{_bindir}/wesnothd |
3fdd0ea2 | 248 | %attr(754,root,root) /etc/rc.d/init.d/wesnothd |
0c6dc98e | 249 | %{_mandir}/man6/wesnothd.6* |
e579b435 | 250 | %lang(cs) %{_mandir}/cs/man6/wesnothd.6* |
e579b435 | 251 | %lang(de) %{_mandir}/de/man6/wesnothd.6* |
252 | %lang(es) %{_mandir}/es/man6/wesnothd.6* | |
d3cada04 | 253 | %lang(et) %{_mandir}/et/man6/wesnothd.6* |
d18a93b2 | 254 | %lang(fi) %{_mandir}/fi/man6/wesnothd.6* |
bdc2942c | 255 | %lang(fr) %{_mandir}/fr/man6/wesnothd.6* |
d16f534c | 256 | %lang(gl) %{_mandir}/gl/man6/wesnothd.6* |
e579b435 | 257 | %lang(hu) %{_mandir}/hu/man6/wesnothd.6* |
944acd9d | 258 | %lang(id) %{_mandir}/id/man6/wesnothd.6* |
e579b435 | 259 | %lang(it) %{_mandir}/it/man6/wesnothd.6* |
d7602b85 | 260 | %lang(ja) %{_mandir}/ja/man6/wesnothd.6* |
d22c6766 | 261 | %lang(lt) %{_mandir}/lt/man6/wesnothd.6* |
e579b435 | 262 | %lang(pl) %{_mandir}/pl/man6/wesnothd.6* |
2bf53405 | 263 | %lang(pt) %{_mandir}/pt/man6/wesnothd.6* |
d7602b85 | 264 | %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6* |
83629e31 | 265 | %lang(ru) %{_mandir}/ru/man6/wesnothd.6* |
d7602b85 | 266 | %lang(sk) %{_mandir}/sk/man6/wesnothd.6* |
83629e31 | 267 | %lang(sr) %{_mandir}/sr/man6/wesnothd.6* |
268 | %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6* | |
269 | %lang(tr) %{_mandir}/tr/man6/wesnothd.6* | |
2bf53405 JB |
270 | %lang(uk) %{_mandir}/uk/man6/wesnothd.6* |
271 | %lang(vi) %{_mandir}/vi/man6/wesnothd.6* | |
83629e31 | 272 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6* |
273 | %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6* | |
40b36f90 | 274 | %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd |
eb718a6d | 275 | %{systemdtmpfilesdir}/%{name}.conf |
dad9a32e | 276 | %endif |
277 | ||
278 | %if %{with tools} | |
279 | %files tools | |
280 | %defattr(644,root,root,755) | |
027c8016 | 281 | %attr(755,root,root) %{_bindir}/cutter |
282 | %attr(755,root,root) %{_bindir}/exploder | |
2bf53405 JB |
283 | %attr(755,root,root) %{_bindir}/schema_generator |
284 | %attr(755,root,root) %{_bindir}/schema_validator | |
dad9a32e | 285 | %endif |
eb718a6d ER |
286 | |
287 | %files data | |
288 | %defattr(644,root,root,755) | |
289 | %{_datadir}/%{name} |