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