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