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