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