]> git.pld-linux.org Git - packages/wesnoth.git/blob - wesnoth.spec
- up to 1.7.3
[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.7.3
16 Release:        0.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:  d641a65106ffbc1da09f47538bcce9e6
22 Source1:        %{name}.desktop
23 Source2:        %{name}_editor.desktop
24 Source3:        %{name}d.init
25 Patch0:         %{name}-locale_dir.patch
26 Patch1:         %{name}-werror.patch
27 URL:            http://www.wesnoth.org/
28 BuildRequires:  SDL-devel >= 1.2.7
29 BuildRequires:  SDL_image-devel >= 1.2
30 BuildRequires:  SDL_mixer-devel >= 1.2
31 BuildRequires:  SDL_net-devel >= 1.2
32 BuildRequires:  SDL_ttf-devel >= 2.0.8
33 BuildRequires:  autoconf >= 2.59
34 BuildRequires:  automake >= 1:1.9
35 BuildRequires:  boost-devel >= 1.33
36 %{?with_fribidi:BuildRequires:  fribidi-devel}
37 BuildRequires:  gettext-devel
38 BuildRequires:  libpng-devel
39 BuildRequires:  libstdc++-devel
40 BuildRequires:  libtool >= 2:1.5
41 BuildRequires:  libvorbis-devel
42 BuildRequires:  lua51-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(pl.UTF-8):      Sieciowy serwer dla Wesnoth
76 Group:          X11/Applications/Games/Strategy
77 Requires(post,preun):   /sbin/chkconfig
78 Requires(postun):       /usr/sbin/groupdel
79 Requires(postun):       /usr/sbin/userdel
80 Requires(pre):  /usr/sbin/groupadd
81 Requires(pre):  /usr/sbin/useradd
82 Requires:       rc-scripts >= 0.4.0.17
83
84 %description server
85 Server for playing networked games of Wesnoth.
86
87 %description server -l hu.UTF-8
88 Szerver a Wesnoth hálózati játékához.
89
90 %description server -l pl.UTF-8
91 Serwer do prowadzenia sieciowych gier Wesnoth.
92
93 %package tools
94 Summary:        Tools for Wesnoth
95 Summary(hu.UTF.8):      Eszközök a Wesnoth-hoz
96 Summary(pl.UTF-8):      Narzędzia dla Wesnoth
97 Group:          X11/Applications/Games/Strategy
98 Requires:       %{name} = %{epoch}:%{version}-%{release}
99
100 %description tools
101 Map editor and translations tools.
102
103 %description tools -l hu.UTF-8
104 Pályaszerkesztők és fordítási eszközök.
105
106 %description tools -l pl.UTF-8
107 Edytor map i narzędzia do tłumaczeń.
108
109 %prep
110 %setup -q
111 %patch0 -p1
112 %patch1 -p1
113 %{__sed} -i 's,$PYTHON_PREFIX"/lib/,"%{_libdir}/,g' configure.ac
114 %{__sed} -i 's,lua5.1,lua51,' configure.ac
115
116 %build
117 %{__gettextize}
118 %{__aclocal} -I m4
119 %{__autoconf}
120 %{__autoheader}
121 %{__automake}
122 %configure \
123         PYTHON_VERSION=%{py_ver} \
124         %{?with_server:--enable-server} \
125         %{?with_server:--enable-campaign-server} \
126         --enable-python-install \
127         %{?with_tools:--enable-editor} \
128         %{?with_tools:--enable-tools} \
129         --with%{!?with_fribidi:out}-fribidi \
130         --docdir=%{_docdir}/%{name}-%{version} \
131         --with-icondir=%{_pixmapsdir} \
132         --with-zipios
133 %{__make}
134
135 %install
136 rm -rf $RPM_BUILD_ROOT
137 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
138
139 %{__make} install \
140         DESTDIR=$RPM_BUILD_ROOT
141
142 # install additional docs
143 install changelog README  $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
144 gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
145
146 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
147 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
148 %if %{with server}
149 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
150 %endif
151
152 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
153
154 # unsupported(?)
155 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
156 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/fur_IT
157 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
158 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/racv
159 rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
160
161 # the same as manuals from %{_mandir}/man?
162 rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
163
164 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
165 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
166 %py_postclean
167
168 %find_lang %{name} --all-name
169
170 %clean
171 rm -rf $RPM_BUILD_ROOT
172
173 %pre server
174 %groupadd -P %{name}-server -g 178  wesnothd
175 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
176
177 %post server
178 /sbin/chkconfig --add wesnothd
179 %service wesnothd restart
180
181 %preun server
182 if [ "$1" = "0" ]; then
183         %service wesnothd stop
184         /sbin/chkconfig --del wesnothd
185         %userremove wesnothd
186         %groupremove wesnothd
187 fi
188
189 %files -f %{name}.lang
190 %defattr(644,root,root,755)
191 %doc %{_docdir}/%{name}-%{version}
192 %attr(755,root,root) %{_bindir}/wesnoth
193 %{_mandir}/man6/wesnoth.6*
194 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
195 #%%lang(da) %{_mandir}/da/man6/wesnoth.6*
196 %lang(de) %{_mandir}/de/man6/wesnoth.6*
197 %lang(es) %{_mandir}/es/man6/wesnoth.6*
198 %lang(et) %{_mandir}/et/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(et) %{_mandir}/et/man6/wesnothd.6*
231 %lang(fi) %{_mandir}/fi/man6/wesnothd.6*
232 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
233 #%%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
234 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
235 %lang(it) %{_mandir}/it/man6/wesnothd.6*
236 #%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
237 %lang(lt) %{_mandir}/lt/man6/wesnothd.6*
238 #%%lang(nl) %{_mandir}/nl/man6/wesnothd.6*
239 %lang(pl) %{_mandir}/pl/man6/wesnothd.6*
240 #%%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
241 %lang(sr) %{_mandir}/sr/man6/wesnothd.6*
242 #%%lang(sv) %{_mandir}/sv/man6/wesnothd.6*
243 %lang(tr) %{_mandir}/tr/man6/wesnothd.6*
244 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
245 #%%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
246 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
247 %endif
248
249 %if %{with tools}
250 %files tools
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_bindir}/cutter
253 %attr(755,root,root) %{_bindir}/exploder
254 %attr(755,root,root) %{_bindir}/wesnoth_addon_manager
255 #%%attr(755,root,root) %{_bindir}/wesnoth_editor
256 %attr(755,root,root) %{_bindir}/wmlindent
257 %attr(755,root,root) %{_bindir}/wmllint
258 %attr(755,root,root) %{_bindir}/wmlscope
259 #%%{_mandir}/man6/wesnoth_editor.6*
260 #%%lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6*
261 #%%lang(da) %{_mandir}/da/man6/wesnoth_editor.6*
262 #%%lang(de) %{_mandir}/de/man6/wesnoth_editor.6*
263 #%%lang(es) %{_mandir}/es/man6/wesnoth_editor.6*
264 #%%lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6*
265 #%%lang(gl) %{_mandir}/gl/man6/wesnoth_editor.6*
266 #%%lang(hu) %{_mandir}/hu/man6/wesnoth_editor.6*
267 #%%lang(it) %{_mandir}/it/man6/wesnoth_editor.6*
268 #%%lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6*
269 #%%lang(lt) %{_mandir}/lt/man6/wesnoth_editor.6*
270 #%%lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6*
271 #%%lang(pl) %{_mandir}/pl/man6/wesnoth_editor.6*
272 #%%lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6*
273 #%%lang(sr) %{_mandir}/sr/man6/wesnoth_editor.6*
274 #%%lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6*
275 #%%lang(tr) %{_mandir}/tr/man6/wesnoth_editor.6*
276 #%%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth_editor.6*
277 #%%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth_editor.6*
278 %{_desktopdir}/%{name}_editor.desktop
279 %{_pixmapsdir}/%{name}_editor-icon.png
280 %dir %{py_sitedir}/%{name}
281 %{py_sitedir}/%{name}/*.py[co]
282 %endif
This page took 0.080483 seconds and 4 git commands to generate.