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