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