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