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