]> git.pld-linux.org Git - packages/wesnoth.git/blob - wesnoth.spec
- up to 1.6.4
[packages/wesnoth.git] / wesnoth.spec
1 # TODO
2 # - rename language files sr@latin to sr@Latn and include them
3 # - use desktop file included with project (consider which one are better)
4 # - dont know what should I do with sr@latin man pages
5 # - unpackaged language files
6 # Conditional build
7 %bcond_without  server  # without server
8 %bcond_without  tools   # without tools
9 %bcond_without  fribidi # without Bidirectional language support
10 #
11 Summary:        Strategy game with a fantasy theme
12 Summary(hu.UTF-8):      Fantasy környezetben játszódó stratégiai játék
13 Summary(pl.UTF-8):      Strategiczna gra z motywem fantasy
14 Name:           wesnoth
15 Version:        1.6.4
16 Release:        1
17 Epoch:          1
18 License:        GPL v2+
19 Group:          X11/Applications/Games/Strategy
20 Source0:        http://dl.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
21 # Source0-md5:  c8bc4c5b2be28e29563dfe3f89eafd51
22 Source1:        %{name}.desktop
23 Source2:        %{name}_editor.desktop
24 Source3:        %{name}d.init
25 Patch0:         %{name}-Makefile.patch
26 Patch1:         %{name}-locale_dir.patch
27 Patch2:         %{name}-werror.patch
28 URL:            http://www.wesnoth.org/
29 BuildRequires:  SDL-devel >= 1.2.7
30 BuildRequires:  SDL_image-devel >= 1.2
31 BuildRequires:  SDL_mixer-devel >= 1.2
32 BuildRequires:  SDL_net-devel >= 1.2
33 BuildRequires:  SDL_ttf-devel >= 2.0.8
34 BuildRequires:  autoconf >= 2.59
35 BuildRequires:  automake >= 1:1.9
36 BuildRequires:  boost-devel >= 1.33
37 %{?with_fribidi:BuildRequires:  fribidi-devel}
38 BuildRequires:  gettext-devel
39 BuildRequires:  libpng-devel
40 BuildRequires:  libstdc++-devel
41 BuildRequires:  libtool >= 2:1.5
42 BuildRequires:  libvorbis-devel
43 BuildRequires:  pkg-config
44 BuildRequires:  python-devel
45 BuildRequires:  rpm-pythonprov
46 BuildRequires:  rpmbuild(macros) >= 1.268
47 BuildRequires:  sed >= 4.0
48 BuildRequires:  zipios++-devel
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 Battle for Wesnoth is a fantasy strategy game. Battle for control of
53 villages, using variety of units which have advantages and
54 disadvantages in different types of terrains and against different
55 types of attacks. Units gain experience and advance levels, and are
56 carried over from one scenario to the next campaign.
57
58 %description -l hu.UTF-8
59 Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
60 stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
61 felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
62 különféle terepeken és a különböző támadási stílusok ellen. Az
63 egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
64 következő pályára.
65
66 %description -l pl.UTF-8
67 Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
68 wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
69 jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
70 ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
71 przenoszone z jednej scenerii do następnej kampanii.
72
73 %package server
74 Summary:        Network server for Wesnoth
75 Summary(hu.UTF-8):      Hálózati szerver Wesnoth-hoz
76 Summary(pl.UTF-8):      Sieciowy serwer dla Wesnoth
77 Group:          X11/Applications/Games/Strategy
78 Requires(post,preun):   /sbin/chkconfig
79 Requires(postun):       /usr/sbin/groupdel
80 Requires(postun):       /usr/sbin/userdel
81 Requires(pre):  /usr/sbin/groupadd
82 Requires(pre):  /usr/sbin/useradd
83 Requires:       rc-scripts >= 0.4.0.17
84
85 %description server
86 Server for playing networked games of Wesnoth.
87
88 %description server -l hu.UTF-8
89 Szerver a Wesnoth hálózati játékához.
90
91 %description server -l pl.UTF-8
92 Serwer do prowadzenia sieciowych gier Wesnoth.
93
94 %package tools
95 Summary:        Tools for Wesnoth
96 Summary(hu.UTF.8):      Eszközök a Wesnoth-hoz
97 Summary(pl.UTF-8):      Narzędzia dla Wesnoth
98 Group:          X11/Applications/Games/Strategy
99 Requires:       %{name} = %{epoch}:%{version}-%{release}
100
101 %description tools
102 Map editor and translations tools.
103
104 %description tools -l hu.UTF-8
105 Pályaszerkesztők és fordítási eszközök.
106
107 %description tools -l pl.UTF-8
108 Edytor map i narzędzia do tłumaczeń.
109
110 %prep
111 %setup -q
112 %patch0 -p1
113 %patch1 -p1
114 %patch2 -p1
115 %{__sed} -i 's,$PYTHON_PREFIX"/lib/,"%{_libdir}/,g' configure.ac
116
117 %build
118 %{__gettextize}
119 %{__aclocal} -I m4
120 %{__autoconf}
121 %{__autoheader}
122 %{__automake}
123 %configure \
124         PYTHON_VERSION=%{py_ver} \
125         %{?with_server:--enable-server} \
126         %{?with_server:--enable-campaign-server} \
127         --enable-python-install \
128         %{?with_tools:--enable-editor} \
129         %{?with_tools:--enable-tools} \
130         --with%{!?with_fribidi:out}-fribidi \
131         --docdir=%{_docdir}/%{name}-%{version} \
132         --with-icondir=%{_pixmapsdir} \
133         --with-zipios
134 %{__make}
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
139
140 %{__make} install \
141         DESTDIR=$RPM_BUILD_ROOT
142
143 # install additional docs
144 install changelog README  $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
145 gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
146
147 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
148 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
149 %if %{with server}
150 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
151 %endif
152
153 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
154
155 # unsupported(?)
156 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
157 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/fur_IT
158 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
159 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/racv
160 rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
161
162 # the same as manuals from %{_mandir}/man?
163 rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
164
165 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
166 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
167 %py_postclean
168
169 %find_lang %{name} --all-name
170
171 %clean
172 rm -rf $RPM_BUILD_ROOT
173
174 %pre server
175 %groupadd -P %{name}-server -g 178  wesnothd
176 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
177
178 %post server
179 /sbin/chkconfig --add wesnothd
180 %service wesnothd restart
181
182 %preun server
183 if [ "$1" = "0" ]; then
184         %service wesnothd stop
185         /sbin/chkconfig --del wesnothd
186         %userremove wesnothd
187         %groupremove wesnothd
188 fi
189
190 %files -f %{name}.lang
191 %defattr(644,root,root,755)
192 %doc %{_docdir}/%{name}-%{version}
193 %attr(755,root,root) %{_bindir}/wesnoth
194 %{_mandir}/man6/wesnoth.6*
195 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
196 #%%lang(da) %{_mandir}/da/man6/wesnoth.6*
197 %lang(de) %{_mandir}/de/man6/wesnoth.6*
198 %lang(es) %{_mandir}/es/man6/wesnoth.6*
199 %lang(fi) %{_mandir}/fi/man6/wesnoth.6*
200 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
201 %lang(gl) %{_mandir}/gl/man6/wesnoth.6*
202 %lang(hu) %{_mandir}/hu/man6/wesnoth.6*
203 %lang(it) %{_mandir}/it/man6/wesnoth.6*
204 #%%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
205 %lang(lt) %{_mandir}/lt/man6/wesnoth.6*
206 #%%lang(nl) %{_mandir}/nl/man6/wesnoth.6*
207 %lang(pl) %{_mandir}/pl/man6/wesnoth.6*
208 #%%lang(ru) %{_mandir}/ru/man6/wesnoth.6*
209 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
210 %lang(sr) %{_mandir}/sr/man6/wesnoth.6*
211 %lang(sv) %{_mandir}/sv/man6/wesnoth.6*
212 %lang(tr) %{_mandir}/tr/man6/wesnoth.6*
213 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
214 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
215 %{_datadir}/%{name}
216 %{_desktopdir}/%{name}.desktop
217 %{_pixmapsdir}/%{name}-icon.png
218
219 %if %{with server}
220 %files server
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_bindir}/campaignd
223 %attr(755,root,root) %{_bindir}/wesnothd
224 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
225 %{_mandir}/man6/wesnothd.6*
226 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
227 #%%lang(da) %{_mandir}/da/man6/wesnothd.6*
228 %lang(de) %{_mandir}/de/man6/wesnothd.6*
229 %lang(es) %{_mandir}/es/man6/wesnothd.6*
230 %lang(fi) %{_mandir}/fi/man6/wesnothd.6*
231 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
232 #%%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
233 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
234 %lang(it) %{_mandir}/it/man6/wesnothd.6*
235 #%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
236 %lang(lt) %{_mandir}/lt/man6/wesnothd.6*
237 #%%lang(nl) %{_mandir}/nl/man6/wesnothd.6*
238 %lang(pl) %{_mandir}/pl/man6/wesnothd.6*
239 #%%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
240 %lang(sr) %{_mandir}/sr/man6/wesnothd.6*
241 %lang(sv) %{_mandir}/sv/man6/wesnothd.6*
242 %lang(tr) %{_mandir}/tr/man6/wesnothd.6*
243 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
244 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
245 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
246 %endif
247
248 %if %{with tools}
249 %files tools
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_bindir}/cutter
252 %attr(755,root,root) %{_bindir}/exploder
253 %attr(755,root,root) %{_bindir}/wesnoth_addon_manager
254 #%%attr(755,root,root) %{_bindir}/wesnoth_editor
255 %attr(755,root,root) %{_bindir}/wmlindent
256 %attr(755,root,root) %{_bindir}/wmllint
257 %attr(755,root,root) %{_bindir}/wmlscope
258 #%%{_mandir}/man6/wesnoth_editor.6*
259 #%%lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6*
260 #%%lang(da) %{_mandir}/da/man6/wesnoth_editor.6*
261 #%%lang(de) %{_mandir}/de/man6/wesnoth_editor.6*
262 #%%lang(es) %{_mandir}/es/man6/wesnoth_editor.6*
263 #%%lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6*
264 #%%lang(gl) %{_mandir}/gl/man6/wesnoth_editor.6*
265 #%%lang(hu) %{_mandir}/hu/man6/wesnoth_editor.6*
266 #%%lang(it) %{_mandir}/it/man6/wesnoth_editor.6*
267 #%%lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6*
268 #%%lang(lt) %{_mandir}/lt/man6/wesnoth_editor.6*
269 #%%lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6*
270 #%%lang(pl) %{_mandir}/pl/man6/wesnoth_editor.6*
271 #%%lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6*
272 #%%lang(sr) %{_mandir}/sr/man6/wesnoth_editor.6*
273 #%%lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6*
274 #%%lang(tr) %{_mandir}/tr/man6/wesnoth_editor.6*
275 #%%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth_editor.6*
276 #%%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth_editor.6*
277 %{_desktopdir}/%{name}_editor.desktop
278 %{_pixmapsdir}/%{name}_editor-icon.png
279 %dir %{py_sitedir}/%{name}
280 %{py_sitedir}/%{name}/*.py[co]
281 %endif
This page took 0.057248 seconds and 3 git commands to generate.