]>
Commit | Line | Data |
---|---|---|
4f6ef9bb | 1 | # TODO |
8a64199f | 2 | # - use desktop file included with project (consider which one are better) |
f8498762 | 3 | # - unpackaged language files |
eb35425c | 4 | # Conditional build |
dad9a32e | 5 | %bcond_without server # without server |
b18d78c0 | 6 | %bcond_without tools # without tools |
e579b435 | 7 | %bcond_without fribidi # without Bidirectional language support |
dad9a32e | 8 | # |
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 |
157e8e1f | 11 | Summary(pl.UTF-8): Strategiczna gra z motywem fantasy |
dad9a32e | 12 | Name: wesnoth |
717cee4c | 13 | Version: 1.6.4 |
4e335f72 | 14 | Release: 2 |
d31a0af5 | 15 | Epoch: 1 |
482a922c | 16 | License: GPL v2+ |
dad9a32e | 17 | Group: X11/Applications/Games/Strategy |
b5dcf87b | 18 | Source0: http://dl.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2 |
717cee4c | 19 | # Source0-md5: c8bc4c5b2be28e29563dfe3f89eafd51 |
dad9a32e | 20 | Source1: %{name}.desktop |
8a64199f | 21 | Source2: %{name}_editor.desktop |
22 | Source3: %{name}d.init | |
717cee4c | 23 | Patch0: %{name}-Makefile.patch |
24 | Patch1: %{name}-locale_dir.patch | |
25 | Patch2: %{name}-werror.patch | |
4d5620e7 | 26 | URL: http://www.wesnoth.org/ |
ae1834b0 | 27 | BuildRequires: SDL-devel >= 1.2.7 |
dad9a32e | 28 | BuildRequires: SDL_image-devel >= 1.2 |
29 | BuildRequires: SDL_mixer-devel >= 1.2 | |
dad9a32e | 30 | BuildRequires: SDL_net-devel >= 1.2 |
d22c6766 | 31 | BuildRequires: SDL_ttf-devel >= 2.0.8 |
126856ae | 32 | BuildRequires: autoconf >= 2.59 |
9d16f83e | 33 | BuildRequires: automake >= 1:1.9 |
e579b435 | 34 | BuildRequires: boost-devel >= 1.33 |
35 | %{?with_fribidi:BuildRequires: fribidi-devel} | |
9d16f83e | 36 | BuildRequires: gettext-devel |
759b9d08 | 37 | BuildRequires: libpng-devel |
6ac5e90b | 38 | BuildRequires: libstdc++-devel |
9d16f83e | 39 | BuildRequires: libtool >= 2:1.5 |
d22c6766 | 40 | BuildRequires: libvorbis-devel |
41 | BuildRequires: pkg-config | |
56da1b20 | 42 | BuildRequires: python-devel |
56da1b20 | 43 | BuildRequires: rpm-pythonprov |
759b9d08 | 44 | BuildRequires: rpmbuild(macros) >= 1.268 |
d22c6766 | 45 | BuildRequires: sed >= 4.0 |
516c4760 | 46 | BuildRequires: zipios++-devel |
717cee4c | 47 | # sr@Latn vs. sr@latin |
48 | Conflicts: glibc-misc < 6:2.7 | |
dad9a32e | 49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
50 | ||
51 | %description | |
52 | Battle for Wesnoth is a fantasy strategy game. Battle for control of | |
53 | villages, using variety of units which have advantages and | |
54 | disadvantages in different types of terrains and against different | |
55 | types of attacks. Units gain experience and advance levels, and are | |
56 | carried over from one scenario to the next campaign. | |
57 | ||
d78dbe99 | 58 | %description -l hu.UTF-8 |
a60f6f21 | 59 | Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó |
60 | stratégiai játék. Harc a falvak megszerzéséért, különböző egységek | |
61 | felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a | |
62 | különféle terepeken és a különböző támadási stílusok ellen. Az | |
63 | egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a | |
64 | következő pályára. | |
d78dbe99 | 65 | |
7840b0fd | 66 | %description -l pl.UTF-8 |
a60f6f21 | 67 | Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad |
68 | wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub | |
69 | jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom | |
70 | ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są | |
71 | przenoszone z jednej scenerii do następnej kampanii. | |
dad9a32e | 72 | |
dad9a32e | 73 | %package server |
74 | Summary: Network server for Wesnoth | |
717cee4c | 75 | Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz |
157e8e1f | 76 | Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth |
dad9a32e | 77 | Group: X11/Applications/Games/Strategy |
392ee82f | 78 | Requires(post,preun): /sbin/chkconfig |
40b36f90 JK |
79 | Requires(postun): /usr/sbin/groupdel |
80 | Requires(postun): /usr/sbin/userdel | |
81 | Requires(pre): /usr/sbin/groupadd | |
82 | Requires(pre): /usr/sbin/useradd | |
759b9d08 | 83 | Requires: rc-scripts >= 0.4.0.17 |
717cee4c | 84 | # sr@Latn vs. sr@latin |
85 | Conflicts: glibc-misc < 6:2.7 | |
dad9a32e | 86 | |
87 | %description server | |
88 | Server for playing networked games of Wesnoth. | |
89 | ||
d78dbe99 ZU |
90 | %description server -l hu.UTF-8 |
91 | Szerver a Wesnoth hálózati játékához. | |
92 | ||
7840b0fd | 93 | %description server -l pl.UTF-8 |
dad9a32e | 94 | Serwer do prowadzenia sieciowych gier Wesnoth. |
dad9a32e | 95 | |
dad9a32e | 96 | %package tools |
97 | Summary: Tools for Wesnoth | |
d78dbe99 | 98 | Summary(hu.UTF.8): Eszközök a Wesnoth-hoz |
157e8e1f | 99 | Summary(pl.UTF-8): Narzędzia dla Wesnoth |
dad9a32e | 100 | Group: X11/Applications/Games/Strategy |
888b6155 | 101 | Requires: %{name} = %{epoch}:%{version}-%{release} |
dad9a32e | 102 | |
103 | %description tools | |
104 | Map editor and translations tools. | |
105 | ||
d78dbe99 ZU |
106 | %description tools -l hu.UTF-8 |
107 | Pályaszerkesztők és fordítási eszközök. | |
108 | ||
7840b0fd JR |
109 | %description tools -l pl.UTF-8 |
110 | Edytor map i narzędzia do tłumaczeń. | |
dad9a32e | 111 | |
112 | %prep | |
b5dcf87b | 113 | %setup -q |
6734084f | 114 | %patch0 -p1 |
1c7a318b | 115 | %patch1 -p1 |
717cee4c | 116 | %patch2 -p1 |
ae9d8c9a | 117 | %{__sed} -i 's,$PYTHON_PREFIX"/lib/,"%{_libdir}/,g' configure.ac |
dad9a32e | 118 | |
119 | %build | |
629473ee | 120 | %{__gettextize} |
e579b435 | 121 | %{__aclocal} -I m4 |
629473ee | 122 | %{__autoconf} |
123 | %{__autoheader} | |
124 | %{__automake} | |
dad9a32e | 125 | %configure \ |
ae9d8c9a | 126 | PYTHON_VERSION=%{py_ver} \ |
dad9a32e | 127 | %{?with_server:--enable-server} \ |
d22c6766 | 128 | %{?with_server:--enable-campaign-server} \ |
129 | --enable-python-install \ | |
dad9a32e | 130 | %{?with_tools:--enable-editor} \ |
c12ea96c | 131 | %{?with_tools:--enable-tools} \ |
e579b435 | 132 | --with%{!?with_fribidi:out}-fribidi \ |
8a64199f | 133 | --docdir=%{_docdir}/%{name}-%{version} \ |
134 | --with-icondir=%{_pixmapsdir} \ | |
c12ea96c | 135 | --with-zipios |
dad9a32e | 136 | %{__make} |
137 | ||
138 | %install | |
139 | rm -rf $RPM_BUILD_ROOT | |
d31a0af5 | 140 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}} |
dad9a32e | 141 | |
142 | %{__make} install \ | |
143 | DESTDIR=$RPM_BUILD_ROOT | |
144 | ||
8a64199f | 145 | # install additional docs |
146 | install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
147 | gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README} | |
148 | ||
dad9a32e | 149 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} |
8a64199f | 150 | install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir} |
d22c6766 | 151 | %if %{with server} |
8a64199f | 152 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd |
d22c6766 | 153 | %endif |
dad9a32e | 154 | |
759b9d08 | 155 | mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb} |
c12ea96c MB |
156 | |
157 | # unsupported(?) | |
7d4eb852 | 158 | rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia |
a60f6f21 | 159 | rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/fur_IT |
c12ea96c | 160 | rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la |
a60f6f21 | 161 | rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/racv |
7d4eb852 | 162 | rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia |
c12ea96c MB |
163 | |
164 | # the same as manuals from %{_mandir}/man? | |
165 | rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB | |
166 | ||
ae9d8c9a | 167 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
168 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
169 | %py_postclean | |
d22c6766 | 170 | |
5105ea28 | 171 | %find_lang %{name} --all-name |
172 | ||
dad9a32e | 173 | %clean |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | ||
40b36f90 JK |
176 | %pre server |
177 | %groupadd -P %{name}-server -g 178 wesnothd | |
178 | %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd | |
179 | ||
3fdd0ea2 | 180 | %post server |
181 | /sbin/chkconfig --add wesnothd | |
c12ea96c | 182 | %service wesnothd restart |
3fdd0ea2 | 183 | |
184 | %preun server | |
185 | if [ "$1" = "0" ]; then | |
c12ea96c | 186 | %service wesnothd stop |
24e1b6fa | 187 | /sbin/chkconfig --del wesnothd |
40b36f90 JK |
188 | %userremove wesnothd |
189 | %groupremove wesnothd | |
3fdd0ea2 | 190 | fi |
191 | ||
5105ea28 | 192 | %files -f %{name}.lang |
dad9a32e | 193 | %defattr(644,root,root,755) |
8a64199f | 194 | %doc %{_docdir}/%{name}-%{version} |
dad9a32e | 195 | %attr(755,root,root) %{_bindir}/wesnoth |
0c6dc98e | 196 | %{_mandir}/man6/wesnoth.6* |
d31a0af5 | 197 | %lang(cs) %{_mandir}/cs/man6/wesnoth.6* |
d22c6766 | 198 | #%%lang(da) %{_mandir}/da/man6/wesnoth.6* |
e579b435 | 199 | %lang(de) %{_mandir}/de/man6/wesnoth.6* |
200 | %lang(es) %{_mandir}/es/man6/wesnoth.6* | |
d18a93b2 | 201 | %lang(fi) %{_mandir}/fi/man6/wesnoth.6* |
bdc2942c | 202 | %lang(fr) %{_mandir}/fr/man6/wesnoth.6* |
7d4eb852 | 203 | %lang(gl) %{_mandir}/gl/man6/wesnoth.6* |
e579b435 | 204 | %lang(hu) %{_mandir}/hu/man6/wesnoth.6* |
126856ae | 205 | %lang(it) %{_mandir}/it/man6/wesnoth.6* |
d22c6766 | 206 | #%%lang(ja) %{_mandir}/ja/man6/wesnoth.6* |
7d4eb852 | 207 | %lang(lt) %{_mandir}/lt/man6/wesnoth.6* |
d22c6766 | 208 | #%%lang(nl) %{_mandir}/nl/man6/wesnoth.6* |
e579b435 | 209 | %lang(pl) %{_mandir}/pl/man6/wesnoth.6* |
bdc2942c | 210 | #%%lang(ru) %{_mandir}/ru/man6/wesnoth.6* |
5105ea28 | 211 | %lang(sk) %{_mandir}/sk/man6/wesnoth.6* |
b5dcf87b | 212 | %lang(sr) %{_mandir}/sr/man6/wesnoth.6* |
717cee4c | 213 | %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6* |
214 | %lang(sv) %{_mandir}/sv/man6/wesnoth.6* | |
7d4eb852 | 215 | %lang(tr) %{_mandir}/tr/man6/wesnoth.6* |
e579b435 | 216 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6* |
60249c9c | 217 | %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6* |
0c6dc98e | 218 | %{_datadir}/%{name} |
dad9a32e | 219 | %{_desktopdir}/%{name}.desktop |
e579b435 | 220 | %{_pixmapsdir}/%{name}-icon.png |
dad9a32e | 221 | |
222 | %if %{with server} | |
223 | %files server | |
224 | %defattr(644,root,root,755) | |
d22c6766 | 225 | %attr(755,root,root) %{_bindir}/campaignd |
dad9a32e | 226 | %attr(755,root,root) %{_bindir}/wesnothd |
3fdd0ea2 | 227 | %attr(754,root,root) /etc/rc.d/init.d/wesnothd |
0c6dc98e | 228 | %{_mandir}/man6/wesnothd.6* |
e579b435 | 229 | %lang(cs) %{_mandir}/cs/man6/wesnothd.6* |
b5dcf87b | 230 | #%%lang(da) %{_mandir}/da/man6/wesnothd.6* |
e579b435 | 231 | %lang(de) %{_mandir}/de/man6/wesnothd.6* |
232 | %lang(es) %{_mandir}/es/man6/wesnothd.6* | |
d18a93b2 | 233 | %lang(fi) %{_mandir}/fi/man6/wesnothd.6* |
bdc2942c | 234 | %lang(fr) %{_mandir}/fr/man6/wesnothd.6* |
b5dcf87b | 235 | #%%lang(gl) %{_mandir}/gl/man6/wesnothd.6* |
e579b435 | 236 | %lang(hu) %{_mandir}/hu/man6/wesnothd.6* |
237 | %lang(it) %{_mandir}/it/man6/wesnothd.6* | |
b5dcf87b | 238 | #%lang(ja) %{_mandir}/ja/man6/wesnothd.6* |
d22c6766 | 239 | %lang(lt) %{_mandir}/lt/man6/wesnothd.6* |
b5dcf87b | 240 | #%%lang(nl) %{_mandir}/nl/man6/wesnothd.6* |
e579b435 | 241 | %lang(pl) %{_mandir}/pl/man6/wesnothd.6* |
b5dcf87b | 242 | #%%lang(sk) %{_mandir}/sk/man6/wesnothd.6* |
7d4eb852 | 243 | %lang(sr) %{_mandir}/sr/man6/wesnothd.6* |
717cee4c | 244 | %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6* |
245 | %lang(sv) %{_mandir}/sv/man6/wesnothd.6* | |
7d4eb852 | 246 | %lang(tr) %{_mandir}/tr/man6/wesnothd.6* |
e579b435 | 247 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6* |
717cee4c | 248 | %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6* |
40b36f90 | 249 | %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd |
dad9a32e | 250 | %endif |
251 | ||
252 | %if %{with tools} | |
253 | %files tools | |
254 | %defattr(644,root,root,755) | |
027c8016 | 255 | %attr(755,root,root) %{_bindir}/cutter |
256 | %attr(755,root,root) %{_bindir}/exploder | |
d22c6766 | 257 | %attr(755,root,root) %{_bindir}/wesnoth_addon_manager |
258 | #%%attr(755,root,root) %{_bindir}/wesnoth_editor | |
e579b435 | 259 | %attr(755,root,root) %{_bindir}/wmlindent |
260 | %attr(755,root,root) %{_bindir}/wmllint | |
261 | %attr(755,root,root) %{_bindir}/wmlscope | |
d22c6766 | 262 | #%%{_mandir}/man6/wesnoth_editor.6* |
263 | #%%lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6* | |
264 | #%%lang(da) %{_mandir}/da/man6/wesnoth_editor.6* | |
265 | #%%lang(de) %{_mandir}/de/man6/wesnoth_editor.6* | |
266 | #%%lang(es) %{_mandir}/es/man6/wesnoth_editor.6* | |
267 | #%%lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6* | |
268 | #%%lang(gl) %{_mandir}/gl/man6/wesnoth_editor.6* | |
269 | #%%lang(hu) %{_mandir}/hu/man6/wesnoth_editor.6* | |
270 | #%%lang(it) %{_mandir}/it/man6/wesnoth_editor.6* | |
271 | #%%lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6* | |
272 | #%%lang(lt) %{_mandir}/lt/man6/wesnoth_editor.6* | |
273 | #%%lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6* | |
274 | #%%lang(pl) %{_mandir}/pl/man6/wesnoth_editor.6* | |
275 | #%%lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6* | |
276 | #%%lang(sr) %{_mandir}/sr/man6/wesnoth_editor.6* | |
277 | #%%lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6* | |
278 | #%%lang(tr) %{_mandir}/tr/man6/wesnoth_editor.6* | |
279 | #%%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth_editor.6* | |
280 | #%%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth_editor.6* | |
8a64199f | 281 | %{_desktopdir}/%{name}_editor.desktop |
e579b435 | 282 | %{_pixmapsdir}/%{name}_editor-icon.png |
ae9d8c9a | 283 | %dir %{py_sitedir}/%{name} |
284 | %{py_sitedir}/%{name}/*.py[co] | |
dad9a32e | 285 | %endif |