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