]>
Commit | Line | Data |
---|---|---|
4f6ef9bb | 1 | # TODO |
f8498762 | 2 | # - unpackaged language files |
d94078df | 3 | # |
eb35425c | 4 | # Conditional build |
dad9a32e | 5 | %bcond_without server # without server |
b18d78c0 | 6 | %bcond_without tools # without tools |
e579b435 | 7 | %bcond_without fribidi # without Bidirectional language support |
eb718a6d | 8 | |
dad9a32e | 9 | Summary: Strategy game with a fantasy theme |
d78dbe99 | 10 | Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék |
157e8e1f | 11 | Summary(pl.UTF-8): Strategiczna gra z motywem fantasy |
dad9a32e | 12 | Name: wesnoth |
af8dced3 | 13 | Version: 1.10.4 |
250363df | 14 | Release: 16 |
d31a0af5 | 15 | Epoch: 1 |
482a922c | 16 | License: GPL v2+ |
dad9a32e | 17 | Group: X11/Applications/Games/Strategy |
d7602b85 | 18 | Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2 |
af8dced3 | 19 | # Source0-md5: 1a673f12e4521fc66e60ec584fa7c98f |
3647514b | 20 | Source1: %{name}d.init |
0e4bc507 | 21 | Source2: %{name}.tmpfiles |
d94078df | 22 | Patch0: %{name}-desktop.patch |
23 | Patch1: %{name}-locale_dir.patch | |
4d5620e7 | 24 | URL: http://www.wesnoth.org/ |
b20e0743 | 25 | BuildRequires: SDL-devel >= 1.2.14-4 |
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 |
d7602b85 | 30 | BuildRequires: asciidoc |
e579b435 | 31 | BuildRequires: boost-devel >= 1.33 |
d7602b85 | 32 | BuildRequires: cmake >= 2.4 |
309b98f8 | 33 | BuildRequires: dbus-devel |
e579b435 | 34 | %{?with_fribidi:BuildRequires: fribidi-devel} |
b7f10e01 | 35 | BuildRequires: gettext-tools |
759b9d08 | 36 | BuildRequires: libpng-devel |
6ac5e90b | 37 | BuildRequires: libstdc++-devel |
d22c6766 | 38 | BuildRequires: libvorbis-devel |
d7602b85 | 39 | BuildRequires: lua51-devel |
350cecb6 | 40 | BuildRequires: pango-devel |
c94bb8a1 | 41 | BuildRequires: pkgconfig |
f1cb8481 | 42 | BuildRequires: rpm-pythonprov |
d94078df | 43 | BuildRequires: rpmbuild(macros) >= 1.600 |
d22c6766 | 44 | BuildRequires: sed >= 4.0 |
d7602b85 | 45 | BuildRequires: zlib-devel |
eb718a6d | 46 | Requires: %{name}-data = %{epoch}:%{version} |
a5e29dd0 | 47 | Requires: SDL >= 1.2.14-4 |
717cee4c | 48 | # sr@Latn vs. sr@latin |
49 | Conflicts: glibc-misc < 6:2.7 | |
dad9a32e | 50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
52 | %description | |
53 | Battle for Wesnoth is a fantasy strategy game. Battle for control of | |
54 | villages, using variety of units which have advantages and | |
55 | disadvantages in different types of terrains and against different | |
56 | types of attacks. Units gain experience and advance levels, and are | |
57 | carried over from one scenario to the next campaign. | |
58 | ||
d78dbe99 | 59 | %description -l hu.UTF-8 |
a60f6f21 | 60 | Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó |
61 | stratégiai játék. Harc a falvak megszerzéséért, különböző egységek | |
62 | felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a | |
63 | különféle terepeken és a különböző támadási stílusok ellen. Az | |
64 | egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a | |
65 | következő pályára. | |
d78dbe99 | 66 | |
7840b0fd | 67 | %description -l pl.UTF-8 |
a60f6f21 | 68 | Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad |
69 | wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub | |
70 | jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom | |
71 | ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są | |
72 | przenoszone z jednej scenerii do następnej kampanii. | |
dad9a32e | 73 | |
dad9a32e | 74 | %package server |
75 | Summary: Network server for Wesnoth | |
717cee4c | 76 | Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz |
157e8e1f | 77 | Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth |
dad9a32e | 78 | Group: X11/Applications/Games/Strategy |
392ee82f | 79 | Requires(post,preun): /sbin/chkconfig |
40b36f90 JK |
80 | Requires(postun): /usr/sbin/groupdel |
81 | Requires(postun): /usr/sbin/userdel | |
82 | Requires(pre): /usr/sbin/groupadd | |
83 | Requires(pre): /usr/sbin/useradd | |
759b9d08 | 84 | Requires: rc-scripts >= 0.4.0.17 |
745d3686 ER |
85 | Provides: group(wesnothd) |
86 | Provides: user(wesnothd) | |
717cee4c | 87 | # sr@Latn vs. sr@latin |
88 | Conflicts: glibc-misc < 6:2.7 | |
dad9a32e | 89 | |
90 | %description server | |
91 | Server for playing networked games of Wesnoth. | |
92 | ||
d78dbe99 ZU |
93 | %description server -l hu.UTF-8 |
94 | Szerver a Wesnoth hálózati játékához. | |
95 | ||
7840b0fd | 96 | %description server -l pl.UTF-8 |
dad9a32e | 97 | Serwer do prowadzenia sieciowych gier Wesnoth. |
dad9a32e | 98 | |
dad9a32e | 99 | %package tools |
100 | Summary: Tools for Wesnoth | |
d94078df | 101 | Summary(hu.UTF.8): Eszközök a Wesnoth-hoz |
157e8e1f | 102 | Summary(pl.UTF-8): Narzędzia dla Wesnoth |
dad9a32e | 103 | Group: X11/Applications/Games/Strategy |
888b6155 | 104 | Requires: %{name} = %{epoch}:%{version}-%{release} |
dad9a32e | 105 | |
106 | %description tools | |
107 | Map editor and translations tools. | |
108 | ||
d78dbe99 ZU |
109 | %description tools -l hu.UTF-8 |
110 | Pályaszerkesztők és fordítási eszközök. | |
111 | ||
7840b0fd JR |
112 | %description tools -l pl.UTF-8 |
113 | Edytor map i narzędzia do tłumaczeń. | |
dad9a32e | 114 | |
eb718a6d ER |
115 | %package data |
116 | Summary: Strategy game with a fantasy theme | |
117 | Group: Applications/Games | |
118 | %if "%{_rpmversion}" >= "5" | |
119 | BuildArch: noarch | |
120 | %endif | |
121 | ||
122 | %description data | |
123 | This package contains the data files for Wesnoth. | |
124 | ||
dad9a32e | 125 | %prep |
b5dcf87b | 126 | %setup -q |
6734084f | 127 | %patch0 -p1 |
1c7a318b | 128 | %patch1 -p1 |
d7602b85 | 129 | |
130 | # don't install locales in %{_datadir}/%{name} | |
d94078df | 131 | %{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt |
dad9a32e | 132 | |
133 | %build | |
d7602b85 | 134 | install -d build |
135 | cd build | |
d94078df | 136 | %cmake \ |
137 | .. \ | |
d7602b85 | 138 | -DENABLE_STRICT_COMPILATION="off" \ |
139 | -DBINDIR="%{_bindir}" \ | |
140 | -DMANDIR="%{_mandir}" \ | |
eb718a6d | 141 | -DLOCALEDIR="%{_localedir}" \ |
d7602b85 | 142 | %{!?with_server:-DENABLE_SERVER="off"} \ |
143 | %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \ | |
144 | %{!?with_tools:-DENABLE_EDITOR="off"} \ | |
145 | %{?with_tools:-DENABLE_TOOLS="on"} \ | |
d94078df | 146 | %{!?with_fribidi:-DENABLE_FRIBIDI="off"} |
d7602b85 | 147 | |
dad9a32e | 148 | %{__make} |
149 | ||
150 | %install | |
151 | rm -rf $RPM_BUILD_ROOT | |
0e4bc507 | 152 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d} \ |
eb718a6d | 153 | $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{_docdir}/%{name}-%{version}} |
dad9a32e | 154 | |
d7602b85 | 155 | %{__make} -C build install \ |
dad9a32e | 156 | DESTDIR=$RPM_BUILD_ROOT |
157 | ||
8a64199f | 158 | # install additional docs |
eb718a6d | 159 | cp -p changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
8a64199f | 160 | gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README} |
161 | ||
d22c6766 | 162 | %if %{with server} |
eb718a6d ER |
163 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd |
164 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf | |
d22c6766 | 165 | %endif |
dad9a32e | 166 | |
eb718a6d ER |
167 | mv -f $RPM_BUILD_ROOT%{_localedir}/nb{_NO,} |
168 | mv -f $RPM_BUILD_ROOT%{_localedir}/fur{_IT,} | |
c12ea96c | 169 | |
d94078df | 170 | # unsupported(?) |
eb718a6d ER |
171 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ang@latin |
172 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ca_ES@valencia | |
173 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/la | |
174 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/racv | |
175 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/en@shaw | |
176 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sr@ijekavian | |
177 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sr@ijekavianlatin | |
d94078df | 178 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia |
62daf2b6 | 179 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian |
180 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin | |
c12ea96c MB |
181 | |
182 | # the same as manuals from %{_mandir}/man? | |
729e3de3 | 183 | %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB |
c12ea96c | 184 | |
5105ea28 | 185 | %find_lang %{name} --all-name |
186 | ||
dad9a32e | 187 | %clean |
188 | rm -rf $RPM_BUILD_ROOT | |
189 | ||
40b36f90 JK |
190 | %pre server |
191 | %groupadd -P %{name}-server -g 178 wesnothd | |
192 | %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd | |
193 | ||
3fdd0ea2 | 194 | %post server |
195 | /sbin/chkconfig --add wesnothd | |
c12ea96c | 196 | %service wesnothd restart |
3fdd0ea2 | 197 | |
198 | %preun server | |
199 | if [ "$1" = "0" ]; then | |
c12ea96c | 200 | %service wesnothd stop |
24e1b6fa | 201 | /sbin/chkconfig --del wesnothd |
40b36f90 JK |
202 | %userremove wesnothd |
203 | %groupremove wesnothd | |
3fdd0ea2 | 204 | fi |
205 | ||
5105ea28 | 206 | %files -f %{name}.lang |
dad9a32e | 207 | %defattr(644,root,root,755) |
8a64199f | 208 | %doc %{_docdir}/%{name}-%{version} |
dad9a32e | 209 | %attr(755,root,root) %{_bindir}/wesnoth |
0c6dc98e | 210 | %{_mandir}/man6/wesnoth.6* |
d31a0af5 | 211 | %lang(cs) %{_mandir}/cs/man6/wesnoth.6* |
e579b435 | 212 | %lang(de) %{_mandir}/de/man6/wesnoth.6* |
d3cada04 | 213 | %lang(et) %{_mandir}/et/man6/wesnoth.6* |
83629e31 | 214 | %lang(es) %{_mandir}/es/man6/wesnoth.6* |
215 | %lang(fi) %{_mandir}/fi/man6/wesnoth.6* | |
bdc2942c | 216 | %lang(fr) %{_mandir}/fr/man6/wesnoth.6* |
7d4eb852 | 217 | %lang(gl) %{_mandir}/gl/man6/wesnoth.6* |
e579b435 | 218 | %lang(hu) %{_mandir}/hu/man6/wesnoth.6* |
944acd9d | 219 | %lang(id) %{_mandir}/id/man6/wesnoth.6* |
83629e31 | 220 | %lang(it) %{_mandir}/it/man6/wesnoth.6* |
7d4eb852 | 221 | %lang(lt) %{_mandir}/lt/man6/wesnoth.6* |
e579b435 | 222 | %lang(pl) %{_mandir}/pl/man6/wesnoth.6* |
83629e31 | 223 | %lang(ru) %{_mandir}/ru/man6/wesnoth.6* |
5105ea28 | 224 | %lang(sk) %{_mandir}/sk/man6/wesnoth.6* |
83629e31 | 225 | %lang(sr) %{_mandir}/sr/man6/wesnoth.6* |
226 | %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6* | |
227 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6* | |
228 | %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6* | |
3647514b | 229 | %{_desktopdir}/*.desktop |
230 | %{_pixmapsdir}/*-icon.png | |
dad9a32e | 231 | |
232 | %if %{with server} | |
233 | %files server | |
234 | %defattr(644,root,root,755) | |
d22c6766 | 235 | %attr(755,root,root) %{_bindir}/campaignd |
dad9a32e | 236 | %attr(755,root,root) %{_bindir}/wesnothd |
3fdd0ea2 | 237 | %attr(754,root,root) /etc/rc.d/init.d/wesnothd |
0c6dc98e | 238 | %{_mandir}/man6/wesnothd.6* |
e579b435 | 239 | %lang(cs) %{_mandir}/cs/man6/wesnothd.6* |
e579b435 | 240 | %lang(de) %{_mandir}/de/man6/wesnothd.6* |
241 | %lang(es) %{_mandir}/es/man6/wesnothd.6* | |
d3cada04 | 242 | %lang(et) %{_mandir}/et/man6/wesnothd.6* |
d18a93b2 | 243 | %lang(fi) %{_mandir}/fi/man6/wesnothd.6* |
bdc2942c | 244 | %lang(fr) %{_mandir}/fr/man6/wesnothd.6* |
d16f534c | 245 | %lang(gl) %{_mandir}/gl/man6/wesnothd.6* |
e579b435 | 246 | %lang(hu) %{_mandir}/hu/man6/wesnothd.6* |
944acd9d | 247 | %lang(id) %{_mandir}/id/man6/wesnothd.6* |
e579b435 | 248 | %lang(it) %{_mandir}/it/man6/wesnothd.6* |
d7602b85 | 249 | %lang(ja) %{_mandir}/ja/man6/wesnothd.6* |
d22c6766 | 250 | %lang(lt) %{_mandir}/lt/man6/wesnothd.6* |
e579b435 | 251 | %lang(pl) %{_mandir}/pl/man6/wesnothd.6* |
d7602b85 | 252 | %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6* |
83629e31 | 253 | %lang(ru) %{_mandir}/ru/man6/wesnothd.6* |
d7602b85 | 254 | %lang(sk) %{_mandir}/sk/man6/wesnothd.6* |
83629e31 | 255 | %lang(sr) %{_mandir}/sr/man6/wesnothd.6* |
256 | %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6* | |
257 | %lang(tr) %{_mandir}/tr/man6/wesnothd.6* | |
258 | %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6* | |
259 | %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6* | |
40b36f90 | 260 | %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd |
eb718a6d | 261 | %{systemdtmpfilesdir}/%{name}.conf |
dad9a32e | 262 | %endif |
263 | ||
264 | %if %{with tools} | |
265 | %files tools | |
266 | %defattr(644,root,root,755) | |
027c8016 | 267 | %attr(755,root,root) %{_bindir}/cutter |
268 | %attr(755,root,root) %{_bindir}/exploder | |
dad9a32e | 269 | %endif |
eb718a6d ER |
270 | |
271 | %files data | |
272 | %defattr(644,root,root,755) | |
273 | %{_datadir}/%{name} |