]>
Commit | Line | Data |
---|---|---|
4f6ef9bb | 1 | # TODO |
f8498762 | 2 | # - unpackaged language files |
eb35425c | 3 | # Conditional build |
dad9a32e | 4 | %bcond_without server # without server |
b18d78c0 | 5 | %bcond_without tools # without tools |
e579b435 | 6 | %bcond_without fribidi # without Bidirectional language support |
dad9a32e | 7 | # |
8 | Summary: Strategy game with a fantasy theme | |
d78dbe99 | 9 | Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék |
157e8e1f | 10 | Summary(pl.UTF-8): Strategiczna gra z motywem fantasy |
dad9a32e | 11 | Name: wesnoth |
3647514b | 12 | Version: 1.6.5 |
13 | Release: 1 | |
d31a0af5 | 14 | Epoch: 1 |
482a922c | 15 | License: GPL v2+ |
dad9a32e | 16 | Group: X11/Applications/Games/Strategy |
b5dcf87b | 17 | Source0: http://dl.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2 |
3647514b | 18 | # Source0-md5: 493826bbd9ba355930765a7e8fe3749a |
19 | Source1: %{name}d.init | |
717cee4c | 20 | Patch0: %{name}-Makefile.patch |
21 | Patch1: %{name}-locale_dir.patch | |
22 | Patch2: %{name}-werror.patch | |
3647514b | 23 | Patch3: %{name}-desktop.patch |
4d5620e7 | 24 | URL: http://www.wesnoth.org/ |
ae1834b0 | 25 | BuildRequires: SDL-devel >= 1.2.7 |
dad9a32e | 26 | BuildRequires: SDL_image-devel >= 1.2 |
27 | BuildRequires: SDL_mixer-devel >= 1.2 | |
dad9a32e | 28 | BuildRequires: SDL_net-devel >= 1.2 |
d22c6766 | 29 | BuildRequires: SDL_ttf-devel >= 2.0.8 |
126856ae | 30 | BuildRequires: autoconf >= 2.59 |
9d16f83e | 31 | BuildRequires: automake >= 1:1.9 |
e579b435 | 32 | BuildRequires: boost-devel >= 1.33 |
33 | %{?with_fribidi:BuildRequires: fribidi-devel} | |
9d16f83e | 34 | BuildRequires: gettext-devel |
759b9d08 | 35 | BuildRequires: libpng-devel |
6ac5e90b | 36 | BuildRequires: libstdc++-devel |
9d16f83e | 37 | BuildRequires: libtool >= 2:1.5 |
d22c6766 | 38 | BuildRequires: libvorbis-devel |
39 | BuildRequires: pkg-config | |
56da1b20 | 40 | BuildRequires: python-devel |
56da1b20 | 41 | BuildRequires: rpm-pythonprov |
759b9d08 | 42 | BuildRequires: rpmbuild(macros) >= 1.268 |
d22c6766 | 43 | BuildRequires: sed >= 4.0 |
516c4760 | 44 | BuildRequires: zipios++-devel |
717cee4c | 45 | # sr@Latn vs. sr@latin |
46 | Conflicts: glibc-misc < 6:2.7 | |
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 | |
717cee4c | 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 |
717cee4c | 82 | # sr@Latn vs. sr@latin |
83 | Conflicts: glibc-misc < 6:2.7 | |
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 | |
b5dcf87b | 111 | %setup -q |
6734084f | 112 | %patch0 -p1 |
1c7a318b | 113 | %patch1 -p1 |
717cee4c | 114 | %patch2 -p1 |
3647514b | 115 | %patch3 -p1 |
ae9d8c9a | 116 | %{__sed} -i 's,$PYTHON_PREFIX"/lib/,"%{_libdir}/,g' configure.ac |
dad9a32e | 117 | |
118 | %build | |
629473ee | 119 | %{__gettextize} |
e579b435 | 120 | %{__aclocal} -I m4 |
629473ee | 121 | %{__autoconf} |
122 | %{__autoheader} | |
123 | %{__automake} | |
dad9a32e | 124 | %configure \ |
ae9d8c9a | 125 | PYTHON_VERSION=%{py_ver} \ |
dad9a32e | 126 | %{?with_server:--enable-server} \ |
d22c6766 | 127 | %{?with_server:--enable-campaign-server} \ |
128 | --enable-python-install \ | |
dad9a32e | 129 | %{?with_tools:--enable-editor} \ |
c12ea96c | 130 | %{?with_tools:--enable-tools} \ |
e579b435 | 131 | --with%{!?with_fribidi:out}-fribidi \ |
8a64199f | 132 | --docdir=%{_docdir}/%{name}-%{version} \ |
133 | --with-icondir=%{_pixmapsdir} \ | |
c12ea96c | 134 | --with-zipios |
dad9a32e | 135 | %{__make} |
136 | ||
137 | %install | |
138 | rm -rf $RPM_BUILD_ROOT | |
d31a0af5 | 139 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}} |
dad9a32e | 140 | |
141 | %{__make} install \ | |
142 | DESTDIR=$RPM_BUILD_ROOT | |
143 | ||
8a64199f | 144 | # install additional docs |
145 | install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
146 | gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README} | |
147 | ||
d22c6766 | 148 | %if %{with server} |
3647514b | 149 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd |
d22c6766 | 150 | %endif |
dad9a32e | 151 | |
759b9d08 | 152 | mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb} |
c12ea96c MB |
153 | |
154 | # unsupported(?) | |
7d4eb852 | 155 | rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia |
a60f6f21 | 156 | rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/fur_IT |
c12ea96c | 157 | rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la |
a60f6f21 | 158 | rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/racv |
7d4eb852 | 159 | rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia |
c12ea96c MB |
160 | |
161 | # the same as manuals from %{_mandir}/man? | |
162 | rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB | |
163 | ||
ae9d8c9a | 164 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
165 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
166 | %py_postclean | |
d22c6766 | 167 | |
5105ea28 | 168 | %find_lang %{name} --all-name |
169 | ||
dad9a32e | 170 | %clean |
171 | rm -rf $RPM_BUILD_ROOT | |
172 | ||
40b36f90 JK |
173 | %pre server |
174 | %groupadd -P %{name}-server -g 178 wesnothd | |
175 | %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd | |
176 | ||
3fdd0ea2 | 177 | %post server |
178 | /sbin/chkconfig --add wesnothd | |
c12ea96c | 179 | %service wesnothd restart |
3fdd0ea2 | 180 | |
181 | %preun server | |
182 | if [ "$1" = "0" ]; then | |
c12ea96c | 183 | %service wesnothd stop |
24e1b6fa | 184 | /sbin/chkconfig --del wesnothd |
40b36f90 JK |
185 | %userremove wesnothd |
186 | %groupremove wesnothd | |
3fdd0ea2 | 187 | fi |
188 | ||
5105ea28 | 189 | %files -f %{name}.lang |
dad9a32e | 190 | %defattr(644,root,root,755) |
8a64199f | 191 | %doc %{_docdir}/%{name}-%{version} |
dad9a32e | 192 | %attr(755,root,root) %{_bindir}/wesnoth |
0c6dc98e | 193 | %{_mandir}/man6/wesnoth.6* |
d31a0af5 | 194 | %lang(cs) %{_mandir}/cs/man6/wesnoth.6* |
d22c6766 | 195 | #%%lang(da) %{_mandir}/da/man6/wesnoth.6* |
e579b435 | 196 | %lang(de) %{_mandir}/de/man6/wesnoth.6* |
197 | %lang(es) %{_mandir}/es/man6/wesnoth.6* | |
21fae08c | 198 | #%%lang(et) %{_mandir}/et/man6/wesnoth.6* |
d18a93b2 | 199 | %lang(fi) %{_mandir}/fi/man6/wesnoth.6* |
bdc2942c | 200 | %lang(fr) %{_mandir}/fr/man6/wesnoth.6* |
7d4eb852 | 201 | %lang(gl) %{_mandir}/gl/man6/wesnoth.6* |
e579b435 | 202 | %lang(hu) %{_mandir}/hu/man6/wesnoth.6* |
126856ae | 203 | %lang(it) %{_mandir}/it/man6/wesnoth.6* |
d22c6766 | 204 | #%%lang(ja) %{_mandir}/ja/man6/wesnoth.6* |
7d4eb852 | 205 | %lang(lt) %{_mandir}/lt/man6/wesnoth.6* |
d22c6766 | 206 | #%%lang(nl) %{_mandir}/nl/man6/wesnoth.6* |
e579b435 | 207 | %lang(pl) %{_mandir}/pl/man6/wesnoth.6* |
bdc2942c | 208 | #%%lang(ru) %{_mandir}/ru/man6/wesnoth.6* |
5105ea28 | 209 | %lang(sk) %{_mandir}/sk/man6/wesnoth.6* |
b5dcf87b | 210 | %lang(sr) %{_mandir}/sr/man6/wesnoth.6* |
21fae08c | 211 | #%%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6* |
717cee4c | 212 | %lang(sv) %{_mandir}/sv/man6/wesnoth.6* |
7d4eb852 | 213 | %lang(tr) %{_mandir}/tr/man6/wesnoth.6* |
e579b435 | 214 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6* |
60249c9c | 215 | %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6* |
0c6dc98e | 216 | %{_datadir}/%{name} |
3647514b | 217 | %{_desktopdir}/*.desktop |
218 | %{_pixmapsdir}/*-icon.png | |
dad9a32e | 219 | |
220 | %if %{with server} | |
221 | %files server | |
222 | %defattr(644,root,root,755) | |
d22c6766 | 223 | %attr(755,root,root) %{_bindir}/campaignd |
dad9a32e | 224 | %attr(755,root,root) %{_bindir}/wesnothd |
3fdd0ea2 | 225 | %attr(754,root,root) /etc/rc.d/init.d/wesnothd |
0c6dc98e | 226 | %{_mandir}/man6/wesnothd.6* |
e579b435 | 227 | %lang(cs) %{_mandir}/cs/man6/wesnothd.6* |
b5dcf87b | 228 | #%%lang(da) %{_mandir}/da/man6/wesnothd.6* |
e579b435 | 229 | %lang(de) %{_mandir}/de/man6/wesnothd.6* |
230 | %lang(es) %{_mandir}/es/man6/wesnothd.6* | |
21fae08c | 231 | # %lang(et) %{_mandir}/et/man6/wesnothd.6* |
d18a93b2 | 232 | %lang(fi) %{_mandir}/fi/man6/wesnothd.6* |
bdc2942c | 233 | %lang(fr) %{_mandir}/fr/man6/wesnothd.6* |
b5dcf87b | 234 | #%%lang(gl) %{_mandir}/gl/man6/wesnothd.6* |
e579b435 | 235 | %lang(hu) %{_mandir}/hu/man6/wesnothd.6* |
236 | %lang(it) %{_mandir}/it/man6/wesnothd.6* | |
b5dcf87b | 237 | #%lang(ja) %{_mandir}/ja/man6/wesnothd.6* |
d22c6766 | 238 | %lang(lt) %{_mandir}/lt/man6/wesnothd.6* |
b5dcf87b | 239 | #%%lang(nl) %{_mandir}/nl/man6/wesnothd.6* |
e579b435 | 240 | %lang(pl) %{_mandir}/pl/man6/wesnothd.6* |
b5dcf87b | 241 | #%%lang(sk) %{_mandir}/sk/man6/wesnothd.6* |
7d4eb852 | 242 | %lang(sr) %{_mandir}/sr/man6/wesnothd.6* |
21fae08c | 243 | #%%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6* |
717cee4c | 244 | %lang(sv) %{_mandir}/sv/man6/wesnothd.6* |
7d4eb852 | 245 | %lang(tr) %{_mandir}/tr/man6/wesnothd.6* |
e579b435 | 246 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6* |
717cee4c | 247 | %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6* |
40b36f90 | 248 | %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd |
dad9a32e | 249 | %endif |
250 | ||
251 | %if %{with tools} | |
252 | %files tools | |
253 | %defattr(644,root,root,755) | |
027c8016 | 254 | %attr(755,root,root) %{_bindir}/cutter |
255 | %attr(755,root,root) %{_bindir}/exploder | |
d22c6766 | 256 | %attr(755,root,root) %{_bindir}/wesnoth_addon_manager |
e579b435 | 257 | %attr(755,root,root) %{_bindir}/wmlindent |
258 | %attr(755,root,root) %{_bindir}/wmllint | |
259 | %attr(755,root,root) %{_bindir}/wmlscope | |
ae9d8c9a | 260 | %dir %{py_sitedir}/%{name} |
261 | %{py_sitedir}/%{name}/*.py[co] | |
dad9a32e | 262 | %endif |