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