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