]>
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) |
7d4eb852 | 4 | # - dont know what should I do with sr@latin man pages |
510f81c1 ZU |
5 | # - /usr/share/wesnoth/data/core/images/terrain/tent.png: ERROR: |
6 | # Macintosh HFS Extended version 61389 data (unclean) vasprintf failed | |
7 | # (Invalid or incomplete multibyte or wide character) | |
dad9a32e | 8 | # Conditional build |
9 | %bcond_without server # without server | |
b18d78c0 | 10 | %bcond_without tools # without tools |
e579b435 | 11 | %bcond_without fribidi # without Bidirectional language support |
dad9a32e | 12 | # |
13 | Summary: Strategy game with a fantasy theme | |
157e8e1f | 14 | Summary(pl.UTF-8): Strategiczna gra z motywem fantasy |
dad9a32e | 15 | Name: wesnoth |
08fe6b89 | 16 | Version: 1.4.4 |
0e4a3052 | 17 | Release: 1 |
d31a0af5 | 18 | Epoch: 1 |
482a922c | 19 | License: GPL v2+ |
dad9a32e | 20 | Group: X11/Applications/Games/Strategy |
01b16924 | 21 | Source0: http://www.wesnoth.org/files/%{name}-%{version}.tar.bz2 |
08fe6b89 | 22 | # Source0-md5: b2260808e94eba12aa7ceaa40fa0ee4d |
dad9a32e | 23 | Source1: %{name}.desktop |
8a64199f | 24 | Source2: %{name}_editor.desktop |
25 | Source3: %{name}d.init | |
6734084f | 26 | Patch0: %{name}-Makefile.patch |
1c7a318b | 27 | Patch1: %{name}-locale_dir.patch |
4d5620e7 | 28 | URL: http://www.wesnoth.org/ |
ae1834b0 | 29 | BuildRequires: SDL-devel >= 1.2.7 |
dad9a32e | 30 | BuildRequires: SDL_image-devel >= 1.2 |
31 | BuildRequires: SDL_mixer-devel >= 1.2 | |
dad9a32e | 32 | BuildRequires: SDL_net-devel >= 1.2 |
8418f9f0 | 33 | BuildRequires: SDL_ttf-devel >= 2.0 |
126856ae | 34 | BuildRequires: autoconf >= 2.59 |
9d16f83e | 35 | BuildRequires: automake >= 1:1.9 |
e579b435 | 36 | BuildRequires: boost-devel >= 1.33 |
37 | %{?with_fribidi:BuildRequires: fribidi-devel} | |
9d16f83e | 38 | BuildRequires: gettext-devel |
759b9d08 | 39 | BuildRequires: libpng-devel |
6ac5e90b | 40 | BuildRequires: libstdc++-devel |
9d16f83e | 41 | BuildRequires: libtool >= 2:1.5 |
56da1b20 | 42 | BuildRequires: python-devel |
56da1b20 | 43 | BuildRequires: rpm-pythonprov |
759b9d08 | 44 | BuildRequires: rpmbuild(macros) >= 1.268 |
516c4760 | 45 | BuildRequires: zipios++-devel |
dad9a32e | 46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
47 | ||
48 | %description | |
49 | Battle for Wesnoth is a fantasy strategy game. Battle for control of | |
50 | villages, using variety of units which have advantages and | |
51 | disadvantages in different types of terrains and against different | |
52 | types of attacks. Units gain experience and advance levels, and are | |
53 | carried over from one scenario to the next campaign. | |
54 | ||
7840b0fd | 55 | %description -l pl.UTF-8 |
e579b435 | 56 | Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad |
57 | wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub | |
58 | jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom | |
59 | ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są | |
60 | przenoszone z jednej scenerii do następnej kampanii. | |
dad9a32e | 61 | |
dad9a32e | 62 | %package server |
63 | Summary: Network server for Wesnoth | |
157e8e1f | 64 | Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth |
dad9a32e | 65 | Group: X11/Applications/Games/Strategy |
392ee82f | 66 | Requires(post,preun): /sbin/chkconfig |
40b36f90 JK |
67 | Requires(postun): /usr/sbin/groupdel |
68 | Requires(postun): /usr/sbin/userdel | |
69 | Requires(pre): /usr/sbin/groupadd | |
70 | Requires(pre): /usr/sbin/useradd | |
759b9d08 | 71 | Requires: rc-scripts >= 0.4.0.17 |
dad9a32e | 72 | |
73 | %description server | |
74 | Server for playing networked games of Wesnoth. | |
75 | ||
7840b0fd | 76 | %description server -l pl.UTF-8 |
dad9a32e | 77 | Serwer do prowadzenia sieciowych gier Wesnoth. |
dad9a32e | 78 | |
dad9a32e | 79 | %package tools |
80 | Summary: Tools for Wesnoth | |
157e8e1f | 81 | Summary(pl.UTF-8): Narzędzia dla Wesnoth |
dad9a32e | 82 | Group: X11/Applications/Games/Strategy |
888b6155 | 83 | Requires: %{name} = %{epoch}:%{version}-%{release} |
dad9a32e | 84 | |
85 | %description tools | |
86 | Map editor and translations tools. | |
87 | ||
7840b0fd JR |
88 | %description tools -l pl.UTF-8 |
89 | Edytor map i narzędzia do tłumaczeń. | |
dad9a32e | 90 | |
91 | %prep | |
126856ae | 92 | %setup -q |
6734084f | 93 | %patch0 -p1 |
1c7a318b | 94 | %patch1 -p1 |
dad9a32e | 95 | |
96 | %build | |
629473ee | 97 | %{__gettextize} |
e579b435 | 98 | %{__aclocal} -I m4 |
629473ee | 99 | %{__autoconf} |
100 | %{__autoheader} | |
101 | %{__automake} | |
dad9a32e | 102 | %configure \ |
103 | %{?with_server:--enable-server} \ | |
104 | %{?with_tools:--enable-editor} \ | |
c12ea96c | 105 | %{?with_tools:--enable-tools} \ |
e579b435 | 106 | --with%{!?with_fribidi:out}-fribidi \ |
8a64199f | 107 | --docdir=%{_docdir}/%{name}-%{version} \ |
108 | --with-icondir=%{_pixmapsdir} \ | |
c12ea96c | 109 | --with-zipios |
dad9a32e | 110 | %{__make} |
111 | ||
112 | %install | |
113 | rm -rf $RPM_BUILD_ROOT | |
d31a0af5 | 114 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}} |
dad9a32e | 115 | |
116 | %{__make} install \ | |
117 | DESTDIR=$RPM_BUILD_ROOT | |
118 | ||
8a64199f | 119 | # install additional docs |
120 | install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
121 | gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README} | |
122 | ||
dad9a32e | 123 | install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir} |
8a64199f | 124 | install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir} |
125 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd | |
dad9a32e | 126 | |
759b9d08 | 127 | mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb} |
c12ea96c MB |
128 | |
129 | # unsupported(?) | |
7d4eb852 | 130 | rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia |
c12ea96c | 131 | rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la |
7d4eb852 | 132 | rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia |
c12ea96c MB |
133 | |
134 | # the same as manuals from %{_mandir}/man? | |
135 | rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB | |
136 | ||
5105ea28 | 137 | %find_lang %{name} --all-name |
138 | ||
dad9a32e | 139 | %clean |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | ||
40b36f90 JK |
142 | %pre server |
143 | %groupadd -P %{name}-server -g 178 wesnothd | |
144 | %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd | |
145 | ||
3fdd0ea2 | 146 | %post server |
147 | /sbin/chkconfig --add wesnothd | |
c12ea96c | 148 | %service wesnothd restart |
3fdd0ea2 | 149 | |
150 | %preun server | |
151 | if [ "$1" = "0" ]; then | |
c12ea96c | 152 | %service wesnothd stop |
24e1b6fa | 153 | /sbin/chkconfig --del wesnothd |
40b36f90 JK |
154 | %userremove wesnothd |
155 | %groupremove wesnothd | |
3fdd0ea2 | 156 | fi |
157 | ||
5105ea28 | 158 | %files -f %{name}.lang |
dad9a32e | 159 | %defattr(644,root,root,755) |
8a64199f | 160 | %doc %{_docdir}/%{name}-%{version} |
dad9a32e | 161 | %attr(755,root,root) %{_bindir}/wesnoth |
0c6dc98e | 162 | %{_mandir}/man6/wesnoth.6* |
d31a0af5 | 163 | %lang(cs) %{_mandir}/cs/man6/wesnoth.6* |
e579b435 | 164 | %lang(da) %{_mandir}/da/man6/wesnoth.6* |
165 | %lang(de) %{_mandir}/de/man6/wesnoth.6* | |
166 | %lang(es) %{_mandir}/es/man6/wesnoth.6* | |
5105ea28 | 167 | %lang(fr) %{_mandir}/fr/man6/wesnoth.6* |
7d4eb852 | 168 | %lang(gl) %{_mandir}/gl/man6/wesnoth.6* |
e579b435 | 169 | %lang(hu) %{_mandir}/hu/man6/wesnoth.6* |
126856ae | 170 | %lang(it) %{_mandir}/it/man6/wesnoth.6* |
5105ea28 | 171 | %lang(ja) %{_mandir}/ja/man6/wesnoth.6* |
7d4eb852 | 172 | %lang(lt) %{_mandir}/lt/man6/wesnoth.6* |
a6412a7b | 173 | %lang(nl) %{_mandir}/nl/man6/wesnoth.6* |
e579b435 | 174 | %lang(pl) %{_mandir}/pl/man6/wesnoth.6* |
5105ea28 | 175 | %lang(sk) %{_mandir}/sk/man6/wesnoth.6* |
7d4eb852 | 176 | %lang(sr) %{_mandir}/sr/man6/wesnoth.6* |
6734084f | 177 | %lang(sv) %{_mandir}/sv/man6/wesnoth.6* |
7d4eb852 | 178 | %lang(tr) %{_mandir}/tr/man6/wesnoth.6* |
e579b435 | 179 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6* |
0c6dc98e | 180 | %{_datadir}/%{name} |
dad9a32e | 181 | %{_desktopdir}/%{name}.desktop |
e579b435 | 182 | %{_pixmapsdir}/%{name}-icon.png |
dad9a32e | 183 | |
184 | %if %{with server} | |
185 | %files server | |
186 | %defattr(644,root,root,755) | |
187 | %attr(755,root,root) %{_bindir}/wesnothd | |
3fdd0ea2 | 188 | %attr(754,root,root) /etc/rc.d/init.d/wesnothd |
0c6dc98e | 189 | %{_mandir}/man6/wesnothd.6* |
e579b435 | 190 | %lang(cs) %{_mandir}/cs/man6/wesnothd.6* |
191 | %lang(da) %{_mandir}/da/man6/wesnothd.6* | |
192 | %lang(de) %{_mandir}/de/man6/wesnothd.6* | |
193 | %lang(es) %{_mandir}/es/man6/wesnothd.6* | |
194 | %lang(fr) %{_mandir}/fr/man6/wesnothd.6* | |
7d4eb852 | 195 | %lang(gl) %{_mandir}/gl/man6/wesnothd.6* |
e579b435 | 196 | %lang(hu) %{_mandir}/hu/man6/wesnothd.6* |
197 | %lang(it) %{_mandir}/it/man6/wesnothd.6* | |
198 | %lang(ja) %{_mandir}/ja/man6/wesnothd.6* | |
7d4eb852 | 199 | %lang(lt) %{_mandir}/lt/man6/wesnothd.6* |
e579b435 | 200 | %lang(nl) %{_mandir}/nl/man6/wesnothd.6* |
201 | %lang(pl) %{_mandir}/pl/man6/wesnothd.6* | |
202 | %lang(sk) %{_mandir}/sk/man6/wesnothd.6* | |
7d4eb852 | 203 | %lang(sr) %{_mandir}/sr/man6/wesnothd.6* |
e579b435 | 204 | %lang(sv) %{_mandir}/sv/man6/wesnothd.6* |
7d4eb852 | 205 | %lang(tr) %{_mandir}/tr/man6/wesnothd.6* |
e579b435 | 206 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6* |
40b36f90 | 207 | %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd |
dad9a32e | 208 | %endif |
209 | ||
210 | %if %{with tools} | |
211 | %files tools | |
212 | %defattr(644,root,root,755) | |
027c8016 | 213 | %attr(755,root,root) %{_bindir}/cutter |
214 | %attr(755,root,root) %{_bindir}/exploder | |
dad9a32e | 215 | %attr(755,root,root) %{_bindir}/wesnoth_editor |
e579b435 | 216 | %attr(755,root,root) %{_bindir}/wmlindent |
217 | %attr(755,root,root) %{_bindir}/wmllint | |
218 | %attr(755,root,root) %{_bindir}/wmlscope | |
4ff8d7ea | 219 | %{_mandir}/man6/wesnoth_editor.6* |
5105ea28 | 220 | %lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6* |
e579b435 | 221 | %lang(da) %{_mandir}/da/man6/wesnoth_editor.6* |
1acfd818 | 222 | %lang(de) %{_mandir}/de/man6/wesnoth_editor.6* |
e579b435 | 223 | %lang(es) %{_mandir}/es/man6/wesnoth_editor.6* |
5105ea28 | 224 | %lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6* |
7d4eb852 | 225 | %lang(gl) %{_mandir}/gl/man6/wesnoth_editor.6* |
e579b435 | 226 | %lang(hu) %{_mandir}/hu/man6/wesnoth_editor.6* |
5105ea28 | 227 | %lang(it) %{_mandir}/it/man6/wesnoth_editor.6* |
228 | %lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6* | |
7d4eb852 | 229 | %lang(lt) %{_mandir}/lt/man6/wesnoth_editor.6* |
a6412a7b | 230 | %lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6* |
e579b435 | 231 | %lang(pl) %{_mandir}/pl/man6/wesnoth_editor.6* |
5105ea28 | 232 | %lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6* |
7d4eb852 | 233 | %lang(sr) %{_mandir}/sr/man6/wesnoth_editor.6* |
6734084f | 234 | %lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6* |
7d4eb852 | 235 | %lang(tr) %{_mandir}/tr/man6/wesnoth_editor.6* |
e579b435 | 236 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth_editor.6* |
8a64199f | 237 | %{_desktopdir}/%{name}_editor.desktop |
e579b435 | 238 | %{_pixmapsdir}/%{name}_editor-icon.png |
dad9a32e | 239 | %endif |